Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
This commit is contained in:
@@ -1414,8 +1414,9 @@ public class ConnectivityManager {
|
||||
context.enforceCallingOrSelfPermission(
|
||||
android.Manifest.permission.CONNECTIVITY_INTERNAL, "ConnectivityService");
|
||||
} else {
|
||||
context.enforceCallingOrSelfPermission(
|
||||
android.Manifest.permission.CHANGE_NETWORK_STATE, "ConnectivityService");
|
||||
int uid = Binder.getCallingUid();
|
||||
Settings.checkAndNoteChangeNetworkStateOperation(context, uid, Settings
|
||||
.getPackageNameForUid(context, uid), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1432,9 +1432,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void enforceChangePermission() {
|
||||
mContext.enforceCallingOrSelfPermission(
|
||||
android.Manifest.permission.CHANGE_NETWORK_STATE,
|
||||
"ConnectivityService");
|
||||
int uid = Binder.getCallingUid();
|
||||
Settings.checkAndNoteChangeNetworkStateOperation(mContext, uid, Settings
|
||||
.getPackageNameForUid(mContext, uid), true);
|
||||
|
||||
}
|
||||
|
||||
private void enforceTetherAccessPermission() {
|
||||
|
||||
Reference in New Issue
Block a user