From 050effb33aa01822945cf98e0d53af8c3bcd8e03 Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sat, 2 Nov 2019 08:31:36 +0000 Subject: [PATCH] Keyguard: Refine indication text - Always show "Swipe up to unlock" hint - Put the text in-line with bottom shortcuts - Fix font size inconsistency on reboot - Don't show charging state below lock status message (https://github.com/LineageOS/android_frameworks_base/commit/85e5a5768731d98a56982ee1b9a1b5cc86fb76f0) Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8 --- packages/SystemUI/res-keyguard/values/styles.xml | 2 +- packages/SystemUI/res/values-sw600dp-land/dimens.xml | 2 +- packages/SystemUI/res/values-sw600dp/dimens.xml | 2 +- packages/SystemUI/res/values/dimens.xml | 2 +- .../statusbar/KeyguardIndicationController.java | 11 ++--------- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml index fc8d0f7392f..63c1ab0a109 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml @@ -121,7 +121,7 @@ diff --git a/packages/SystemUI/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml index f2df4b9023b..7719a0ae0ba 100644 --- a/packages/SystemUI/res/values-sw600dp-land/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml @@ -18,7 +18,7 @@ 36dp - 80dp + 40dp 490dp diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index 89341838f3e..065aa4107c8 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -65,7 +65,7 @@ phone hints. --> 80dp - 90dp + 40dp 2dp diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index ef4a8d524ee..566df2853b9 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -765,7 +765,7 @@ 0dp 20dp - 40dp + 20dp 12sp diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 0644a0ff737..289a875704d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -432,14 +432,7 @@ public class KeyguardIndicationController implements StateListener, mTextView.setTextColor(mTransientTextColorState); } else if (!TextUtils.isEmpty(trustGrantedIndication) && mKeyguardUpdateMonitor.getUserHasTrust(userId)) { - if (powerIndication != null) { - String indication = mContext.getResources().getString( - R.string.keyguard_indication_trust_unlocked_plugged_in, - trustGrantedIndication, powerIndication); - mTextView.switchIndication(indication); - } else { - mTextView.switchIndication(trustGrantedIndication); - } + mTextView.switchIndication(trustGrantedIndication); mTextView.setTextColor(mInitialTextColorState); } else if (!TextUtils.isEmpty(mAlignmentIndication)) { mTextView.switchIndication(mAlignmentIndication); @@ -460,7 +453,7 @@ public class KeyguardIndicationController implements StateListener, mTextView.switchIndication(trustManagedIndication); mTextView.setTextColor(mInitialTextColorState); } else { - mTextView.switchIndication(mRestingIndication); + mTextView.switchIndication(R.string.keyguard_unlock); mTextView.setTextColor(mInitialTextColorState); } } -- 2.17.1