Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af25a26a authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge \\\"Call AppOpsService from the handler thread\\\" into nyc-dev am: 1347cdb2 am: b43646c1

am: c18a35e1

Change-Id: I86e79194a8860c495fa92abc1374a87c58a1dff0
parents cf6d621e c18a35e1
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -1308,15 +1308,17 @@ public class UserManagerService extends IUserManager.Stub {
        }

        if (mAppOpsService != null) { // We skip it until system-ready.
            final long token = Binder.clearCallingIdentity();
            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");
            } finally {
                Binder.restoreCallingIdentity(token);
                    }
                }
            });
        }

        propagateUserRestrictionsLR(userId, effective, prevAppliedRestrictions);