Enforce ACCESS_NETWORK_STATE to getAvailableInterfaces()
getAvailableInterfaces() will return available ethernet interfaces which are the information about networks. So it should enforce ACCESS_NETWORK_STATE permission check to ensure the applications are allowed to access the information. Bug: 174573778 Test: TetheringTests Test: CtsTetheringTest Change-Id: I7aaa5225d56f2feecc51ba263489ed0ce02fd651
This commit is contained in:
@@ -87,6 +87,8 @@ public class EthernetServiceImpl extends IEthernetManager.Stub {
|
||||
|
||||
@Override
|
||||
public String[] getAvailableInterfaces() throws RemoteException {
|
||||
enforceAccessPermission();
|
||||
|
||||
return mTracker.getInterfaces(checkUseRestrictedNetworksPermission());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user