no one is gonna use this risky s**t anyways
Also:
Improve so much code all around, prep for rewriting a lot.
Get rid of the official tag check
And another old AF config no one needs
For service - activity communications, bind the service instead.
Also:
* Force portrait, get rid of old land layout
* Do not use network on autoState
* Properly handle download notification actions - w/o dismissing
* Stop using shared prefs to trigger service events
* Improve and simplify a lot of code
* Get rid of some edge case crashes
* Many other fixes I can't recall
This was VERY expansive. Can actually feel the difference in responsiveness.
Considerably less CPU usage and CPU time after this fix.
Also make sure we're rate limited to at least 250ms everywhere except sum verify
Also allows the user to actually pause (without a network interrupt)
Stop button UI was reworked for this as well
Better reflects a network error is resume-able as well
Many other minor bug & code fixes while at it
When the user removes the update zip after we're in ready to flash state he could still press on flash
which results in STATE_ERROR_AB_FLASH but we still have the ready prefs set
To avoid just clear the state when the package is not found
* Adapt for latest SDK
* Get rid of many deprecations
* Use apply() instead of commit() where possible for shared prefs
* Many others like unused vars, bad formatting, bad practices and so on
Really too lazy to list all, just take a look.
Also unify the mess that was going on there. Use one function for all.
Always show progress when we check the whole file again.
Few other minor improvements
Making android disable encryption for the OTA zip and rebooting to recovery to flash it.
Also remove CWM recovery support. This thing is way too old and too dead.
Also refelct:
E/update_engine(1463): [ERROR:update_attempter_android.cc(90)] Replying with failure: pc:0x6241ff04b8: An update already applied, waiting for reboot
with the reboot notice, instead of being stuck at 0%
Also cleanup some code. More to come.
We don't actually need to use scoped storage, just ask correctly for a full storage perm
Finally target latest SDK, this is probably not backwards compatible so also change the minimum
Also improve AndroidManifest, get rid of dangerous permissions such as
http communication and useless ones.