Merge "Bug: 21588539 Move CHANGE_NETWORK_STATE to be in SYSTEM_SETTINGS" into mnc-dev
This commit is contained in:
commit
0ed58c3f00
2 changed files with 7 additions and 5 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue