Closed ioctl-user closed 2 years ago
Could you explain why sleep_once was removed?
Hmm. I thought it was obsolete function acting like just sleep
. Wasn't it?
Also see lots of changes in MainFunctions. A lot of the code was for edge cases and handling conflicting settings, so I am nervous about the changes, it's very hard to test all cases. Could you describe what the issues were and how you fixed them?
I have noticed, that on my Android 10 device BatteryFu doesn't wakes to change mobile data state as expected. As I understand this https://developer.android.com/reference/android/app/AlarmManager#setRepeating(int,%20long,%20long,%20android.app.PendingIntent) , in modern systems that function is not working in full doze, so I changed it to this one https://developer.android.com/reference/android/app/AlarmManager#setExactAndAllowWhileIdle(int,%20long,%20android.app.PendingIntent) . However, it does not have interval argument, so, I have to rearm it again and again, not once. To use this function I have to update SDK. When SDK was updated old notification have not been compiled, so I had to use v4.app.NotificationCompat module and it function. Also I have disabled // go to sleep now
, because it turn of mobile data when app starting, if (Settings.SLEEP_PERIOD < 1000 * 60 * 15) {
because it doesn't allow set little timeouts, if (Settings.DEBUG_NIGHT_MODE) {
because it seems like obsolete debug.
Thanks for the response and the pull request. I'll need a bit of time to test and verify. I can't remember what sleep_once was for.
Sure.
Don't you remember, were "Always online" and "Always offline" modes working before?
Yes those were working.
On June 13, 2020 8:36:28 PM GMT+02:00, ioctl-user notifications@github.com wrote:
Sure.
Don't you remember, were "Always online" and "Always offline" modes working before?
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tobykurien/BatteryFu/pull/48#issuecomment-643661207
-- tobykurien.com | @tobykurien
I think I understand what happened. So, I need much more time to fix this.
However, for now "Always online" and "Always offline" modes are not working. Mobile data state changed with screen off/on. Was it working before?
The problem is GeneralReceiver does not check ModeSelect status before changing mode on screen event, and I do not know how to make good fix.