Service updates
Seems to include scrolling updates aswell (I am new to git), anyways.
These are the changes I've made to ForceDozeService.java in an attempt to make the service work correctly. The (could be) constant kept wakelocks seems to have been fixed. One time I've had a stray timertask fire, I still havent figured out how it happened.
In addition I've changed the doze delay to seconds, as minutes didn't seems to make much sence. Added a few debug strings. Added a wifi timout option.
A couple of things that needs changes before I merge this:
- Strings in prefs.xml needs to be in strings.xml
- WiFi timeout shouldn't be an option, as I think it may confuse users plus having too many options in the app should be avoided. Also, maintenance periods don't last for more than 5 mins so I would suggest it should work like this: a) If in maintenance period, try reconnecting to WiFi if it doesn't connect automatically in 15 seconds. If it still doesn't connect, then try 3 times with 15 second intervals. b) If device goes out of Doze (due to screen on), try reconnecting to WiFi if it doesn't connect automatically in 15 seconds. If it still doesn't connect, then leave it. There's no need to manage retries, the user can toggle WiFi on/off by themselves if it doesn't work after 1 retry.
Also, service related commits need testing on Nougat ,so you'll have to first update your master branch and then apply these changes, and then test them before submitting.