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

Commit 13436455 authored by Tony Mak's avatar Tony Mak
Browse files

Should call clearCallingIdentity before accessing getProfileParent

Bug: 27308833
Change-Id: Ib33fcc0f30dada5f307f45c7c85dce5fb5e4a064
parent eb83ab52
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -608,7 +608,13 @@ class ActivityStarter {
                // app in a locked managed profile from an unlocked parent allow it to resolve
                // as user will be sent via confirm credentials to unlock the profile.
                UserManager userManager = UserManager.get(mService.mContext);
                UserInfo parent = userManager.getProfileParent(userId);
                UserInfo parent = null;
                long token = Binder.clearCallingIdentity();
                try {
                    parent = userManager.getProfileParent(userId);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
                if (parent != null
                        && userManager.isUserUnlocked(parent.getUserHandle())
                        && !userManager.isUserUnlocked(userInfo.getUserHandle())) {