Skip to content
Snippets Groups Projects
Commit cf7c082e authored by Dhina17's avatar Dhina17
Browse files

SystemUI: Update QS carrier text color on theme change

- Fixes QS carrier text color after QPR2

Change-Id: I2948c0aee21aff5c61b6a9bff26d2e5f7612db19
parent 56ad23f7
No related branches found
No related tags found
No related merge requests found
...@@ -152,12 +152,15 @@ public class ShadeCarrier extends LinearLayout { ...@@ -152,12 +152,15 @@ public class ShadeCarrier extends LinearLayout {
com.android.settingslib.R.string.not_default_data_content_description)); com.android.settingslib.R.string.not_default_data_content_description));
} }
public void updateColors(ColorStateList colorStateList) { public void updateColors(int color, ColorStateList colorStateList) {
final boolean visible = !mIsSingleCarrier; final boolean visible = !mIsSingleCarrier;
if (visible) { if (visible) {
mMobileRoaming.setImageTintList(colorStateList); mMobileRoaming.setImageTintList(colorStateList);
mMobileSignal.setImageTintList(colorStateList); mMobileSignal.setImageTintList(colorStateList);
} }
if (mModernMobileView != null) {
mModernMobileView.updateTextColor(color);
}
} }
@VisibleForTesting @VisibleForTesting
......
...@@ -66,7 +66,7 @@ public class ShadeCarrierGroup extends LinearLayout { ...@@ -66,7 +66,7 @@ public class ShadeCarrierGroup extends LinearLayout {
ShadeCarrier[] shadeCarriers = { getCarrier1View(), getCarrier2View(), getCarrier3View() }; ShadeCarrier[] shadeCarriers = { getCarrier1View(), getCarrier2View(), getCarrier3View() };
for (ShadeCarrier shadeCarrier : shadeCarriers) { for (ShadeCarrier shadeCarrier : shadeCarriers) {
for (int i = 0; i < shadeCarrier.getChildCount(); i++) { for (int i = 0; i < shadeCarrier.getChildCount(); i++) {
shadeCarrier.updateColors(colorStateList); shadeCarrier.updateColors(color, colorStateList);
if (shadeCarrier.getChildAt(i) instanceof TextView) { if (shadeCarrier.getChildAt(i) instanceof TextView) {
((TextView) shadeCarrier.getChildAt(i)).setTextColor(color); ((TextView) shadeCarrier.getChildAt(i)).setTextColor(color);
} }
......
...@@ -45,6 +45,10 @@ class ModernShadeCarrierGroupMobileView( ...@@ -45,6 +45,10 @@ class ModernShadeCarrierGroupMobileView(
"viewString=${super.toString()}" "viewString=${super.toString()}"
} }
public fun updateTextColor(color: Int) {
requireViewById<AutoMarqueeTextView>(R.id.mobile_carrier_text).setTextColor(color)
}
companion object { companion object {
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment