Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +15 −18 Original line number Diff line number Diff line Loading @@ -126,12 +126,12 @@ constructor( private val overlayColorActive = Utils.applyAlpha( /* alpha= */ 0.11f, Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive) Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive), ) private val overlayColorInactive = Utils.applyAlpha( /* alpha= */ 0.08f, Utils.getColorAttrDefaultColor(context, R.attr.onShadeInactive) Utils.getColorAttrDefaultColor(context, R.attr.onShadeInactive), ) private val colorLabelActive = Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive) Loading Loading @@ -188,10 +188,7 @@ constructor( private var lastState = INVALID private var lastIconTint = 0 private val launchableViewDelegate = LaunchableViewDelegate( this, superSetVisibility = { super.setVisibility(it) }, ) LaunchableViewDelegate(this, superSetVisibility = { super.setVisibility(it) }) private var lastDisabledByPolicy = false private val locInScreen = IntArray(2) Loading Loading @@ -418,7 +415,7 @@ constructor( initLongPressEffectCallback() init( { _: View -> longPressEffect.onTileClick() }, null, // Haptics and long-clicks will be handled by the [QSLongPressEffect] { _: View -> true }, // Haptics and long-clicks are handled by [QSLongPressEffect] ) } else { val expandable = Expandable.fromView(this) Loading Loading @@ -583,7 +580,7 @@ constructor( AccessibilityNodeInfo.AccessibilityAction.ACTION_CLICK.id, resources.getString( R.string.accessibility_tile_disabled_by_policy_action_description ) ), ) ) } else { Loading @@ -591,7 +588,7 @@ constructor( info.addAction( AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.id, resources.getString(R.string.accessibility_long_click_tile) resources.getString(R.string.accessibility_long_click_tile), ) ) } Loading Loading @@ -716,35 +713,35 @@ constructor( state.spec, state.state, state.disabledByPolicy, getBackgroundColorForState(state.state, state.disabledByPolicy) getBackgroundColorForState(state.state, state.disabledByPolicy), ) if (allowAnimations) { singleAnimator.setValues( colorValuesHolder( BACKGROUND_NAME, backgroundColor, getBackgroundColorForState(state.state, state.disabledByPolicy) getBackgroundColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( LABEL_NAME, label.currentTextColor, getLabelColorForState(state.state, state.disabledByPolicy) getLabelColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( SECONDARY_LABEL_NAME, secondaryLabel.currentTextColor, getSecondaryLabelColorForState(state.state, state.disabledByPolicy) getSecondaryLabelColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( CHEVRON_NAME, chevronView.imageTintList?.defaultColor ?: 0, getChevronColorForState(state.state, state.disabledByPolicy) getChevronColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( OVERLAY_NAME, backgroundOverlayColor, getOverlayColorForState(state.state) ) getOverlayColorForState(state.state), ), ) singleAnimator.start() } else { Loading @@ -753,7 +750,7 @@ constructor( getLabelColorForState(state.state, state.disabledByPolicy), getSecondaryLabelColorForState(state.state, state.disabledByPolicy), getChevronColorForState(state.state, state.disabledByPolicy), getOverlayColorForState(state.state) getOverlayColorForState(state.state), ) } } Loading Loading @@ -1077,7 +1074,7 @@ constructor( backgroundColor, label.currentTextColor, secondaryLabel.currentTextColor, chevronView.imageTintList?.defaultColor ?: 0 chevronView.imageTintList?.defaultColor ?: 0, ) inner class StateChangeRunnable(private val state: QSTile.State) : Runnable { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +15 −18 Original line number Diff line number Diff line Loading @@ -126,12 +126,12 @@ constructor( private val overlayColorActive = Utils.applyAlpha( /* alpha= */ 0.11f, Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive) Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive), ) private val overlayColorInactive = Utils.applyAlpha( /* alpha= */ 0.08f, Utils.getColorAttrDefaultColor(context, R.attr.onShadeInactive) Utils.getColorAttrDefaultColor(context, R.attr.onShadeInactive), ) private val colorLabelActive = Utils.getColorAttrDefaultColor(context, R.attr.onShadeActive) Loading Loading @@ -188,10 +188,7 @@ constructor( private var lastState = INVALID private var lastIconTint = 0 private val launchableViewDelegate = LaunchableViewDelegate( this, superSetVisibility = { super.setVisibility(it) }, ) LaunchableViewDelegate(this, superSetVisibility = { super.setVisibility(it) }) private var lastDisabledByPolicy = false private val locInScreen = IntArray(2) Loading Loading @@ -418,7 +415,7 @@ constructor( initLongPressEffectCallback() init( { _: View -> longPressEffect.onTileClick() }, null, // Haptics and long-clicks will be handled by the [QSLongPressEffect] { _: View -> true }, // Haptics and long-clicks are handled by [QSLongPressEffect] ) } else { val expandable = Expandable.fromView(this) Loading Loading @@ -583,7 +580,7 @@ constructor( AccessibilityNodeInfo.AccessibilityAction.ACTION_CLICK.id, resources.getString( R.string.accessibility_tile_disabled_by_policy_action_description ) ), ) ) } else { Loading @@ -591,7 +588,7 @@ constructor( info.addAction( AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.id, resources.getString(R.string.accessibility_long_click_tile) resources.getString(R.string.accessibility_long_click_tile), ) ) } Loading Loading @@ -716,35 +713,35 @@ constructor( state.spec, state.state, state.disabledByPolicy, getBackgroundColorForState(state.state, state.disabledByPolicy) getBackgroundColorForState(state.state, state.disabledByPolicy), ) if (allowAnimations) { singleAnimator.setValues( colorValuesHolder( BACKGROUND_NAME, backgroundColor, getBackgroundColorForState(state.state, state.disabledByPolicy) getBackgroundColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( LABEL_NAME, label.currentTextColor, getLabelColorForState(state.state, state.disabledByPolicy) getLabelColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( SECONDARY_LABEL_NAME, secondaryLabel.currentTextColor, getSecondaryLabelColorForState(state.state, state.disabledByPolicy) getSecondaryLabelColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( CHEVRON_NAME, chevronView.imageTintList?.defaultColor ?: 0, getChevronColorForState(state.state, state.disabledByPolicy) getChevronColorForState(state.state, state.disabledByPolicy), ), colorValuesHolder( OVERLAY_NAME, backgroundOverlayColor, getOverlayColorForState(state.state) ) getOverlayColorForState(state.state), ), ) singleAnimator.start() } else { Loading @@ -753,7 +750,7 @@ constructor( getLabelColorForState(state.state, state.disabledByPolicy), getSecondaryLabelColorForState(state.state, state.disabledByPolicy), getChevronColorForState(state.state, state.disabledByPolicy), getOverlayColorForState(state.state) getOverlayColorForState(state.state), ) } } Loading Loading @@ -1077,7 +1074,7 @@ constructor( backgroundColor, label.currentTextColor, secondaryLabel.currentTextColor, chevronView.imageTintList?.defaultColor ?: 0 chevronView.imageTintList?.defaultColor ?: 0, ) inner class StateChangeRunnable(private val state: QSTile.State) : Runnable { Loading