Skip to content

2.6.0: overnight standby mode - #49

Merged
1window2 merged 6 commits into
mainfrom
v2.6.0
Oct 19, 2026
Merged

1window2 merged 6 commits into
mainfrom
v2.6.0

Conversation

@1window2

@1window2 1window2 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Work branch for 2.6.0. Intended to be squash-merged once the release is complete; more changes may land here first.

Standby mode

  • Home's moon button opens an all-black, minimum-brightness screen that keeps the phone awake and unlocked overnight.
  • Every entry shows "Standby mode is on" and how to leave for 3 seconds, then turns every pixel off.
  • Tapping the screen, Back, the power button, or switching apps ends standby. Brightness is a window-level override, so the system brightness and auto-brightness are never changed.
  • The first entry explains and offers the battery-optimization exemption once (system dialog); later entries go straight in.
  • Automatic power saving mode was evaluated and dropped: apps cannot toggle it without an ADB-granted permission.

Automatic recording from standby

  • Five minutes before each chosen server's game day ends (05:00 in that server's zone), standby starts capture, opens the client, taps Start on the title screen, waits for the roster to be saved, closes the game from Recents, and returns to standby; after the last server it goes Home and locks the phone.
  • One saved server is armed directly. With several, a dialog asks every time which to record: clients are separated by a full-width divider, and only one server per client can be checked (a client logs in to one server at a time). Servers sharing a reset run 5 minutes apart; the last choice is remembered.
  • Uses a new GF2logger accessibility service (taps only while the game is in front, Home, Recents close, lock). It reads only the foreground package and the app names on Recents cards. Taps stop at login (Platoon notices) and after 2 minutes at most, so nothing inside the game is pressed.
  • Fail-safes: a watchdog deadline (last reset + 5 min) always ends standby; every screen-on hold expires on its own; turning the screen off or leaving standby cancels without locking, and so does another app or Home staying in front for 5 s while the game is open (someone is awake); a run that fails before the game opens waits on the same standby screen for the next server; unrecorded runs are reported as timed out, missed, cancelled, etc.
  • The night's results appear on Home and count as seen only once the user closes them. The server dialog shows each server's real start, including the 5-minute stagger for servers sharing a reset.
  • ActivityManager.killBackgroundProcesses is refused for other apps on One UI ("Invalid packageName") and Android 14+, so the game is closed through its Recents card's own close action (matched by resource name, so any language works); the kill stays as a backup.
  • Debug builds only: files/standby_rehearsal (<minutes> [unlocked]) moves every chosen server's reset that far from now, for device rehearsals.

Dependencies

Testing

  • :app:assembleDebug, :app:lintDebug (no new findings), :app:testDebugUnitTest pass locally (planner tests cover grouping, one server per client, reset/lead/grace times, staggering, final deadline, rehearsal).
  • Emulator (Android 16): standby prompt, hint, exits, brightness release; English and Korean.
  • Galaxy Note10+ 5G (Android 12 / One UI 4.1), HaoPlay South Korea + Darkwinter Global, ten rehearsals:
    • Fresh launch: Start tap at 85% height lands on Start for both clients → login → roster saved → RECORDED.
    • Game already running: resumes, reconnects through the new VPN, roster saved → RECORDED.
    • Recents close ends the game process (remove task); results popup on Home.
    • Two servers, Korean UI: Darkwinter recorded and closed → back to standby showing the next HaoPlay run → HaoPlay recorded and closed → Home → phone locked.
    • Pressing Home 8 s into the HaoPlay run: cancelled ~5 s later, game left open, phone not locked, capture stopped, selected Platoon restored; results popup shows RECORDED + CANCELLED in Korean and clears only after OK.
  • Signed release build verified locally (R8, certificate fingerprint matches, accessibility service present in the manifest).
  • An independent review of the whole diff found two edge-case defects (a pre-launch failure cancelling later servers; no stand-down when the user is awake) and two minor ones; all fixed in c81b7b6.
  • Not yet exercised: a real multi-hour overnight wait, Android 13+ restricted-settings flow, launchers other than One UI.
  • Known limits: a patch-day "restart the game" notice or another dialog over the title screen makes that run time out (reported in the results); unattended runs only record Platoons already saved and confirmed.

Home's moon button opens an all-black, minimum-brightness screen that keeps
the phone awake and unlocked. It explains itself for three seconds on every
entry, then turns every pixel off; tapping, Back, the power button, or leaving
the app ends it, and the window-level brightness override lifts on its own.
The first entry offers the battery-optimization exemption once.
@1window2
1window2 marked this pull request as ready for review October 19, 2026 06:14
Copilot AI balanced review requested due to automatic review settings October 19, 2026 06:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@1window2
1window2 merged commit 10f0b54 into main Oct 19, 2026
5 checks passed
@1window2
1window2 deleted the v2.6.0 branch October 19, 2026 22:41
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