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

Commit 3ca8583f authored by Brad Hinegardner's avatar Brad Hinegardner
Browse files

Customize lock screen button dismissed too fast for a11y users

We should still let the accessibility manager decide how long the
timeout should be. To better reflect the type of popup this is, add
`AccessibilityManager.FLAG_CONTENT_CONTROLS` to the `uiContentFlags`.

This will increase the timeout for this button from 5s to ~10s.

Fixes: 318029165
Test: manual testing, enable talkback, activate long-press, observe longer timeout
Flag: NONE a11y fix
Change-Id: I6512af27fa9c5833fabf8e0dfcdc7262970a60be
parent ef81b387
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.view.accessibility.AccessibilityManager
import androidx.annotation.VisibleForTesting
import com.android.internal.logging.UiEvent
import com.android.internal.logging.UiEventLogger
import com.android.systemui.res.R
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
@@ -32,6 +31,7 @@ import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.data.repository.KeyguardRepository
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.res.R
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -206,7 +206,9 @@ constructor(
        return accessibilityManager
            .getRecommendedTimeoutMillis(
                DEFAULT_POPUP_AUTO_HIDE_TIMEOUT_MS.toInt(),
                AccessibilityManager.FLAG_CONTENT_ICONS or AccessibilityManager.FLAG_CONTENT_TEXT,
                AccessibilityManager.FLAG_CONTENT_ICONS or
                    AccessibilityManager.FLAG_CONTENT_TEXT or
                    AccessibilityManager.FLAG_CONTENT_CONTROLS,
            )
            .toLong()
    }