Stop requiring CHANGE_NETWORK_STATE to change Ethernet config.
Requiring CHANGE_NETWORK_STATE is pointless, since immediately after doing that we require CONNECTIVITY_INTERNAL, which is a system-only permission. Bug: 23597341 Change-Id: If4c8ecbb319e547c2c81d2dcc3c7bbb63e0bc2af
This commit is contained in:
@@ -74,12 +74,6 @@ public class EthernetServiceImpl extends IEthernetManager.Stub {
|
||||
"EthernetService");
|
||||
}
|
||||
|
||||
private void enforceChangePermission() {
|
||||
int uid = Binder.getCallingUid();
|
||||
Settings.checkAndNoteChangeNetworkStateOperation(mContext, uid, Settings
|
||||
.getPackageNameForUid(mContext, uid), true);
|
||||
}
|
||||
|
||||
private void enforceConnectivityInternalPermission() {
|
||||
mContext.enforceCallingOrSelfPermission(
|
||||
android.Manifest.permission.CONNECTIVITY_INTERNAL,
|
||||
@@ -120,7 +114,6 @@ public class EthernetServiceImpl extends IEthernetManager.Stub {
|
||||
Log.w(TAG, "System isn't ready enough to change ethernet configuration");
|
||||
}
|
||||
|
||||
enforceChangePermission();
|
||||
enforceConnectivityInternalPermission();
|
||||
|
||||
synchronized (mIpConfiguration) {
|
||||
|
||||
Reference in New Issue
Block a user