Closed marceltransier closed 2 years ago
Good catch! Thanks for making me aware of this! 👍 Will investigate…
Version 1.0.7 listens for ACTION_SHUTDOWN
now (see https://github.com/markusfisch/ScreenTime/commit/3e2934a5f0fdb204ad0c6cf93d844746eda304dd).
Unfortunately, not all of my devices send ACTION_SHUTDOWN
when shutting down (or rebooting) so the bug is not fixed for everyone 😬 But I'm still on it and I think I can find a solution. This is just a first step.
Version 1.0.8 doesn't depend on a closing event anymore. Now, the current session is updated with the ongoing notification and, finally but not necessarily, when there's a ACTION_SCREEN_OFF
event.
So even a power loss wouldn't result in an open record anymore.
The app appears to have counted shut down time as screen time. Maybe when the phone shuts down the screen is on and then the apps are being killed without sending the standby signal to the app. Maybe there is also a way to listen for shutdown events? (https://developer.android.com/reference/android/content/Intent#ACTION_SHUTDOWN)