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:
1 parent
3f431a7f32
commit
69b436cffd
46 files changed
+2132
-16
No files matched your search
@@ -439,4 +439,46 @@
|
||||
<string name="widget_quick_timer_custom">Custom…</string>
|
||||
<string name="widget_quick_timer_custom_title">Custom duration</string>
|
||||
<string name="widget_quick_timer_range_hint">Between 1 second and 59:59</string>
|
||||
|
||||
<!-- Issue #1: bedtime -->
|
||||
<string name="settings_group_sleep">Sleep</string>
|
||||
<string name="settings_bedtime_summary">A Do Not Disturb mode for the night</string>
|
||||
<string name="bedtime_title">Bedtime</string>
|
||||
<string name="bedtime_hint">Clockula turns on a Do Not Disturb mode of its own at bedtime and turns it off when you wake up. Alarms always ring.</string>
|
||||
<string name="bedtime_enabled">Bedtime mode</string>
|
||||
<string name="bedtime_enabled_on">On, %1$s to %2$s</string>
|
||||
<string name="bedtime_enabled_off">Off</string>
|
||||
<string name="bedtime_access_title">Allow Do Not Disturb access</string>
|
||||
<string name="bedtime_access_summary">Clockula needs it to turn its bedtime mode on and off. Find Clockula in the list and allow it. Without it, only the reminder works.</string>
|
||||
<string name="bedtime_access_allow">Allow</string>
|
||||
<string name="bedtime_section_schedule">Schedule</string>
|
||||
<string name="bedtime_start">Bedtime</string>
|
||||
<string name="bedtime_wake">Wake up</string>
|
||||
<string name="bedtime_days_hint">The nights bedtime starts on. A wake-up time before the bedtime is the next morning.</string>
|
||||
<string name="bedtime_section_reminder">Reminder</string>
|
||||
<string name="bedtime_reminder">Remind me before bedtime</string>
|
||||
<string name="bedtime_reminder_off">Off</string>
|
||||
<plurals name="bedtime_reminder_before">
|
||||
<item quantity="one">%1$d minute before</item>
|
||||
<item quantity="other">%1$d minutes before</item>
|
||||
</plurals>
|
||||
<string name="bedtime_section_effects">Screen</string>
|
||||
<string name="bedtime_effect_grayscale">Grayscale</string>
|
||||
<string name="bedtime_effect_dim_wallpaper">Dim the wallpaper</string>
|
||||
<string name="bedtime_effect_dark_theme">Dark theme</string>
|
||||
<string name="bedtime_effect_hide_aod">Hide the always-on display</string>
|
||||
<string name="bedtime_effects_unavailable">Screen effects need Android 15 or later. On this phone, bedtime silences notifications and calls the way Do Not Disturb does.</string>
|
||||
<string name="bedtime_open_mode">Open in system settings</string>
|
||||
<string name="bedtime_open_mode_summary">Who can reach you, and more effects, under Settings › Modes. Changes you make there are kept.</string>
|
||||
<string name="bedtime_alarms_note">Bedtime never silences an alarm or a timer: its mode always lets alarms through.</string>
|
||||
<string name="bedtime_wellbeing_note">This is not Digital Wellbeing\'s Bedtime mode. Android lets only the system turn that one on, so if you use it too you will see two modes in Settings › Modes. Use one of them.</string>
|
||||
<string name="bedtime_mode_name">Clockula bedtime</string>
|
||||
<string name="bedtime_mode_trigger">%1$s to %2$s</string>
|
||||
<string name="channel_bedtime_name">Bedtime reminders</string>
|
||||
<string name="channel_bedtime_description">A reminder shortly before bedtime starts.</string>
|
||||
<plurals name="bedtime_reminder_title">
|
||||
<item quantity="one">Bedtime in %1$d minute</item>
|
||||
<item quantity="other">Bedtime in %1$d minutes</item>
|
||||
</plurals>
|
||||
<string name="bedtime_reminder_text">Bedtime mode starts at %1$s.</string>
|
||||
</resources>
|
||||
Reference in new issue
Block a user