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

Commit 772db427 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Selectively enable back button in keyguard for security screens." into jb-mr1-dev

parents 7d0882be e23ab8b1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ public class KeyguardHostView extends KeyguardViewBase {
            });
        }
        updateSecurityViews();
        setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
    }

    private void updateSecurityViews() {
@@ -558,9 +559,13 @@ public class KeyguardHostView extends KeyguardViewBase {
            }
        }

        // Discard current runnable if we're switching back to the selector view

        if (securityMode == SecurityMode.None) {
            // Discard current runnable if we're switching back to the selector view
            setOnDismissRunnable(null);
            setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
        } else {
            setSystemUiVisibility(getSystemUiVisibility() & (~View.STATUS_BAR_DISABLE_BACK));
        }

        mCurrentSecuritySelection = securityMode;
+5 −5
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@ public class KeyguardViewManager {
        maybeCreateKeyguardLocked(enableScreenRotation);
        maybeEnableScreenRotation(enableScreenRotation);

        // Disable aspects of the system/status/navigation bars that are not appropriate or
        // useful for the lockscreen but can be re-shown by dialogs or SHOW_WHEN_LOCKED activities.
        // Other disabled bits are handled by the KeyguardViewMediator talking directly to the
        // status bar service.
        int visFlags = View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_HOME;
        // Disable common aspects of the system/status/navigation bars that are not appropriate or
        // useful on any keyguard screen but can be re-shown by dialogs or SHOW_WHEN_LOCKED
        // activities. Other disabled bits are handled by the KeyguardViewMediator talking
        // directly to the status bar service.
        final int visFlags = View.STATUS_BAR_DISABLE_HOME;
        if (DEBUG) Log.v(TAG, "KGVM: Set visibility on " + mKeyguardHost + " to " + visFlags);
        mKeyguardHost.setSystemUiVisibility(visFlags);

+3 −1
Original line number Diff line number Diff line
@@ -1256,7 +1256,9 @@ public class KeyguardViewMediator {
            // windows that appear on top, ever
            int flags = StatusBarManager.DISABLE_NONE;
            if (mShowing) {
                // disable navigation status bar components (home, recents) if lock screen is up
                // Permanently disable components not available when keyguard is enabled
                // (like recents). Temporary enable/disable (e.g. the "back" button) are
                // done in KeyguardHostView.
                flags |= StatusBarManager.DISABLE_RECENT;
                if (isSecure() || !ENABLE_INSECURE_STATUS_BAR_EXPAND) {
                    // showing secure lockscreen; disable expanding.