Skip to content

Fix #158: show the photo frame over a secure keyguard on wake - #167

Draft
starbrightlab wants to merge 1 commit into
mainfrom
fix/158-frame-show-over-keyguard
Draft

Fix #158: show the photo frame over a secure keyguard on wake#167
starbrightlab wants to merge 1 commit into
mainfrom
fix/158-frame-show-over-keyguard

Conversation

@starbrightlab

Copy link
Copy Markdown
Owner

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 default ALWAYS_ON installs, and the surface that takes over after DreamPolicy's ~2-min force-wake handoff — setShowWhenLocked(true) + setTurnScreenOn(true), mirroring WakeLightActivity but deliberately omitting FLAG_DISMISS_KEYGUARD. The keyguard stays armed underneath, so:

  • Motion wake → slideshow renders over the lock.
  • Tap to interact → the frame 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 (issue #154). No-op on devices without a secure lock set.

Known gap (documented, not addressed here)

The initial ~2-minute PhotoDreamService window can't render over a secure keyguard — a DreamService always 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.
  • ⚠️ Needs on-device verification on a Portal with a secure lock set (keyguard interaction on this frozen firmware can't be exercised off-device). Draft until then. Suggested checks: (1) motion wake shows the slideshow over the lock; (2) a tap surfaces the PIN and, after unlock, lands on the launcher / the "open when dismissed" target; (3) no regression for users without a lock; (4) overnight dark window still stays dark.

Fixes #158.

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

Screen Lock pin blocks photo slideshow on motion wake

1 participant