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

Commit 2d11fc59 authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

Ignore focus event for digits field

On app launch digits field may have a focus, and the focus event
makes tts speak both the app name and the type of the View in a row
"phone, edit box"). This change suppresses the second part and let
tts speak just the app name on launch ("phone").

Bug: 5275935
Change-Id: Ideb62b01104a1701c71ca7af0d6fa05d8cc39657
parent cea26c00
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ public class DigitsEditText extends EditText {
            // AsYouTypeFormatter frequently replaces digits with formatted ones, which makes
            // tts too verbose. Let's ignore the whole event.
            return;
        } else if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_FOCUSED) {
            // The parent EditText class lets tts read "edit box" when this View has a focus, which
            // confuses users on app launch (issue 5275935).
            return;
        }
        super.sendAccessibilityEventUnchecked(event);
    }