-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed as not planned
Labels
invalidThis doesn't seem right (unclear report or request, wrong repo, user error, etc.)This doesn't seem right (unclear report or request, wrong repo, user error, etc.)
Description
Checklist
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- I have read the FAQs inside the app (Menu -> About -> FAQs), in the README and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the request may get dismissed otherwise.
- This issue contains only one feature request.
Which apps should have this feature?
Clock
Feature description
CI Verification of App Survival Logic
Implement critical CI pipeline tests that replicate the logic found in Android’s Compatibility Test Suite (CTS) to verify how the app handles being killed or suppressed. This specifically addresses the "Deep Sleep" and "Restricted" scenarios common in aggressive OEM environments like Samsung's One UI.
- Simulation of App Killing & Deep Sleep: Replicate the logic from modules like
CtsAlarmManagerTestCasesto test the app’s resilience when the process is terminated or placed into a restricted power state by the OS. - Exemption Verification (Before/After): Use the CI to verify the state of
isIgnoringBatteryOptimizations()and its direct impact on alarm delivery.- The "Before" Check: Run survival tests while the app is subject to standard battery optimizations. This documents the failure points where the OS (or aggressive OEM logic) kills the process or delays the alarm.
- The "After" Check: Programmatically simulate the "Unrestricted" state and verify that the app now successfully "punches through" Doze and Deep Sleep.
- Targeted Survival Testing:
- Process Resurrection: Verifying that the System Server successfully restarts the app process to deliver an alarm intent even after the process has been force-killed or moved to a "Deep Sleep" state.
- Idle Punch-Through: Testing the app's ability to wake the CPU from a forced Doze state (simulated via
adb shell dumpsys deviceidle force-idle). This mimics the exact point of failure on many Samsung devices where "Battery Protection" prevents standard apps from waking the device.
Why do you want this feature?
It is well-documented that many vendors (Samsung, Xiaomi, etc.) employ non-standard battery optimization managers that kill background processes or ignore standard alarm intents. Specifically, Samsung's "Deep Sleep" can move apps into a state where they are effectively disabled until the user manually interacts with them.
By adopting this verification logic, the project gains:
- A Reliability Baseline: Proof that the app is 100% compliant with standard Android process recovery. By checking
isIgnoringBatteryOptimizations(), we can prove that moving to the "Unrestricted" bucket is the only definitive way to bypass OEM-specific killing logic. - Technical Justification: This provides a data-backed reason to implement the
ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGStoggle. If the app passes tests only after battery exemptions are applied, it proves the toggle is a required feature for reliability on non-compliant hardware. - Automated Triage: It allows the project to distinguish between a regression in the app's alarm logic and an external "app-killing" event caused by a specific phone manufacturer's proprietary power management.
Additional information
- Reference: This specifically addresses the "background killing" and "Deep Sleep" behaviors documented by dontkillmyapp.com.
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem right (unclear report or request, wrong repo, user error, etc.)This doesn't seem right (unclear report or request, wrong repo, user error, etc.)