fix: recover stranded screen-off permission prompt commits#31
Merged
Conversation
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>
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.
Summary
Recovers 4 commits that were merged into the
feat/in-app-rotationbranch (via PR #24) instead of intomain. PR #23 then merged an earlier snapshot offeat/in-app-rotationintomain, leaving these commits stranded on the remote branch. This restores:Turn off display – Device admin/– Shizuku) — the visible text change that first made this regression noticeableRecovered commits (cherry-picked from
origin/feat/in-app-rotation)0229088feat(screen-off): prompt for missing permissions on startup828b939style(dialogs): align with Material 3 guidelines98c370cstyle(dialogs): use Ignore on startup prompts, clarify admin title533fc49fix(shizuku): wait for binder before running startup checkOne conflict in
TimerViewModel.kt(imports + placement of new startup-check functions vs. thecommitMinutesrefactor fromfeat/dial-adjust-while-running) resolved by keeping both sides.Test plan
./gradlew assembleDebug— green🤖 Generated with Claude Code