Merge \"Call AppOpsService from the handler thread\" into nyc-dev

am: 1347cdb2e1

Change-Id: If17588d0b12412c88e21d8a2ee3ee9bfc4778589
This commit is contained in:
Fyodor Kupolov
2016-06-17 16:03:54 +00:00
committed by android-build-merger

View File

@@ -1303,14 +1303,16 @@ public class UserManagerService extends IUserManager.Stub {
}
if (mAppOpsService != null) { // We skip it until system-ready.
final long token = Binder.clearCallingIdentity();
try {
mAppOpsService.setUserRestrictions(effective, mUserRestriconToken, userId);
} catch (RemoteException e) {
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
} finally {
Binder.restoreCallingIdentity(token);
}
mHandler.post(new Runnable() {
@Override
public void run() {
try {
mAppOpsService.setUserRestrictions(effective, mUserRestriconToken, userId);
} catch (RemoteException e) {
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
}
}
});
}
propagateUserRestrictionsLR(userId, effective, prevAppliedRestrictions);