Merge "Have PermissionMonitor arbiter which app can access background networks"

am: 06f0fc04e7

Change-Id: Ic05e362af58d667b5be84c3bd421c9250927abe2
This commit is contained in:
Chalard Jean
2018-03-23 08:12:51 +00:00
committed by android-build-merger
4 changed files with 193 additions and 21 deletions

View File

@@ -1976,13 +1976,6 @@ public class ConnectivityManager {
/* TODO: These permissions checks don't belong in client-side code. Move them to
* services.jar, possibly in com.android.server.net. */
/** {@hide} */
public static final boolean checkChangePermission(Context context) {
int uid = Binder.getCallingUid();
return Settings.checkAndNoteChangeNetworkStateOperation(context, uid, Settings
.getPackageNameForUid(context, uid), false /* throwException */);
}
/** {@hide} */
public static final void enforceChangePermission(Context context) {
int uid = Binder.getCallingUid();