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

Commit 017c9d6e authored by Matt Pietal's avatar Matt Pietal
Browse files

Prevent double-click on PIN bouncer with talkback

The performClick action was sent twice when used with
talkbalk on all PIN bouncer views, which could result
in unexpected error messages shown to the user.

Fixes: 346932439
Test: manual - use talkback on all PIN/SIMPIN bouncers
Flag: com.android.systemui.sim_pin_talkback_fix_for_double_submit
Change-Id: I2657eb10eac167089f87abe19d9dddb1e791392b
parent b564eb41
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1197,3 +1197,13 @@ flag {
        purpose: PURPOSE_BUGFIX
   }
}

flag {
   name: "sim_pin_talkback_fix_for_double_submit"
   namespace: "systemui"
   description: "The SIM PIN entry screens show the wrong message due"
   bug: "346932439"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}
 No newline at end of file
+5 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import com.android.internal.util.LatencyTracker;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
import com.android.keyguard.domain.interactor.KeyguardKeyboardInteractor;
import com.android.systemui.Flags;
import com.android.systemui.classifier.FalsingCollector;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.res.R;
@@ -130,8 +131,11 @@ public abstract class KeyguardPinBasedInputViewController<T extends KeyguardPinB
                    verifyPasswordAndUnlock();
                }
            });

            if (!Flags.simPinTalkbackFixForDoubleSubmit()) {
                okButton.setOnHoverListener(mLiftToActivateListener);
            }
        }
        if (pinInputFieldStyledFocusState()) {
            collectFlow(mPasswordEntry, mKeyguardKeyboardInteractor.isAnyKeyboardConnected(),
                    this::setKeyboardBasedFocusOutline);