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

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

Merge "Merge "Call isUserUnlockingOrUnlocked with cleared identity" into...

Merge "Merge "Call isUserUnlockingOrUnlocked with cleared identity" into nyc-dev am: b7bd2e64 am: 98a9b7bb" into nyc-mr1-dev-plus-aosp
am: cc8cc070

* commit 'cc8cc070':
  Call isUserUnlockingOrUnlocked with cleared identity

Change-Id: I7959b2059c38cfe3903d2bdb890fa28242841713
parents 44499e8a cc8cc070
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -677,16 +677,17 @@ 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 = null;
                boolean profileLockedAndParentUnlockingOrUnlocked = false;
                long token = Binder.clearCallingIdentity();
                try {
                    parent = userManager.getProfileParent(userId);
                    UserInfo parent = userManager.getProfileParent(userId);
                    profileLockedAndParentUnlockingOrUnlocked = (parent != null)
                            && userManager.isUserUnlockingOrUnlocked(parent.id)
                            && !userManager.isUserUnlockingOrUnlocked(userId);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
                if (parent != null
                        && userManager.isUserUnlockingOrUnlocked(parent.getUserHandle())
                        && !userManager.isUserUnlockingOrUnlocked(userInfo.getUserHandle())) {
                if (profileLockedAndParentUnlockingOrUnlocked) {
                    rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId,
                            PackageManager.MATCH_DIRECT_BOOT_AWARE
                                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE);