Update text color of misalignment message

Bug: 154537324
Test: Manual test
Test: atest KeyguardIndicationControllerTest
Change-Id: Ie3f6e86fb24bd2e79b502d55af6ebcb0be77dea2
This commit is contained in:
Wilson Wu
2020-04-21 16:00:59 +08:00
parent 48c653a2c1
commit bb51d09d70
3 changed files with 6 additions and 3 deletions

View File

@@ -248,4 +248,7 @@
<color name="control_enabled_thermo_heat_background">@color/GM2_red_200</color>
<color name="control_enabled_thermo_cool_background">@color/GM2_blue_200</color>
<color name="control_enabled_default_background">@color/GM2_blue_200</color>
<!-- Docked misalignment message -->
<color name="misalignment_text_color">#F28B82</color>
</resources>

View File

@@ -311,7 +311,7 @@ public class KeyguardIndicationController implements StateListener,
mTextView.switchIndication(mTransientIndication);
} else if (!TextUtils.isEmpty(mAlignmentIndication)) {
mTextView.switchIndication(mAlignmentIndication);
mTextView.setTextColor(Utils.getColorError(mContext));
mTextView.setTextColor(mContext.getColor(R.color.misalignment_text_color));
} else if (mPowerPluggedIn) {
String indication = computePowerIndication();
if (animate) {

View File

@@ -193,7 +193,7 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
assertThat(mTextView.getText()).isEqualTo(
mContext.getResources().getString(R.string.dock_alignment_slow_charging));
assertThat(mTextView.getCurrentTextColor()).isEqualTo(
Utils.getColorError(mContext).getDefaultColor());
mContext.getColor(R.color.misalignment_text_color));
}
@Test
@@ -211,7 +211,7 @@ public class KeyguardIndicationControllerTest extends SysuiTestCase {
assertThat(mTextView.getText()).isEqualTo(
mContext.getResources().getString(R.string.dock_alignment_not_charging));
assertThat(mTextView.getCurrentTextColor()).isEqualTo(
Utils.getColorError(mContext).getDefaultColor());
mContext.getColor(R.color.misalignment_text_color));
}
@Test