summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java4
3 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index faf60f5..e4a0196 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -76,6 +76,7 @@ public class KeyguardIndicationController {
private int mChargingCurrent;
private String mMessageToShowOnScreenOn;
private IndicationDirection mIndicationDirection;
+ private boolean mScreenOnHintsEnabled;
public KeyguardIndicationController(Context context, KeyguardIndicationTextView textView,
LockIcon lockIcon) {
@@ -87,6 +88,7 @@ public class KeyguardIndicationController {
Resources res = context.getResources();
mSlowThreshold = res.getInteger(R.integer.config_chargingSlowlyThreshold);
mFastThreshold = res.getInteger(R.integer.config_chargingFastThreshold);
+ mScreenOnHintsEnabled = res.getBoolean(R.bool.config_showScreenOnLockScreenHints);
mBatteryInfo = IBatteryStats.Stub.asInterface(
@@ -189,8 +191,9 @@ public class KeyguardIndicationController {
final int color = computeColor();
mTextView.switchIndication(computeIndication());
mTextView.setTextColor(color);
- // pad the bottom using ic_empty_space to keep text vertically aligned
- int top = 0, bottom = R.drawable.ic_empty_space, left = 0, right = 0;
+ int top = 0, left = 0, right = 0;
+ // pad the bottom using ic_empty_space to keep text vertically aligned if needed
+ int bottom = mScreenOnHintsEnabled ? R.drawable.ic_empty_space : 0;
switch (mIndicationDirection) {
case UP:
top = R.drawable.ic_keyboard_arrow_up;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index ef4aedb..e4e02a7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -3071,7 +3071,7 @@ public class NotificationPanelView extends PanelView implements
return getSharedPreferenceBoolean(KEY_USER_RETURNED_FROM_LLS, false);
}
- private boolean shouldShowScreenOnHints() {
+ public boolean shouldShowScreenOnHints() {
return mScreenOnHintsEnabled && mStatusBar.isDeviceProvisioned() &&
mStatusBarState == StatusBarState.KEYGUARD;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 8f06328..7df8346 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -4796,7 +4796,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public void onUnlockHintStarted() {
mKeyguardIndicationController.showTransientIndication(R.string.keyguard_unlock,
- KeyguardIndicationController.IndicationDirection.UP);
+ mNotificationPanel.shouldShowScreenOnHints() ?
+ KeyguardIndicationController.IndicationDirection.UP :
+ KeyguardIndicationController.IndicationDirection.NONE);
}
public void onLlsHintStarted() {