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

Commit b43646c1 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

Change-Id: If17588d0b12412c88e21d8a2ee3ee9bfc4778589
parents 0073a03a 1347cdb2
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -1303,15 +1303,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);