diff options
| author | 2016-06-17 15:59:06 +0000 | |
|---|---|---|
| committer | 2016-06-17 15:59:07 +0000 | |
| commit | 1347cdb2e1adf2e892e2bb0640b546bb86d1cec2 (patch) | |
| tree | 013bc3b77544dbbc4b17e02982a613b739a866f5 | |
| parent | c577a50d099c35c5e2c96f50b62cfa81843398ef (diff) | |
| parent | ec30ca35aa6bb51643d266b73f3c93d30c96ac3f (diff) | |
Merge "Call AppOpsService from the handler thread" into nyc-dev
| -rw-r--r-- | services/core/java/com/android/server/pm/UserManagerService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 4589327c3cdb..4c515f0fc87e 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -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); |