Have PermissionMonitor arbiter which app can access background networks
This will let ConnectivityService send the right callbacks to the
relevant apps.
Test: manual with apps
runtest frameworks-net
cts
new tests for this functionality
Bug: 67408339
Change-Id: I6f08efd9e73c7e191f833d7f307a3bf4c9e2f0b4
This commit is contained in:
parent
75e48d2435
commit
a43eede395
1 changed files with 193 additions and 21 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue