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

Commit 28b091c6 authored by Caitlin Cassidy's avatar Caitlin Cassidy Committed by Android (Google) Code Review
Browse files

Merge "[Ongoing Call Chip] Improve accessibility." into sc-dev

parents fa67b59b 47e53c9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
    android:background="@drawable/ongoing_call_chip_bg"
    android:paddingStart="@dimen/ongoing_call_chip_side_padding"
    android:paddingEnd="@dimen/ongoing_call_chip_side_padding"
    android:contentDescription="@string/ongoing_phone_call_content_description"
>

    <ImageView
+2 −0
Original line number Diff line number Diff line
@@ -2968,4 +2968,6 @@
    <!-- Message shown to suggest authentication using [CHAR LIMIT=60]-->
    <string name="keyguard_try_fingerprint">Use fingerprint to open</string>

    <!-- Content description for a chip in the status bar showing that the user is currently on a phone call. [CHAR LIMIT=NONE] -->
    <string name="ongoing_phone_call_content_description">Ongoing phone call</string>
</resources>
+4 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ class OngoingCallChronometer @JvmOverloads constructor(
        // call starts.
        minimumTextWidth = 0
        shouldHideText = false
        visibility = VISIBLE
        super.setBase(base)
    }

@@ -76,6 +77,9 @@ class OngoingCallChronometer @JvmOverloads constructor(

        if (desiredTextWidth > enforcedTextWidth) {
            shouldHideText = true
            // Changing visibility ensures that the content description is not read aloud when the
            // time isn't displayed.
            visibility = GONE
            setMeasuredDimension(0, 0)
        } else {
            // It's possible that the current text could fit in a smaller width, but we don't want