From adf1d57def006b06d383a99b52f12c7dd09852fa 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 - Don't show charging state alongside other hints Change-Id: Ib771c35610f712a1de34736e817bcfe616ac37d8 --- 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 | 12 ++---------- 4 files changed, 5 insertions(+), 13 deletions(-) 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 aa574c7d9f6..d06906bab08 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -71,7 +71,7 @@ phone hints. --> 80dp - 90dp + 40dp 2dp diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 9d44ece810a..aa3b0566bdc 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -826,7 +826,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 dd6a0f053f9..1c67f914105 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -447,15 +447,7 @@ public class KeyguardIndicationController implements StateListener, isError = mTransientTextIsError; } 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); - hideIndication = !mBatteryPresent; - } else { - mTextView.switchIndication(trustGrantedIndication); - } + mTextView.switchIndication(trustGrantedIndication); } else if (!TextUtils.isEmpty(mAlignmentIndication)) { mTextView.switchIndication(mAlignmentIndication); isError = true; @@ -475,7 +467,7 @@ public class KeyguardIndicationController implements StateListener, && !mKeyguardUpdateMonitor.getUserHasTrust(userId)) { mTextView.switchIndication(trustManagedIndication); } else { - mTextView.switchIndication(mRestingIndication); + mTextView.switchIndication(R.string.keyguard_unlock); } mTextView.setTextColor(isError ? Utils.getColorError(mContext) : mInitialTextColorState); -- 2.25.1