feat(bedtime): add an opt-in bedtime mode under Settings

Clockula can now turn on a Do Not Disturb mode of its own at bedtime and
off at the wake-up time, on the nights the user picks, with an optional
reminder before it starts. Digital Wellbeing's Bedtime mode can't be
driven by a third-party app, so this is a separate rule: a typed mode
with grayscale, dimmed wallpaper, dark theme and hidden always-on display
on Android 15+, and a plain DND schedule rule on Android 10-14.

The rule's policy always allows alarms (and media). BedtimeEngine owns one
AlarmManager slot of its own, on its own receiver and request code, and
every bedtime call on the boot, time-change and launch paths runs after
the alarm and timer passes, guarded. The rule id is never stored: the
platform lists an app's own rules, so restores and reinstalls find or
recreate it. Turning bedtime off removes the rule. The screen walks the
user through granting DND access and explains the Wellbeing overlap.
Settings are part of the JSON backup; older files restore bedtime as off.

Refs #1
This commit is contained in:
makiolaj committed 2026-10-22 11:19:38 +02:00
1 parent 3f431a7f32
commit 69b436cffd
46 files changed
+2132 -16

No files matched your search

+6 -2
View File
@@ -1,7 +1,7 @@
---
title: Privacy Policy — Clockula
description: What Clockula does with your data. It collects nothing, sends nothing, and has no internet permission at all.
updated: 2026-10-02
updated: 2026-10-22
---
<!--
@@ -20,7 +20,7 @@ updated: 2026-10-02
render on the published page.
-->
**Last updated:** 2 October 2026
**Last updated:** 22 October 2026
Applies to the Android app **Clockula** (package `de.jeanlucmakiola.clockula`),
all versions and all distribution channels.
@@ -167,6 +167,10 @@ on. Clockula only opens the address and sends no data of yours with it.
stopwatch going while the app is in the background.
- `WAKE_LOCK`: keep the phone awake while an alarm or timer rings.
- `VIBRATE`: vibrate when an alarm or timer rings.
- `ACCESS_NOTIFICATION_POLICY`: only used if you turn on Bedtime and allow
Clockula Do Not Disturb access yourself. Clockula then adds one Do Not
Disturb mode of its own and turns it on and off on your schedule. It does not
read your notifications.
- `ACCESS_NETWORK_STATE`: added by the Android library that updates the
home-screen widgets (WorkManager). It lets an app see whether a network
connection exists. It does not let it use one, and without `INTERNET` no