diff options
author | Daniel Sandler <dsandler@google.com> | 2010-03-13 15:44:47 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2010-03-15 21:33:56 -0400 |
commit | 2b9ba227a59a17d27536f15a5615ae18248892e6 (patch) | |
tree | 80c8a36b995332b98f6a191356e21c7d9f997ae2 | |
parent | 95da65e172b846515b9245e4a01c3dc260177d68 (diff) | |
download | base-2b9ba227a59a17d27536f15a5615ae18248892e6.tar.gz |
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
-rw-r--r-- | phone/com/android/internal/policy/impl/KeyguardViewMediator.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/phone/com/android/internal/policy/impl/KeyguardViewMediator.java b/phone/com/android/internal/policy/impl/KeyguardViewMediator.java index 526dcbc..862e328 100644 --- a/phone/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/phone/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -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,16 +1023,18 @@ public class KeyguardViewMediator implements KeyguardViewCallback, if (mStatusBarManager == null) { Log.w(TAG, "Could not get status bar manager"); } else { - // Give feedback to user when secure keyguard is active and engaged - if (mShowing && isSecure()) { - if (mSecureLockIcon == null) { - mSecureLockIcon = mStatusBarManager.addIcon("secure", - com.android.internal.R.drawable.stat_sys_secure, 0); - } - } else { - if (mSecureLockIcon != null) { - mStatusBarManager.removeIcon(mSecureLockIcon); - mSecureLockIcon = null; + if (mShowLockIcon) { + // Give feedback to user when secure keyguard is active and engaged + if (mShowing && isSecure()) { + if (mSecureLockIcon == null) { + mSecureLockIcon = mStatusBarManager.addIcon("secure", + com.android.internal.R.drawable.stat_sys_secure, 0); + } + } else { + if (mSecureLockIcon != null) { + mStatusBarManager.removeIcon(mSecureLockIcon); + mSecureLockIcon = null; + } } } |