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

Commit d743ceff authored by Xiaohui Chen's avatar Xiaohui Chen
Browse files

Fix unlock problem in split system user mode

Bug: 31802561
Change-Id: If1e1e0d8abe93090f18c9ab35e533f8480c6fd7c
Test: locally with ryu_usersplit, unlock a user works
parent 9ca77012
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -96,9 +96,10 @@ public class KeyguardBouncer {
        }

        final int activeUserId = ActivityManager.getCurrentUser();
        final boolean allowDismissKeyguard =
                !UserManager.isSplitSystemUser()
                && activeUserId == keyguardUserId;
        final boolean isSystemUser =
                UserManager.isSplitSystemUser() && activeUserId == UserHandle.USER_SYSTEM;
        final boolean allowDismissKeyguard = !isSystemUser && activeUserId == keyguardUserId;

        // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) is
        // set, this will dismiss the whole Keyguard. Otherwise, show the bouncer.
        if (allowDismissKeyguard && mKeyguardView.dismiss(activeUserId)) {