Commit Graph

335 Commits

Author SHA1 Message Date
fazilsheik96 2a6949a1a8
adopt OpenDelta for aospa 2023-09-29 10:01:35 +05:30
忘却的旋律 5fe5121440
OpenDelta: Update Simplified Chinese translation (#7) 2023-09-28 17:20:16 +03:00
Ido Ben-Hur c04b5a1904
OpenDelta: Add an option to reflash latest update
Mostly useful for maintainers / programmers for flashing a server side build with the same date as the installed one
2023-09-28 13:53:53 +03:00
Ido Ben-Hur d9b5742f8a
OpenDelta: Add a toggle for stream flashing
Instead of showing both flash and download at the same time, which is confusing, show only either
Enabled by default
2023-09-27 19:18:26 +03:00
Ido Ben-Hur 9f67d8ad95
OpenDelta: Add support for stream flashing on AB devices
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
2023-09-24 13:56:26 +03:00
忘却的旋律 f23e9ad47a
OpenDelta: Fix Simplified Chinese translations (#6) 2023-07-15 13:53:33 +03:00
忘却的旋律 dd4265a104
OpenDelta: Update Simplified Chinese translations (#5) 2023-07-10 17:54:32 +03:00
Ido Ben-Hur a6b0305d09
OpenDelta: Never crash on a/b perf mode set failure
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
2023-06-19 20:01:30 +03:00
Ido Ben-Hur 9f6e0b7df1
OpenDelta: Make sure we only notify for a new update twice a day
Never fire multiple notifications in a row
consider a fired notification as user read instead of waiting for dismiss
2023-04-28 19:28:22 +03:00
Alexandr Antonyuk 2952410c40
OpenDelta: Update Ukrainian translation (#4) 2023-04-27 14:26:41 +03:00
Ido Ben-Hur 1175441999
OpenDelta: Allow pausing / cancelling an AB update installation
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
2023-04-24 04:13:46 +03:00
Ido Ben-Hur 74c143df75
OpenDelta: Fix a leading zero error when converting sha256sum to string
also improve some code while at it
2023-04-20 02:01:02 +03:00
Ido Ben-Hur 167e8aa47e
OpenDelta: config: Default to signed branch 2023-03-02 18:52:49 +02:00
Ido Ben-Hur 1de630a2ed
OpenDelta: SettingsFragment: Rework preferences enablement
Let's be less confusing
Also solves a bug where mScheduleWeekDay & mSchedulerDailyTime stay enabled even when scheduler is disabled
2023-02-27 17:26:41 +02:00
Ido Ben-Hur 8c51aa3565
OpenDelta: Get rid of more reflection
Just... Why.... Ew.
Also minor improvement to some random code
2023-02-27 15:10:01 +02:00
Ido Ben-Hur 0daa4ad9ef
OpenDelta: Describe non update engine errors as well
And improve some code / logic
2023-02-23 19:51:48 +02:00
Ido Ben-Hur 04ba2a76c8
OpenDelta: Give progress text and percent more room 2023-02-21 16:17:35 +02:00
Ido Ben-Hur e9ae3a8605
OpenDelta: Rewrite auto state
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
2023-02-16 03:51:12 +02:00
Ido Ben-Hur b6a15fc567
OpenDelta: Allow opting out of sleep detection 2023-02-06 17:18:10 +02:00
Ido Ben-Hur 3b769805cd
OpenDelta: Rewrite scheduler related code
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
2023-02-06 17:18:10 +02:00
Ido Ben-Hur b17c1d8a41
OpenDelta: Allow hiding info text by long pressing it 2023-02-03 16:56:07 +02:00
Ido Ben-Hur 590e1e65c3
OpenDelta: Make ABUpdate a singleton
we don't need so many instances of it...
there can only ever be one update at a time anyways
2023-02-03 16:09:10 +02:00
Ido Ben-Hur ae83edbdca
OpenDelta: Better handle the UpdateService lifecycle
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
2023-02-03 16:09:10 +02:00
Ido Ben-Hur a3e9fb3e4a
OpenDelta: Always display the error description in the extra text view
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
2023-02-03 16:09:10 +02:00
忘却的旋律 a5a5c30235
OpenDelta: Update Simplified Chinese translation (#3)
* OpenDelta: Update Simplified Chinese

* fix
2023-01-26 16:29:33 +02:00
Ido Ben-Hur 3bac47b6b0
OpenDelta: Set a timeout of 1h to the wakelock
And make sure we don't acquire twice, even tho it should have never as it is.
Just incase.
2023-01-19 01:18:25 +02:00
LedyBacer cc4c30451c
OpenDelta: Update Russian translation (#2) 2023-01-11 04:04:09 +02:00
Ido Ben-Hur 7ef045e28e
OpenDelta: Show meaningful strings for download errors
Also:
- clean some code and fix some typos
- change positive button text to "Ignore" in sum warning dialog
2023-01-05 17:31:19 +02:00
Ido Ben-Hur c3829a8d79
OpenDelta: Download: Match HTTP response with expectation 2022-12-08 21:02:59 +02:00
Ido Ben-Hur 10a91b3321
OpenDelta: Hold a WakeLock when installing an AB update
Otherwise they're really really slow if they even make any progress
Allow the user to disable this incase they want to
2022-12-07 00:31:16 +02:00
Ido Ben-Hur 6b5dc06b04
SettingsActivity: Adapt to android-13.0.0_r16 2022-12-06 08:13:29 +02:00
Ido Ben-Hur 709ac304ca
OpenDelta: Support local file sum verification
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
2022-11-17 15:45:14 +02:00
Ido Ben-Hur 29774e872c
OpenDelta: Always show reboot pending notification
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)
2022-11-12 16:16:06 +02:00
Ido Ben-Hur 0f735f63fb
OpenDelta: Also notify for manual download completion 2022-11-08 10:51:23 +02:00
Ido Ben-Hur f238978761
OpenDelta: Kill reflection to set recovery script perms
ew. Noobs that'd apply such hacks just so Eclipse is happy - are not welcome.
2022-11-01 12:24:15 +02:00
Ido Ben-Hur 6065a6e984
OpenDelta: No NPE please
Happens very very rarely
2022-10-29 13:28:31 +03:00
Ido Ben-Hur a38d5615cc
OpenDelta: Fix file flashing from Download / Document folders
oops
2022-10-27 22:34:42 +03:00
Ido Ben-Hur 742fba8494
OpenDelta: Show missed builds changelogs as well
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.
2022-10-27 15:03:11 +03:00
Ido Ben-Hur efdc31cf5d
OpenDelta: Allow overlaying AB perf mode support
Default to false. Apparently newer devices can't set it as we do.
2022-10-23 09:13:04 +03:00
Ido Ben-Hur 50828c386e
OpenDelta: Properly add useful strings for every A/B flash error 2022-10-21 15:59:46 +03:00
Ido Ben-Hur 9d5e1ddfed
OpenDelta: MainActivity: Improve some code
Use switch case and reuse more code.
2022-10-21 15:59:45 +03:00
Ido Ben-Hur 0e6967f688
OpenDelta: Properly describe a SHA mismatch state 2022-10-21 10:40:00 +03:00
Ido Ben-Hur 03147665ce
OpenDelta: Do not leak service connection
We bind using the old API so we should also unbind.
bind onCreate so symmetricly unbind onDestroy
2022-10-20 15:45:10 +03:00
Ido Ben-Hur a8f06d50a9
OpenDelta: Remove deprecated delta scheduler option
And some other missed vars during de-deltaing
2022-10-20 15:44:44 +03:00
Ido Ben-Hur 3844f53652
OpenDelta: Alert only once for progress notifications 2022-10-20 01:59:46 +03:00
Ido Ben-Hur 71e4734f65
OpenDelta: Fixup check function after de-delta
should return before checkExistingBuild if the date isn't greater than
2022-10-20 01:15:19 +03:00
Ido Ben-Hur e901cae04b
OpenDelta: UpdateService: Refactor download out 2022-10-19 18:32:15 +03:00
Ido Ben-Hur 075dcb3cc5
OpenDelta: De-Delta
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
2022-10-19 18:11:41 +03:00
Ido Ben-Hur 3cebec66f6
OpenDelta: Manually request POST_NOTIFICATIONS if missing 2022-10-07 20:21:09 +03:00
Ido Ben-Hur 3d5eeb8126
OpenDelta: config: A13 tag 2022-10-07 20:21:09 +03:00