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

Commit 687a3274 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Remove the secure lock icon from the status bar.

Added in I0e08a952904cc4728621953a42806edf26eb8e46, but
takes up too much room.

An undocumented system setting, "show_status_bar_lock", can
be set to 1 (e.g. in Spare Parts) to bring this back.

Bug: 2511090
Change-Id: I8869ac18c303a786eeb7f1a0c4ae08529b45d59c
parent 1e5b478f
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
    private Context mContext;
    private AlarmManager mAlarmManager;
    private StatusBarManager mStatusBarManager;
    private boolean mShowLockIcon = false;
    private IBinder mSecureLockIcon = null;

    private boolean mSystemReady;
@@ -279,6 +280,9 @@ public class KeyguardViewMediator implements KeyguardViewCallback,

        mUserPresentIntent = new Intent(Intent.ACTION_USER_PRESENT);
        mUserPresentIntent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);

        final ContentResolver cr = mContext.getContentResolver();
        mShowLockIcon = (Settings.System.getInt(cr, "show_status_bar_lock", 0) == 1);
    }

    /**
@@ -1019,6 +1023,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
        if (mStatusBarManager == null) {
            Log.w(TAG, "Could not get status bar manager");
        } else {
            if (mShowLockIcon) {
                // Give feedback to user when secure keyguard is active and engaged
                if (mShowing && isSecure()) {
                    if (mSecureLockIcon == null) {
@@ -1031,6 +1036,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
                        mSecureLockIcon = null;
                    }
                }
            }

            // if the keyguard is shown, allow the status bar to open
            // only if the keyguard is insecure and is covered by another window