Skip to content

Add phone option to suppress extra screen-on speech - #149

Open
willbilec wants to merge 1 commit into
trypsynth:masterfrom
willbilec:codex/suppress-extra-screen-on-speech
Open

willbilec wants to merge 1 commit into
trypsynth:masterfrom
willbilec:codex/suppress-extra-screen-on-speech

Conversation

@willbilec

Copy link
Copy Markdown
Contributor

On my Samsung Galaxy S23 Plus, turning the screen on could produce a very verbose announcement: my carrier name, Extend Unlock, System UI, and then the last focused item. This PR adds an optional way to make screen-on speech simpler and less verbose.

Adds Suppress extra speech under Verbosity > Screen on and off > When the screen turns on, off by default. When enabled, automatic wake speech is limited to the selected time and status items. Focus still restores, and normal speech resumes with the first user interaction. If no screen-on items are selected, waking is silent. Notifications continue normally, and Say "Device unlocked" keeps its separate control.

This option is phone-only: it is hidden and inactive on Wear OS, including if an enabled preference is imported. The suppression uses wake state and accessibility event types rather than a carrier-name or device-model check. It also handles delayed System UI selection events that can bypass the usual event filter.

Device testing has only been performed on my Samsung Galaxy S23 Plus, where I confirmed that the extra wake speech is now suppressed. No devices other than Samsung have been tested, including Pixel devices; behavior there is unknown. Wear OS device interaction was not tested.

Validation on the isolated PR branch:

  • testPhoneDebugUnitTest: 602 tests passed.
  • :talkback:testWearDebugUnitTest: 356 tests passed, including checks that the option is hidden and inactive on Wear.
  • assemblePhoneDebug and assembleWearDebug: passed.
  • Tests cover the default and stored preference, wake-only suppression, selected status options, automatic focus feedback, delayed carrier selection events, first user navigation, and different carrier text/vendor window announcements.
  • :lintPhoneDebug: ran; fails with the same 153 existing MissingTranslation errors. Only the two new UI strings were added to the translation baseline; no other lint findings were baselined.
  • git diff --check: passed.

@trypsynth trypsynth left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, it's in the right place under Screen on and off, and off by default is right. The problem is how wide the silence is.

Must fix

  • It isn't limited to the lock screen, and it never times out. Suppression starts when the screen turns on and lasts until the first touch, gesture, key or navigation. So anything that turns the screen on by itself loses its window title and focus speech: the incoming call screen, alarms, timers and emergency alerts. After face unlock or Smart Lock, the home screen or app that appears is silent too. Please end suppression when the device unlocks, and after a short timeout as well.
  • Emergency alerts. The change in FocusManagerInternal removes Google's comment that cell broadcast is an emergency announcement and must not be muted, and the new early return true now mutes it. Please keep cell broadcast (and calls and alarms) out of this, and keep that comment.
  • Scope. Muting all window-change speech and focus events from every app is much wider than the S23 items you describe (carrier name, "Extend Unlock", "System UI", the last focused item). Limiting it to System UI and the lock screen would cover those without touching other apps.

Should fix

  • It edits 7 of Google's files, including a signature change to shouldMuteFeedbackForFocusedNode that ripples into its callers. The focus check could live in one Backtalk-owned place, such as the focus listener in TalkBackService, which keeps future TalkBack merges easier.
  • "Suppress extra speech" is hard to understand on its own. Something like "Say only the items above" is clearer, and the switch fits better at the end of the category than the top.
  • Please add Czech translations of the two strings to values-cs/strings_backtalk.xml, like the other screen-on strings.
  • It was tested on one Samsung phone, and the System UI checks are aimed at Samsung's behaviour, so a test on a Pixel or another phone would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants