(android) Block pointer events from falling through the screen-lock overlay#812
Open
PeterXMR wants to merge 1 commit into
Open
(android) Block pointer events from falling through the screen-lock overlay#812PeterXMR wants to merge 1 commit into
PeterXMR wants to merge 1 commit into
Conversation
…verlay When the wallet is locked and showing "Unlock to continue", pointer events in empty regions of the lock overlay could reach interactive elements drawn on the destination underneath. The original report (ACINQ#733) describes opening the "Add a custom description to this payment" sheet through the lock screen. Wrap the lock-prompt content in a Box whose pointerInput consumes any pointer event still unconsumed during the Final pass. Children with their own pointer handlers (the biometric / PIN code buttons inside the lock prompt) consume their events first during the Main pass, so the unlock controls remain interactive while empty-space taps no longer leak through. Set contentAlignment = Alignment.Center on the new Box so the snowflake icon and "Unlock to continue" text stay visually centered (matching the parent StartupView's contentAlignment). Closes ACINQ#733. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1365020 to
488af67
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #733.
Summary
When the wallet is locked and showing "Unlock to continue", pointer events in empty regions of the lock overlay can reach interactive elements drawn on the destination underneath, allowing those underlying controls to be triggered without unlocking the wallet. The original report describes opening the "Add a custom description to this payment" sheet through the lock screen.
Change
Wrap the lock-prompt content in a Box whose
pointerInputconsumes any pointer event still unconsumed during the Final pass. Children with their own pointer handlers (the biometric / PIN code buttons inside the lock prompt) consume their events first during the Main pass, so the unlock controls remain interactive while empty-space taps no longer leak through.phoenix-android/.../StartupView.kt only —
LoadWallet'sisScreenLockRequired == truebranch.contentAlignment = Alignment.Centeris set on the new Box so the snowflake icon and "Unlock to continue" text remain visually centered (matching master).Verification
Manually verified on a Pixel 4a API 34 emulator with a wallet that has Lock PIN enabled (1-minute auto-lock):
KEYCODE_POWERto triggerACTION_SCREEN_OFF→clearActiveWallet()and re-enter the locked state.(574,1522),(354,1358),(726,1358)— these match where the underlying Lightning Receive screen's "Add amount and description" link, "Single use" tab, and "Reusable" tab live.A/B comparison:
Tap on the lock screen's own "PIN code" button still opens the PIN sheet, confirming that the legitimate interactive elements of the lock prompt remain reachable.
Test plan
:phoenix-android:assembleDebug)