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

Commit 055bea30 authored by Behnam Heydarshahi's avatar Behnam Heydarshahi
Browse files

Fix tile not clickable by TalkBack and VoiceAccess

The tiles that supported long-press would not react to single press
(double-tap) when accessibility modes were enabled. The issue was
limited to Switch tiles (not the dialog openers). And it only
manifests when quickSettingsVisualHapticsLongPress is enabled.

Bug: b/385997412
Flag: EXEMPT bugfix
Test: Manual. Turn on TalkBack or VoiceAccess. Flip AirplaneTile state twice.
Change-Id: Iaa6f0372e30d4bcaa322ae018b2f419fca56ec6a
parent d5ea09ee
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -784,7 +784,11 @@ constructor(

    private fun updateLongPressEffect(handlesLongClick: Boolean) {
        // The long press effect in the tile can't be updated if it is still running
        if (longPressEffect?.state != QSLongPressEffect.State.IDLE) return
        if (
            longPressEffect?.state != QSLongPressEffect.State.IDLE &&
                longPressEffect?.state != QSLongPressEffect.State.CLICKED
        )
            return

        longPressEffect.qsTile?.state?.handlesLongClick = handlesLongClick
        if (handlesLongClick && longPressEffect.initializeEffect(longPressEffectDuration)) {