Loading packages/SystemUI/res/values-night/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ <!-- Height of the background gradient behind the screenshot UI (taller in dark mode) --> <dimen name="screenshot_bg_protection_height">375dp</dimen> <!-- Output switcher panel related dimensions --> <item name="media_output_item_disabled_alpha" format="float" type="dimen">0.5</item> <!-- Accessibility floating menu --> <dimen name="accessibility_floating_menu_stroke_width">1dp</dimen> <dimen name="accessibility_floating_menu_stroke_inset">-2dp</dimen> Loading packages/SystemUI/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1649,6 +1649,7 @@ <dimen name="media_output_item_icon_padding">12dp</dimen> <dimen name="media_output_item_expand_icon_width">28dp</dimen> <dimen name="media_output_item_expand_icon_height">20dp</dimen> <item name="media_output_item_disabled_alpha" format="float" type="dimen">0.6</item> <!-- Distance that the full shade transition takes in order to complete by tapping on a button like "expand". --> Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.kt +6 −5 Original line number Diff line number Diff line Loading @@ -166,6 +166,9 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : R.dimen.media_output_item_content_vertical_margin_active ) private val mDisabledContentAlpha = mContext.resources.getFloat(R.dimen.media_output_item_disabled_alpha) private val mButtonRippleBackground = AppCompatResources.getDrawable( mContext, Loading Loading @@ -212,8 +215,8 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : deviceStatusIcon: Drawable?, ) { val fixedVolumeConnected = connectionState == CONNECTED && restrictVolumeAdjustment val colorTheme = ColorTheme(fixedVolumeConnected, deviceDisabled) val contentAlpha = if (deviceDisabled) mDisabledContentAlpha else DEVICE_ACTIVE_ALPHA val colorTheme = ColorTheme(fixedVolumeConnected, contentAlpha) updateItemBackground() updateTitle(device.name, connectionState, colorTheme) updateTitleIcon(device, connectionState, restrictVolumeAdjustment, colorTheme) Loading Loading @@ -663,7 +666,7 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : private inner class ColorTheme( isConnectedWithFixedVolume: Boolean = false, deviceDisabled: Boolean = false, val contentAlpha: Float = DEVICE_ACTIVE_ALPHA, ) { private val colorScheme: MediaOutputColorScheme = mController.colorScheme Loading Loading @@ -696,12 +699,10 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : val sliderInactiveColor = colorScheme.getSecondaryContainer() val sliderInactiveIconColor = colorScheme.getOnSurface() val containerRestrictedVolumeBackground = colorScheme.getPrimary() val contentAlpha = if (deviceDisabled) DEVICE_DISABLED_ALPHA else DEVICE_ACTIVE_ALPHA } companion object { private const val TAG = "MediaOutputAdapter" private const val DEVICE_DISABLED_ALPHA = 0.5f private const val DEVICE_ACTIVE_ALPHA = 1f private const val NO_VOLUME_SET = -1 } Loading Loading
packages/SystemUI/res/values-night/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ <!-- Height of the background gradient behind the screenshot UI (taller in dark mode) --> <dimen name="screenshot_bg_protection_height">375dp</dimen> <!-- Output switcher panel related dimensions --> <item name="media_output_item_disabled_alpha" format="float" type="dimen">0.5</item> <!-- Accessibility floating menu --> <dimen name="accessibility_floating_menu_stroke_width">1dp</dimen> <dimen name="accessibility_floating_menu_stroke_inset">-2dp</dimen> Loading
packages/SystemUI/res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1649,6 +1649,7 @@ <dimen name="media_output_item_icon_padding">12dp</dimen> <dimen name="media_output_item_expand_icon_width">28dp</dimen> <dimen name="media_output_item_expand_icon_height">20dp</dimen> <item name="media_output_item_disabled_alpha" format="float" type="dimen">0.6</item> <!-- Distance that the full shade transition takes in order to complete by tapping on a button like "expand". --> Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.kt +6 −5 Original line number Diff line number Diff line Loading @@ -166,6 +166,9 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : R.dimen.media_output_item_content_vertical_margin_active ) private val mDisabledContentAlpha = mContext.resources.getFloat(R.dimen.media_output_item_disabled_alpha) private val mButtonRippleBackground = AppCompatResources.getDrawable( mContext, Loading Loading @@ -212,8 +215,8 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : deviceStatusIcon: Drawable?, ) { val fixedVolumeConnected = connectionState == CONNECTED && restrictVolumeAdjustment val colorTheme = ColorTheme(fixedVolumeConnected, deviceDisabled) val contentAlpha = if (deviceDisabled) mDisabledContentAlpha else DEVICE_ACTIVE_ALPHA val colorTheme = ColorTheme(fixedVolumeConnected, contentAlpha) updateItemBackground() updateTitle(device.name, connectionState, colorTheme) updateTitleIcon(device, connectionState, restrictVolumeAdjustment, colorTheme) Loading Loading @@ -663,7 +666,7 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : private inner class ColorTheme( isConnectedWithFixedVolume: Boolean = false, deviceDisabled: Boolean = false, val contentAlpha: Float = DEVICE_ACTIVE_ALPHA, ) { private val colorScheme: MediaOutputColorScheme = mController.colorScheme Loading Loading @@ -696,12 +699,10 @@ class MediaOutputAdapter(controller: MediaSwitchingController) : val sliderInactiveColor = colorScheme.getSecondaryContainer() val sliderInactiveIconColor = colorScheme.getOnSurface() val containerRestrictedVolumeBackground = colorScheme.getPrimary() val contentAlpha = if (deviceDisabled) DEVICE_DISABLED_ALPHA else DEVICE_ACTIVE_ALPHA } companion object { private const val TAG = "MediaOutputAdapter" private const val DEVICE_DISABLED_ALPHA = 0.5f private const val DEVICE_ACTIVE_ALPHA = 1f private const val NO_VOLUME_SET = -1 } Loading