From 5567b8938bccd2bad7eb9b3f8dbd2962b1f5ddd6 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 16 Apr 2020 14:05:35 -0700 Subject: [PATCH] Make alignment indication red again Test: atest KeyguardIndicationControllerTest Fixes: 154258966 Change-Id: Ia94a31046cb64c1d93c70b53a9367f80ea689594 --- .../systemui/statusbar/KeyguardIndicationController.java | 1 + .../statusbar/KeyguardIndicationControllerTest.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 5475812b55630..11b54ad19636c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -311,6 +311,7 @@ public class KeyguardIndicationController implements StateListener, mTextView.switchIndication(mTransientIndication); } else if (!TextUtils.isEmpty(mAlignmentIndication)) { mTextView.switchIndication(mAlignmentIndication); + mTextView.setTextColor(Utils.getColorError(mContext)); } else if (mPowerPluggedIn) { String indication = computePowerIndication(); if (animate) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java index be5b190b54a56..fb401778d891c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java @@ -192,7 +192,8 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase { assertThat(mTextView.getText()).isEqualTo( mContext.getResources().getString(R.string.dock_alignment_slow_charging)); - assertThat(mTextView.getCurrentTextColor()).isEqualTo(Color.WHITE); + assertThat(mTextView.getCurrentTextColor()).isEqualTo( + Utils.getColorError(mContext).getDefaultColor()); } @Test @@ -209,7 +210,8 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase { assertThat(mTextView.getText()).isEqualTo( mContext.getResources().getString(R.string.dock_alignment_not_charging)); - assertThat(mTextView.getCurrentTextColor()).isEqualTo(Color.WHITE); + assertThat(mTextView.getCurrentTextColor()).isEqualTo( + Utils.getColorError(mContext).getDefaultColor()); } @Test