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

Commit bd366325 authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Android (Google) Code Review
Browse files

Merge "sys user split: turn off unlocking for sys user."

parents bf36f756 f561d7f2
Loading
Loading
Loading
Loading
+39 −25
Original line number Diff line number Diff line
@@ -1025,6 +1025,10 @@ public class KeyguardViewMediator extends SystemUI {
            return;
        }

        // In split system user mode, we never unlock system user.
        if (!UserManager.isSplitSystemUser()
                || KeyguardUpdateMonitor.getCurrentUser() != UserHandle.USER_SYSTEM) {

            // if the setup wizard hasn't run yet, don't show
            final boolean requireSim = !SystemProperties.getBoolean("keyguard.no_require_sim", false);
            final boolean absent = SubscriptionManager.isValidSubscriptionId(
@@ -1053,6 +1057,7 @@ public class KeyguardViewMediator extends SystemUI {
                hideLocked();
                return;
            }
        }

        if (DEBUG) Log.d(TAG, "doKeyguard: showing the lock screen");
        showLocked(options);
@@ -1408,6 +1413,15 @@ public class KeyguardViewMediator extends SystemUI {
        synchronized (KeyguardViewMediator.this) {
            if (DEBUG) Log.d(TAG, "handleHide");

            if (UserManager.isSplitSystemUser()
                    && KeyguardUpdateMonitor.getCurrentUser() == UserHandle.USER_SYSTEM) {
                // In split system user mode, we never unlock system user. The end user has to
                // switch to another user.
                // TODO: We should stop it early by disabling the swipe up flow. Right now swipe up
                // still completes and makes the screen blank.
                if (DEBUG) Log.d(TAG, "Split system user, quit unlocking.");
                return;
            }
            mHiding = true;
            if (mShowing && !mOccluded) {
                if (!mHideAnimationRun) {