Merge "Call AppOpsService from the handler thread" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1347cdb2e1
@@ -1303,14 +1303,16 @@ public class UserManagerService extends IUserManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mAppOpsService != null) { // We skip it until system-ready.
|
if (mAppOpsService != null) { // We skip it until system-ready.
|
||||||
final long token = Binder.clearCallingIdentity();
|
mHandler.post(new Runnable() {
|
||||||
try {
|
@Override
|
||||||
mAppOpsService.setUserRestrictions(effective, mUserRestriconToken, userId);
|
public void run() {
|
||||||
} catch (RemoteException e) {
|
try {
|
||||||
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
|
mAppOpsService.setUserRestrictions(effective, mUserRestriconToken, userId);
|
||||||
} finally {
|
} catch (RemoteException e) {
|
||||||
Binder.restoreCallingIdentity(token);
|
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
propagateUserRestrictionsLR(userId, effective, prevAppliedRestrictions);
|
propagateUserRestrictionsLR(userId, effective, prevAppliedRestrictions);
|
||||||
|
|||||||
Reference in New Issue
Block a user