Skip to content

2.7.0: scheduled recording for phones without a screen lock - #51

Merged
1window2 merged 3 commits into
mainfrom
v2.7.0
Oct 25, 2026
Merged

1window2 merged 3 commits into
mainfrom
v2.7.0

Conversation

@1window2

Copy link
Copy Markdown
Owner

Summary

Scheduled recording for phones without a PIN, pattern, or password: the same unattended recording as standby mode, started by a daily exact alarm instead of a screen kept on overnight.

  • Settings → Scheduled recording: a "Record every day" switch and the server choice (shared with standby: one server per client, full-width divider between clients). Turning it on walks through accessibility, VPN consent, Alarms & reminders (Android 12+), the battery exemption, and the servers.
  • Lock detection: KeyguardManager.isDeviceSecure() decides; with a PIN, pattern, or password the switch is disabled with a pointer to standby mode. It is checked again when the alarm fires; a lock added later stops the run without waking the screen and turns scheduling off.
  • Wake-up: setAlarmClock five minutes before each server's reset (servers sharing a reset stagger in one wake-up). The receiver sets the next alarm first, then the accessibility service opens the standby screen with setShowWhenLocked/setTurnScreenOn; a swipe lock screen is dismissed with requestDismissKeyguard, then StandbyAutomation runs as in 2.6.0 and turns the screen off at the end.
  • Safety: a handled reset is never run twice; late alarms record "missed" without waking; the phone in use (screen on, call, or standby running) skips the day; the scheduled screen bounds itself to the end of the grace period even before arming; the alarm receiver is not exported, and the exported receiver only reschedules on protected system broadcasts (boot, update, time, time zone, exact-alarm permission).
  • Also: results accumulate across days until closed on Home and show the date; <queries> for HOME apps so the Recents close works on non-Samsung launchers (failed on the Pixel launcher before); cancellation wording.

Testing

  • :app:testDebugUnitTest (new planner tests for the earliest reset group and never rescheduling a handled reset), :app:lintDebug (no new findings), signed :app:assembleRelease.
  • Galaxy Note10+ (Android 12, PIN set): Settings shows the feature as unavailable with the PIN message and a disabled switch.
  • Emulator (Android 14, Pixel launcher, swipe lock; stand-in apps under both game package names since the games cannot be installed there; Platoons copied from the device's debug build):
    • Setup: Alarms & reminders dialog → system page → battery dialog → server dialog (Korean) → alarm set.
    • Screen off → alarm at the planned second → screen woke, swipe lock dismissed, capture started, "game" launched; both servers ran in turn (timed out as expected without a real login), each closed from Recents (remove task), back to standby between them, screen off at the end.
    • Alarm while the screen was on → skipped as in use, next alarm kept.
    • PIN added after enabling → alarm did not wake the screen, recorded "screen lock set", scheduling turned off and the alarm cancelled.
    • Results popup lists every outcome with dates and clears only on OK.
  • An independent review of the diff found no blockers; its should-fix items (unbounded screen before arming, keyguard callbacks after cancel, duplicate delivery, late alarms, lost server list on recreation) are fixed.
  • Known limit: on a game patch day the "restart the game" notice blocks login, so that day's run times out.

@1window2
1window2 merged commit 4f2fb9c into main Oct 25, 2026
5 checks passed
@1window2
1window2 deleted the v2.7.0 branch October 25, 2026 03:10
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.

1 participant