Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b318a72f authored by Shenqiu Zhang's avatar Shenqiu Zhang
Browse files

Remove alpha value from subtext to improve contrast ratio.

Bug: b/421111750
Fix: b/421111750
Flag: EXEMPT trivial bugfix
Test: manually verified on a device, atest com.android.systemui.media.dialog.MediaOutputAdapterScreenshotTest
Change-Id: I73b8224c5b9c441b2bbe5d2410e6bf60da440f55
parent 8c4f5b3f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="variable-title-small"
                android:alpha="@dimen/media_output_item_subtitle_alpha"
                android:maxLines="1"
                android:singleLine="true" />
        </LinearLayout>
+0 −1
Original line number Diff line number Diff line
@@ -1613,7 +1613,6 @@
    <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_subtitle_alpha" format="float" type="dimen">0.8</item>

    <!-- Distance that the full shade transition takes in order to complete by tapping on a button
         like "expand". -->
+3 −6
Original line number Diff line number Diff line
@@ -208,9 +208,6 @@ class MediaOutputAdapter(controller: MediaSwitchingController) :
                R.dimen.media_output_item_content_vertical_margin_active
            )

        private val mSubtitleAlpha =
            mContext.resources.getFloat(R.dimen.media_output_item_subtitle_alpha)

        private val mButtonRippleBackground =
            AppCompatResources.getDrawable(
                mContext,
@@ -374,7 +371,7 @@ class MediaOutputAdapter(controller: MediaSwitchingController) :
            } else {
                mSubTitleText.text = subtitle
                mSubTitleText.setTextColor(colorTheme.subtitleColor)
                mSubTitleText.alpha = mSubtitleAlpha * colorTheme.contentAlpha
                mSubTitleText.alpha = colorTheme.contentAlpha
                mSubTitleText.visibility = VISIBLE
            }
        }
@@ -603,8 +600,8 @@ class MediaOutputAdapter(controller: MediaSwitchingController) :
                } else {
                    R.string.accessibility_add_device_to_group_with_name
                }
            mGroupButton.contentDescription = mContext.getString(
                    resId, BidiFormatter.getInstance().unicodeWrap(device.name))
            mGroupButton.contentDescription =
                mContext.getString(resId, BidiFormatter.getInstance().unicodeWrap(device.name))
            mGroupButton.setImageResource(
                if (groupStatus.selected) {
                    R.drawable.ic_check_circle_filled