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

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

sys user split: turn off unlocking for sys user.

This is to unblock the team to test system user split as soon as
possible.  This is not how it is going to work eventually.

BUG:19913735
Change-Id: I27aaf4491258fe08a3d64ec06358dae482192fbd
parent b31e14a3
Loading
Loading
Loading
Loading
+39 −25
Original line number Diff line number Diff line
@@ -1013,6 +1013,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(
@@ -1041,6 +1045,7 @@ public class KeyguardViewMediator extends SystemUI {
                hideLocked();
                return;
            }
        }

        if (DEBUG) Log.d(TAG, "doKeyguard: showing the lock screen");
        showLocked(options);
@@ -1391,6 +1396,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) {