Skip to content

Add phone option to limit lock-screen wake speech - #149

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

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

Conversation

@willbilec

@willbilec willbilec commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Adds Say only the items above at the end of Verbosity > Screen on and off > When the screen turns on, off by default. It limits automatic lock-screen UI speech to the selected time and status announcements while still restoring focus. The separate Say "Device unlocked" setting remains independent. The option is hidden and inactive on Wear OS.

Changes addressing the maintainer's review:

  • Suppression applies only while the device is locked and the relevant UI ownership is verified. It ends on unlock, first interaction, screen-off, an incoming call, or a three-second deadline. Unlocked home/app wakes speak normally.
  • Calls, alarms, timers, emergency alerts, notifications, other apps, and unknown announcement owners retain their feedback. The cell-broadcast exemption and Google's emergency-announcement comment are preserved.
  • System UI/keyguard packages come from Android's device configuration, with no Samsung, carrier, or clock-renderer package list. OEM-rendered clock events are checked against the actual node and window ownership; missing configuration allows speech.
  • Window checks follow the roles actually being announced. An unrelated disappearing source window cannot make a verified System UI title escape suppression, while mixed spoken windows and unknown/emergency pane titles remain audible.
  • Restored the original upstream focus helpers and signatures. The automatic focus check lives in Backtalk's service hook; the common compositor boundary also covers delayed raw selection/focus events. There is no global speech-controller mute.
  • Renamed and moved the switch, added Czech translations and translator comments, and kept only the two new UI strings in the scoped translation baseline.

Validation on the final PR branch, after bringing in current upstream:

  • testPhoneDebugUnitTest: 636 tests passed; :talkback:testWearDebugUnitTest: 378 tests passed.
  • :lintPhoneDebug: passed, with no remaining lint errors.
  • assemblePhoneDebug, assembleWearDebug, and git diff --check: passed.
  • Tests cover defaults/persistence, timeout/unlock/input cancellation, repeated wake signals, automatic focus paths, first navigation, selected status/unlock options, calls and emergency exclusions, alarm/timer and unknown window feedback, OEM configuration, cross-package clock rendering, and Wear exclusion.

Device evidence is separate from those automated results:

  • Galaxy S23 Plus: tested the verbose lock-screen behavior and collected event/node/window traces for the System UI and duplicate-clock regressions. Those paths have regression coverage.
  • Galaxy S5 running Lineage OS 20: I confirmed that disabling the option reads the last focused item, while enabling it reads only the items selected in the screen-on settings.
  • Timers were tested while the device was locked: when a timer goes off and turns the screen on, Backtalk still reads the timer result properly.

Pixel and other non-Samsung devices have not been tested. The Lineage OS result does not establish Pixel behavior. Physical Wear interaction was not tested.

The PR contains only the screen-on feature; return-focus work, local debug-app configuration, APKs, and contributor guidance are excluded.

@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.

@willbilec willbilec changed the title Add phone option to suppress extra screen-on speech Add phone option to limit lock-screen wake speech Oct 11, 2026
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