summaryrefslogtreecommitdiffstats
path: root/policy/src
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2011-08-30 22:05:47 -0700
committerJeff Sharkey <jsharkey@android.com>2011-08-30 22:30:07 -0700
commitf52c70b2ccf711f507723bc74a68ca8c3a12c57a (patch)
tree20cd949e4f708f4dc8c5e6054ecca45d6607813c /policy/src
parent0d32b317c2d1cacfa5acd34253cc626d6a776ec0 (diff)
downloadframeworks_base-f52c70b2ccf711f507723bc74a68ca8c3a12c57a.zip
frameworks_base-f52c70b2ccf711f507723bc74a68ca8c3a12c57a.tar.gz
frameworks_base-f52c70b2ccf711f507723bc74a68ca8c3a12c57a.tar.bz2
Disable clock in lockscreen; better flag logic.
When showing lockscreen, hide clock and navigation. Clean up logic to be easier to understand. Bug: 5112812 Change-Id: I20e3563aa36644db678c7839d47f01f223fe8d37
Diffstat (limited to 'policy/src')
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java34
1 files changed, 20 insertions, 14 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
index 5661116..162381d 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -145,10 +145,10 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
private static final int KEYGUARD_DONE_DRAWING_TIMEOUT_MS = 2000;
/**
- * Allow the user to operate the status bar when the keyguard is engaged (without a pattern or
- * password).
+ * Allow the user to expand the status bar when the keyguard is engaged
+ * (without a pattern or password).
*/
- private static final boolean ENABLE_STATUS_BAR_IN_KEYGUARD = true;
+ private static final boolean ENABLE_INSECURE_STATUS_BAR_EXPAND = true;
private Context mContext;
private AlarmManager mAlarmManager;
@@ -1184,19 +1184,25 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
}
}
- // if the keyguard is shown, allow the status bar to open only if the keyguard is
- // insecure and (is covered by another window OR this feature is enabled in general)
- boolean enable = !mShowing
- || ((ENABLE_STATUS_BAR_IN_KEYGUARD || mHidden) && !isSecure());
+ int flags = StatusBarManager.DISABLE_NONE;
+ if (mShowing && !mHidden) {
+ // showing lockscreen exclusively; disable various extra
+ // statusbar components.
+ flags |= StatusBarManager.DISABLE_NAVIGATION;
+ flags |= StatusBarManager.DISABLE_CLOCK;
+ }
+ if (mShowing && (isSecure() || !ENABLE_INSECURE_STATUS_BAR_EXPAND)) {
+ // showing secure lockscreen; disable expanding.
+ flags |= StatusBarManager.DISABLE_EXPAND;
+ }
+
if (DEBUG) {
- Log.d(TAG, "adjustStatusBarLocked: mShowing=" + mShowing + " mHidden=" + mHidden
- + " isSecure=" + isSecure() + " --> enable=" + enable);
+ Log.d(TAG,
+ "adjustStatusBarLocked: mShowing=" + mShowing + " mHidden=" + mHidden
+ + " isSecure=" + isSecure() + " --> flags=" + flags);
}
- mStatusBarManager.disable(enable ?
- StatusBarManager.DISABLE_NONE :
- ( StatusBarManager.DISABLE_EXPAND
- | StatusBarManager.DISABLE_NAVIGATION
- | StatusBarManager.DISABLE_CLOCK));
+
+ mStatusBarManager.disable(flags);
}
}