Skip to content

fix: recover stranded screen-off permission prompt commits#31

Merged
Xitee1 merged 4 commits into
mainfrom
fix/recover-screen-off-prompt
Apr 19, 2026
Merged

fix: recover stranded screen-off permission prompt commits#31
Xitee1 merged 4 commits into
mainfrom
fix/recover-screen-off-prompt

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented Apr 19, 2026

Summary

Recovers 4 commits that were merged into the feat/in-app-rotation branch (via PR #24) instead of into main. PR #23 then merged an earlier snapshot of feat/in-app-rotation into main, leaving these commits stranded on the remote branch. This restores:

  • Simplified Screen toggle description (Turn off display – Device admin / – Shizuku) — the visible text change that first made this regression noticeable
  • Startup permission-prompt dialogs (device admin + Shizuku) with Material 3 styling
  • Shizuku binder-ready wait before running the startup check

Recovered commits (cherry-picked from origin/feat/in-app-rotation)

  • 0229088 feat(screen-off): prompt for missing permissions on startup
  • 828b939 style(dialogs): align with Material 3 guidelines
  • 98c370c style(dialogs): use Ignore on startup prompts, clarify admin title
  • 533fc49 fix(shizuku): wait for binder before running startup check

One conflict in TimerViewModel.kt (imports + placement of new startup-check functions vs. the commitMinutes refactor from feat/dial-adjust-while-running) resolved by keeping both sides.

Test plan

  • ./gradlew assembleDebug — green
  • Settings → Screen toggle shows the new short description
  • Fresh launch with screen-off enabled but device admin revoked → admin dialog appears
  • Fresh launch with Shizuku features enabled but Shizuku not ready → Shizuku dialog appears, no NotRunning flash from binder race
  • Cancel on dialog leaves toggles untouched; dialog returns on next launch

🤖 Generated with Claude Code

Xitee1 and others added 4 commits April 19, 2026 09:05
Simplifies the Screen toggle's row description to "Turn off display -
Device admin" / "Turn off display - Shizuku" and drops the embedded
permission-hint text.

On app start, checks enabled features against the current permission
state. If device admin is required for the hard lock method but not
granted, or Shizuku is required for soft screen-off / Wi-Fi-off /
Bluetooth-off but not ready, a dialog appears letting the user grant
or cancel. Cancelling leaves the toggles untouched; the dialog returns
on the next launch until the user either disables the option or grants
the permission.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a semantic icon above the title on all three dialogs (device
admin, Shizuku, screen-lock method), bumps the Shizuku body spacing to
16 dp and wraps the content in a vertical scroll for long feature
lists. Promotes the method-picker descriptions from bodySmall to
bodyMedium and drops an ad-hoc 4 dp horizontal padding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Startup permission prompts (device admin + Shizuku) dismiss with
"Ignore" instead of "Cancel"; the user isn't cancelling an action, the
dialog just reappears next launch. Settings flows keep "Cancel" since
they abort enabling the toggle.

The admin dialog title now reads "Device admin permission required" /
"Geräteadministrator-Berechtigung erforderlich" so it clearly refers
to a permission rather than a person.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
On cold start the Shizuku binder may not have connected yet when the
TimerScreen's LaunchedEffect runs. In that window `pingBinder()`
returns false, so the startup check reported NotRunning even when
Shizuku was actually up and the real state was PermissionRequired.
Result: no dialog when the user had previously denied permission.

Tracks the first binder-received callback in ShizukuManager and
exposes `awaitInitialState(timeoutMs)` that suspends until the binder
connects (or the timeout elapses). The startup check in
TimerViewModel now awaits this before deciding, so NotRunning is only
reported when Shizuku genuinely isn't running.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xitee1 Xitee1 merged commit 3dffa7f into main Apr 19, 2026
1 check passed
@Xitee1 Xitee1 deleted the fix/recover-screen-off-prompt branch April 19, 2026 07:26
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