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

Commit f0ee9f1e authored by Pat Manning's avatar Pat Manning
Browse files

Add content description to OOBE tutorial animation.

Fix: 381487485
Test: Manual. Talkback.
Flag: EXEMPT Bugfix.
Change-Id: I1bec9193d99e1a73e553d703d2d7d489227dacc2
parent d3944197
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3949,6 +3949,8 @@
    <string name="tutorial_action_key_success_title">Well done!</string>
    <!-- Text shown to the user after they complete action key tutorial [CHAR LIMIT=NONE] -->
    <string name="tutorial_action_key_success_body">You completed the view all apps gesture</string>
    <!-- Content description for the animation playing during the tutorial. The user can click the animation to pause and unpause playback. [CHAR LIMIT=NONE] -->
    <string name="tutorial_animation_content_description">Tutorial animation, click to pause and resume play.</string>

    <!-- Content description for keyboard backlight brightness dialog [CHAR LIMIT=NONE] -->
    <string name="keyboard_backlight_dialog_title">Keyboard backlight</string>
+9 −1
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.Ref
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.util.lerp
import com.airbnb.lottie.LottieComposition
import com.airbnb.lottie.compose.LottieAnimation
@@ -47,6 +50,7 @@ import com.airbnb.lottie.compose.rememberLottieComposition
import com.android.systemui.inputdevice.tutorial.ui.composable.TutorialActionState.Finished
import com.android.systemui.inputdevice.tutorial.ui.composable.TutorialActionState.InProgress
import com.android.systemui.inputdevice.tutorial.ui.composable.TutorialActionState.NotStarted
import com.android.systemui.res.R

@Composable
fun TutorialAnimation(
@@ -104,11 +108,15 @@ private fun EducationAnimation(
            isPlaying = isPlaying,
            restartOnPlay = false,
        )
    val animationDescription = stringResource(R.string.tutorial_animation_content_description)
    LottieAnimation(
        composition = composition,
        progress = { progress },
        dynamicProperties = animationProperties,
        modifier = Modifier.fillMaxSize().clickable { isPlaying = !isPlaying },
        modifier =
            Modifier.fillMaxSize()
                .clickable { isPlaying = !isPlaying }
                .semantics { contentDescription = animationDescription },
    )
}