Fix #158: show the photo frame over a secure keyguard on wake - #167
Draft
starbrightlab wants to merge 1 commit into
Draft
Fix #158: show the photo frame over a secure keyguard on wake#167starbrightlab wants to merge 1 commit into
starbrightlab wants to merge 1 commit into
Conversation
Motion/presence wake landed on the PIN pad instead of the slideshow when a secure lock is set, because none of the screensaver surfaces are marked show-when-locked. Mark the continuation frame (the permanent ALWAYS_ON surface, and the frame that takes over after DreamPolicy's ~2-min force-wake handoff) show-when-locked + turn-screen-on, mirroring WakeLightActivity but deliberately omitting FLAG_DISMISS_KEYGUARD so the keyguard stays armed underneath: tapping to interact finishes back to the keyguard-protected launcher, which prompts the PIN. Placed after the overnight-dark early-return so it never fights the night blanking. No-op on devices without a secure lock. Known gap (documented, not addressed here): the initial ~2-min DreamService window can't render over a secure keyguard (a DreamService always draws behind it), so routing the presence wake to this activity is a follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem (issue #158)
On a Portal with a secure lock (PIN) set, a presence/motion wake lands directly on the PIN pad instead of the photo slideshow. Expected (stock, pre-Immortal) behaviour: motion wake → slideshow shows; only a touch should prompt the PIN.
Root cause
"Screen Lock PIN" is the OS keyguard, not an Immortal feature. None of the screensaver surfaces are marked show-when-locked, so on wake the secure keyguard is raised on top of the frame. The only surface in the app that shows over the lock today is
WakeLightActivity(the sunrise alarm).Fix
Mark
PhotoFramePreviewActivity— the permanent frame for the defaultALWAYS_ONinstalls, and the surface that takes over afterDreamPolicy's ~2-min force-wake handoff —setShowWhenLocked(true)+setTurnScreenOn(true), mirroringWakeLightActivitybut deliberately omittingFLAG_DISMISS_KEYGUARD. The keyguard stays armed underneath, so:Placed after the overnight-dark early-return so it never fights the night blanking (issue #154). No-op on devices without a secure lock set.
Known gap (documented, not addressed here)
The initial ~2-minute
PhotoDreamServicewindow can't render over a secure keyguard — aDreamServicealways draws behind it. Fully covering the "cold motion wake" instant would require routing the presence wake to this activity instead of the dream; that's a larger,DreamPolicy-level follow-up. This PR covers the dominant long-lived frame.Testing
./gradlew :app:compileDebugKotlin— clean.Fixes #158.