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

Commit 6c96f7fa authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Do not hold PM lock when calling AppOpsService.removeUser

Test: manual
Bug: 63117568
Change-Id: Ia23878df53c9b1b1e11bc78f2b36ff740e8f75a4
parent c1323664
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2680,11 +2680,6 @@ public class UserManagerService extends IUserManager.Stub {
                    addRemovingUserIdLocked(userHandle);
                }

                try {
                    mAppOpsService.removeUser(userHandle);
                } catch (RemoteException e) {
                    Log.w(LOG_TAG, "Unable to notify AppOpsService of removing user", e);
                }
                // Set this to a partially created user, so that the user will be purged
                // on next startup, in case the runtime stops now before stopping and
                // removing the user completely.
@@ -2694,6 +2689,11 @@ public class UserManagerService extends IUserManager.Stub {
                userData.info.flags |= UserInfo.FLAG_DISABLED;
                writeUserLP(userData);
            }
            try {
                mAppOpsService.removeUser(userHandle);
            } catch (RemoteException e) {
                Log.w(LOG_TAG, "Unable to notify AppOpsService of removing user", e);
            }

            if (userData.info.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID
                    && userData.info.isManagedProfile()) {