Directly download and flash at the same time.
Requires extra info in json to work.
Will just show the user the flash button and the download one to preserve old functionality
TBD: Adapt the json generating shell script in build to include missing info
This can fail for all kinds of reasons, especially for kernel / device side failures or lack of support
Let's not crash for it and let the user know via a toast
Allowing from the app only - adding buttons to the notification seem dangerous for this
Added an are you sure dialog that also affects cancelling a download from the app
Also allows cancelling the reboot to the inactive slot when the update is already done
improve some, fix some minor bugs while at it
This thing was unreadable. Also make it always show the correct state
Also improved some other logic, styling, maintainability and other small issues all across
Changes include but are not limited to:
* MASSIVE code style, logic and maintainability improvements
* Make Scheduler a separate service so it does not depend on UpdateService to start / listen
* Remove useless listeners from UpdateService
* Default to smart mode with notify only for scheduler
* Have more chill alarm timers and do not set em too early (before we can actually check)
* Sign the app with platform keys and share UID with system so we have notification perms by default
* Give scheduler his own notification channel with higher priority
* Give a proper description to all notification channels
We can manually stop it when we're sure it does nothing
Also better handle state callbacks
Convert it to a list of callbacks interfaces so we can register multiple
Now that UpdateService also needs to listen to it for a short while
Other minor unrelated code improvements
Also:
Don't limit extra text view to a single line
Add auto text sizing & scrolling where relevant
Improve some state string fetching and remove some useless strings
Make the version info text to always show at the same height relative to top
* So it doesn't dance around when we move through states
search for a sum file at the same path, if not found / mismatches -
warn the user using a dialog and allow continuing only after accepting the warning
also get rid of some long gone strings and improve some code while at it
And improve some code:
* Get rid of more missed delta things
* Always properly check if we have the filename
* Set PREF_FILE_FLASH sooner when flashing a user picked file
Reboot pending notification error was caused by:
W/Binder ( 4333): Caught a RuntimeException from the binder stub implementation.
W/Binder ( 4333): java.lang.NullPointerException
W/Binder ( 4333): at java.io.File.<init>(File.java:302)
W/Binder ( 4333): at eu.chainfire.opendelta.UpdateService.startABRebootNotification(UpdateService.java:623)
W/Binder ( 4333): at eu.chainfire.opendelta.UpdateService.onUpdateCompleted(UpdateService.java:1023)
W/Binder ( 4333): at eu.chainfire.opendelta.ABUpdate$1.onPayloadApplicationComplete(ABUpdate.java:100)
W/Binder ( 4333): at android.os.UpdateEngine$1.onPayloadApplicationComplete(UpdateEngine.java:288)
W/Binder ( 4333): at android.os.IUpdateEngineCallback$Stub.onTransact(IUpdateEngineCallback.java:106)
W/Binder ( 4333): at android.os.Binder.execTransactInternal(Binder.java:1307)
W/Binder ( 4333): at android.os.Binder.execTransact(Binder.java:1265)
W/Binder ( 4333): Caught a RuntimeException from the binder stub implementation.
W/Binder ( 4333): java.lang.NullPointerException
W/Binder ( 4333): at java.io.File.<init>(File.java:302)
W/Binder ( 4333): at eu.chainfire.opendelta.UpdateService.startABRebootNotification(UpdateService.java:623)
W/Binder ( 4333): at eu.chainfire.opendelta.UpdateService.onUpdateCompleted(UpdateService.java:1023)
W/Binder ( 4333): at eu.chainfire.opendelta.ABUpdate$1.onPayloadApplicationComplete(ABUpdate.java:100)
W/Binder ( 4333): at android.os.UpdateEngine$1.onPayloadApplicationComplete(UpdateEngine.java:288)
W/Binder ( 4333): at android.os.IUpdateEngineCallback$Stub.onTransact(IUpdateEngineCallback.java:106)
W/Binder ( 4333): at android.os.Binder.execTransactInternal(Binder.java:1307)
W/Binder ( 4333): at android.os.Binder.execTransact(Binder.java:1265)
Limit up to 10 builds. Use GitHub API to climb up the commit history until we get to the right/older build.
This way the user is made aware of all the changelogs if they skip some builds.
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