Bug: Extending time on Android 10 is not working
Rengyr opened this issue · comments
Since the last update (2616a09) clicking on the tile icon disables the Caffeinate instead of extending the timer on Android 10.
The permission popup doesn't show because Android 10 doesn't have that permission at all.
The suspected reason is that on Android version <13 it is always returning permission denied for checkSelfPermission(this.applicationContext, Manifest.permission.POST_NOTIFICATIONS)
(as the permission is marked as dangerous and popup for it doesn't exist for Android version <13).
Fix is probably checking the SDK version before running the check (stackoverflow)
Hi there! Thanks for reporting this, I definitely got a few emails sent out to me when 3.5 started hitting end user devices alerting me to this - I suspect you are correct about the root cause of the problem as well.
I've just gotten out of the hospital this afternoon, so I'll try to get a fix out ASAP!