AccessibilityManager

Interface
Common
@JvmDefaultWithCompatibility
interface AccessibilityManager

Interface for managing accessibility.

Functions

fun calculateRecommendedTimeoutMillis(
        originalTimeoutMillis: Long,
        containsIcons: Boolean = false,
        containsText: Boolean = false,
        containsControls: Boolean = false,
    ): Long

Calculate the recommended timeout for changes to the UI needed by this user. Controls should remain on the screen for at least this long to give users time to react. Some users may need extra time to review the controls, or to reach them, or to activate assistive technology to activate the controls automatically.

Use the boolean parameters to indicate contents of UI. For example, set containsIcons and containsText to true for message notification which contains icons and text, or set containsText and containsControls to true for button dialog which contains text and button controls.

Parameters

originalTimeoutMillis The timeout appropriate for users with no accessibility needs in milliseconds.
containsIcons The contents of UI contain icons.
containsText The contents of UI contain text.
containsControls The contents of UI contain controls.

Returns

The recommended UI timeout for the current user in milliseconds.