From d9af6311e9cf84d065dd977fecd5547ea92a4d26 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 23 Mar 2020 17:30:15 -0700 Subject: [PATCH] Avoid duplicate text on keyguard indication It's possible that the transient indication will say "Charged" and the power indication will be the same. In those cases they should not be on top of each other. Test: plug device, press power to wake-up Fixes: 151181410 Change-Id: I15a6ab799a655ef84e7c8d5229b2d9cf4d8597fc --- .../systemui/statusbar/KeyguardIndicationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index b906442b6ba08..bb0fa2d2c7cb7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -340,7 +340,7 @@ public class KeyguardIndicationController implements StateListener, mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked); mTextView.setTextColor(mInitialTextColorState); } else if (!TextUtils.isEmpty(mTransientIndication)) { - if (powerIndication != null) { + if (powerIndication != null && !mTransientIndication.equals(powerIndication)) { String indication = mContext.getResources().getString( R.string.keyguard_indication_trust_unlocked_plugged_in, mTransientIndication, powerIndication);