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

Commit d21c45fc authored by Govinda Wasserman's avatar Govinda Wasserman Committed by Android (Google) Code Review
Browse files

Merge "Add device config to show home over the lockscreen"

parents c99357ab b5f2849f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -364,6 +364,11 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String NAV_BAR_HANDLE_FORCE_OPAQUE = "nav_bar_handle_force_opaque";

    /**
     * (boolean) Whether to force the Nav Bar handle to remain visible over the lockscreen.
     */
    public static final String NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN = "nav_bar_handle_show_over_lockscreen";

    private SystemUiDeviceConfigFlags() {
    }
}
+21 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.keyguard;

import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;

import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
@@ -53,6 +54,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -371,6 +373,7 @@ public class KeyguardViewMediator extends SystemUI {
    private boolean mPulsing;

    private boolean mLockLater;
    private boolean mShowHomeOverLockscreen;

    private boolean mWakeAndUnlocking;
    private IKeyguardDrawnCallback mDrawnCallback;
@@ -703,6 +706,20 @@ public class KeyguardViewMediator extends SystemUI {
        mStatusBarKeyguardViewManagerLazy = statusBarKeyguardViewManagerLazy;
        mDismissCallbackRegistry = dismissCallbackRegistry;
        mUiBgExecutor = uiBgExecutor;
        mShowHomeOverLockscreen = DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_SYSTEMUI,
                NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN,
                /* defaultValue = */ false);
        DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, mHandler::post,
                new DeviceConfig.OnPropertiesChangedListener() {
                    @Override
                    public void onPropertiesChanged(DeviceConfig.Properties properties) {
                        if (properties.getKeyset().contains(NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN)) {
                            mShowHomeOverLockscreen = properties.getBoolean(
                                    NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN, false /* defaultValue */);
                        }
                    }
                });
    }

    public void userActivity() {
@@ -1972,7 +1989,10 @@ public class KeyguardViewMediator extends SystemUI {
            // windows that appear on top, ever
            int flags = StatusBarManager.DISABLE_NONE;
            if (forceHideHomeRecentsButtons || isShowingAndNotOccluded()) {
                flags |= StatusBarManager.DISABLE_HOME | StatusBarManager.DISABLE_RECENT;
                if (!mShowHomeOverLockscreen) {
                    flags |= StatusBarManager.DISABLE_HOME;
                }
                flags |= StatusBarManager.DISABLE_RECENT;
            }

            if (DEBUG) {