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

Commit e7056216 authored by Robin Lee's avatar Robin Lee
Browse files

Lock all profile tasks if keyguard is locked too

Bug: 29244275
Test: //tests/PoApi/src/com/google/android/afwtest/poapi/WorkChallengeTest
Change-Id: I1df84aa1af675af68180a84440ef36adb003b42d
parent 3e604155
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -11929,14 +11929,12 @@ public class ActivityManagerService extends IActivityManager.Stub
            final long ident = Binder.clearCallingIdentity();
            try {
                if (mUserController.shouldConfirmCredentials(userId)) {
                    final int currentUserId = mUserController.getCurrentUserIdLocked();
                    if (!mKeyguardController.isKeyguardLocked()) {
                        // If the device is not locked, we will prompt for credentials immediately.
                        mStackSupervisor.lockAllProfileTasks(userId);
                    } else {
                    if (mKeyguardController.isKeyguardLocked()) {
                        // Showing launcher to avoid user entering credential twice.
                        final int currentUserId = mUserController.getCurrentUserIdLocked();
                        startHomeActivityLocked(currentUserId, "notifyLockedProfile");
                    }
                    mStackSupervisor.lockAllProfileTasks(userId);
                }
            } finally {
                Binder.restoreCallingIdentity(ident);