Loading packages/SystemUI/src/com/android/systemui/qs/carrier/QSCarrier.java +8 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,14 @@ public class QSCarrier extends LinearLayout { com.android.settingslib.R.string.not_default_data_content_description)); } public void updateColors(ColorStateList colorStateList) { final boolean visible = !mIsSingleCarrier; if (visible) { mMobileRoaming.setImageTintList(colorStateList); mMobileSignal.setImageTintList(colorStateList); } } @VisibleForTesting View getRSSIView() { return mMobileGroup; Loading packages/SystemUI/src/com/android/systemui/qs/carrier/QSCarrierGroup.java +16 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,11 @@ package com.android.systemui.qs.carrier; import android.annotation.StyleRes; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; Loading Loading @@ -58,6 +61,19 @@ public class QSCarrierGroup extends LinearLayout { return findViewById(R.id.qs_carrier_divider2); } public void updateColors(int color, ColorStateList colorStateList) { getNoSimTextView().setTextColor(color); QSCarrier[] qsCarriers = { getCarrier1View(), getCarrier2View(), getCarrier3View() }; for (QSCarrier qsCarrier : qsCarriers) { for (int i = 0; i < qsCarrier.getChildCount(); i++) { qsCarrier.updateColors(colorStateList); if (qsCarrier.getChildAt(i) instanceof TextView) { ((TextView) qsCarrier.getChildAt(i)).setTextColor(color); } } } } public void updateTextAppearance(@StyleRes int resId) { FontSizeUtils.updateFontSizeFromStyle(getNoSimTextView(), resId); getCarrier1View().updateTextAppearance(resId); Loading packages/SystemUI/src/com/android/systemui/shade/LargeScreenShadeHeaderController.kt +27 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,11 @@ package com.android.systemui.shade import android.annotation.IdRes import android.app.StatusBarManager import android.content.Context import android.content.res.ColorStateList import android.content.res.Configuration import android.os.Bundle import android.graphics.Color import android.os.Trace import android.os.Trace.TRACE_TAG_APP import android.util.Pair Loading Loading @@ -84,6 +87,7 @@ class LargeScreenShadeHeaderController @Inject constructor( private val privacyIconsController: HeaderPrivacyIconsController, private val insetsProvider: StatusBarContentInsetsProvider, private val configurationController: ConfigurationController, private val context: Context, private val variableDateViewControllerFactory: VariableDateViewController.Factory, @Named(LARGE_SCREEN_BATTERY_CONTROLLER) private val batteryMeterViewController: BatteryMeterViewController, Loading Loading @@ -133,6 +137,7 @@ class LargeScreenShadeHeaderController @Inject constructor( private var cutoutRight = 0 private var roundedCorners = 0 private var lastInsets: WindowInsets? = null private var textColorPrimary = Color.TRANSPARENT private var qsDisabled = false private var visible = false Loading Loading @@ -259,6 +264,10 @@ class LargeScreenShadeHeaderController @Inject constructor( } updateResources() } override fun onUiModeChanged() { updateResources() } } override fun onInit() { Loading Loading @@ -304,6 +313,7 @@ class LargeScreenShadeHeaderController @Inject constructor( updateVisibility() updateTransition() updateResources() } override fun onViewDetached() { Loading Loading @@ -480,6 +490,23 @@ class LargeScreenShadeHeaderController @Inject constructor( val padding = resources.getDimensionPixelSize(R.dimen.qs_panel_padding) header.setPadding(padding, header.paddingTop, padding, header.paddingBottom) updateQQSPaddings() val fillColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) iconManager.setTint(fillColor) val textColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) val colorStateList = Utils.getColorAttr(context, android.R.attr.textColorPrimary) if (textColor != textColorPrimary) { val textColorSecondary = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary) textColorPrimary = textColor if (iconManager != null) { iconManager.setTint(textColor) } clock.setTextColor(textColorPrimary) date.setTextColor(textColorPrimary) qsCarrierGroup.updateColors(textColorPrimary, colorStateList) batteryIcon.updateColors(textColorPrimary, textColorSecondary, textColorPrimary) } } private fun updateQQSPaddings() { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/carrier/QSCarrier.java +8 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,14 @@ public class QSCarrier extends LinearLayout { com.android.settingslib.R.string.not_default_data_content_description)); } public void updateColors(ColorStateList colorStateList) { final boolean visible = !mIsSingleCarrier; if (visible) { mMobileRoaming.setImageTintList(colorStateList); mMobileSignal.setImageTintList(colorStateList); } } @VisibleForTesting View getRSSIView() { return mMobileGroup; Loading
packages/SystemUI/src/com/android/systemui/qs/carrier/QSCarrierGroup.java +16 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,11 @@ package com.android.systemui.qs.carrier; import android.annotation.StyleRes; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; Loading Loading @@ -58,6 +61,19 @@ public class QSCarrierGroup extends LinearLayout { return findViewById(R.id.qs_carrier_divider2); } public void updateColors(int color, ColorStateList colorStateList) { getNoSimTextView().setTextColor(color); QSCarrier[] qsCarriers = { getCarrier1View(), getCarrier2View(), getCarrier3View() }; for (QSCarrier qsCarrier : qsCarriers) { for (int i = 0; i < qsCarrier.getChildCount(); i++) { qsCarrier.updateColors(colorStateList); if (qsCarrier.getChildAt(i) instanceof TextView) { ((TextView) qsCarrier.getChildAt(i)).setTextColor(color); } } } } public void updateTextAppearance(@StyleRes int resId) { FontSizeUtils.updateFontSizeFromStyle(getNoSimTextView(), resId); getCarrier1View().updateTextAppearance(resId); Loading
packages/SystemUI/src/com/android/systemui/shade/LargeScreenShadeHeaderController.kt +27 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,11 @@ package com.android.systemui.shade import android.annotation.IdRes import android.app.StatusBarManager import android.content.Context import android.content.res.ColorStateList import android.content.res.Configuration import android.os.Bundle import android.graphics.Color import android.os.Trace import android.os.Trace.TRACE_TAG_APP import android.util.Pair Loading Loading @@ -84,6 +87,7 @@ class LargeScreenShadeHeaderController @Inject constructor( private val privacyIconsController: HeaderPrivacyIconsController, private val insetsProvider: StatusBarContentInsetsProvider, private val configurationController: ConfigurationController, private val context: Context, private val variableDateViewControllerFactory: VariableDateViewController.Factory, @Named(LARGE_SCREEN_BATTERY_CONTROLLER) private val batteryMeterViewController: BatteryMeterViewController, Loading Loading @@ -133,6 +137,7 @@ class LargeScreenShadeHeaderController @Inject constructor( private var cutoutRight = 0 private var roundedCorners = 0 private var lastInsets: WindowInsets? = null private var textColorPrimary = Color.TRANSPARENT private var qsDisabled = false private var visible = false Loading Loading @@ -259,6 +264,10 @@ class LargeScreenShadeHeaderController @Inject constructor( } updateResources() } override fun onUiModeChanged() { updateResources() } } override fun onInit() { Loading Loading @@ -304,6 +313,7 @@ class LargeScreenShadeHeaderController @Inject constructor( updateVisibility() updateTransition() updateResources() } override fun onViewDetached() { Loading Loading @@ -480,6 +490,23 @@ class LargeScreenShadeHeaderController @Inject constructor( val padding = resources.getDimensionPixelSize(R.dimen.qs_panel_padding) header.setPadding(padding, header.paddingTop, padding, header.paddingBottom) updateQQSPaddings() val fillColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) iconManager.setTint(fillColor) val textColor = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary) val colorStateList = Utils.getColorAttr(context, android.R.attr.textColorPrimary) if (textColor != textColorPrimary) { val textColorSecondary = Utils.getColorAttrDefaultColor(context, android.R.attr.textColorSecondary) textColorPrimary = textColor if (iconManager != null) { iconManager.setTint(textColor) } clock.setTextColor(textColorPrimary) date.setTextColor(textColorPrimary) qsCarrierGroup.updateColors(textColorPrimary, colorStateList) batteryIcon.updateColors(textColorPrimary, textColorSecondary, textColorPrimary) } } private fun updateQQSPaddings() { Loading