Commit Graph

331 Commits

Author SHA1 Message Date
Ido Ben-Hur 36b4d747e6
OpenDelta: Don't show the changelog when flashing a local file 2022-08-27 03:26:32 +03:00
Ido Ben-Hur 1b4e4b80de
OpenDelta: Stop abusing intents & refactor
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
2022-08-16 07:15:27 +03:00
Ido Ben-Hur ffa3654fcb
OpenDelta: Redesign to fit A12's style better 2022-08-12 01:36:18 +03:00
Ido Ben-Hur 0431996eb9
OpenDelta: Don't update EVERYTHING on progress
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
2022-08-11 18:08:58 +03:00
Ido Ben-Hur a4c587c09b
OpenDelta: Correctly name public vars
Shortens many lines, follows convention and increases maintainability (which this project lacks anyways)
2022-08-11 18:08:51 +03:00
Ido Ben-Hur aa091f86ee
OpenDelta: Show the changelog of the next version
And get rid of stupidly settings static titles strings, just set the visibility instead
2022-08-11 18:08:04 +03:00
Ido Ben-Hur 5ee40c7d61
OpenDelta: Reliably show when an update is pending a reboot 2022-08-06 17:59:45 +03:00
Ido Ben-Hur a3fa47ede7
OpenDelta: Always skip checking when we are in progress
No need to re-check when we are downloading, nor when we are flashing
2022-08-05 19:19:02 +03:00
Ido Ben-Hur 4b90ed7cae
OpenDelta: Add download notification actions
Also reliability improvements to the way the UI reflects current state
2022-08-04 20:58:31 +03:00
Ido Ben-Hur 34eba98b80
OpenDelta: Provide a proper UI for pausing / resuming downloads
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
2022-08-04 04:41:22 +03:00
Ido Ben-Hur e1c7850150
OpenDelta: Avoid getting stuck in null state
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
2022-08-01 14:32:45 +03:00
Ido Ben-Hur feda8bbda7
OpenDelta: Clean some mess, Target latest SDK
* 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.
2022-08-01 14:05:28 +03:00
Ido Ben-Hur 565bc3b464
OpenDelta: Fix checksum validation for existing files
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
2022-07-29 21:15:43 +03:00
Ido Ben-Hur 39278dbb2a
OpenDelta: Get rid of old .part files
Just incase the user interrupted a download and decided to wait till the next one
Also fix some typos
2022-07-10 14:27:30 +03:00
Ido Ben-Hur 305b6fd61f
OpenDelta: Make sure we close I/O streams
After downloading / when failing
2022-07-10 11:31:57 +03:00
Ido Ben-Hur eca96ad8f7
OpenDelta: Only set PREF_LAST_DOWNLOAD_TIME once 2022-07-08 15:13:26 +03:00
Ido Ben-Hur 1402f86464
OpenDelta: Delete the downloaded file if corrupted
Resume is no more and the file sum is still mismatching - get rid of it
2022-07-08 14:04:15 +03:00
Smogr Hzzgn 311a879f35
OpenDelta: Show MiB/s when more than 1023 KiB/s (#1) 2022-04-21 23:05:59 +03:00
Ido Ben-Hur ae8c38836c
OpenDelta: Resume interrupted downloads
And update download progress less frequently
2022-02-21 14:12:14 +02:00
Ido Ben-Hur 22e8f90c3b
OpenDelta: Add support for AOSP recovery on A-only
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.
2022-02-03 14:30:24 +02:00
Ido Ben-Hur 900a97d116
OpenDelta: Check if already installed more reliably
In case the user opened the app too soon after boot
2022-01-24 03:43:33 +02:00
Ido Ben-Hur 9aa25d9150
OpenDelta: Correctly split % between AB flashing stages
Also get rid of that stupid hacky method of setting offset wtf??
2021-12-15 03:36:32 +02:00
Ido Ben-Hur 8d9c84958c
OpenDelta: Resume showing A/B progress if closed
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.
2021-12-15 03:12:03 +02:00
Ido Ben-Hur edd17def43
OpenDelta: Do not hardcode button color
A. It is a bad pracrtice
B. It is barely readable in some cases
2021-11-24 01:53:12 +02:00
Ahmed Harhash 4871877b6e
OpenDelta: Update app icon
* Update the YAAP logo
2021-11-22 18:53:21 +02:00
Ido Ben-Hur 77f43ce75d
OpenDelta: Update configs for A12 2021-11-19 18:17:57 +02:00
Ido Ben-Hur 9d63b089ce
OpenDelta: Adapt to new advanced reboot API 2021-11-19 15:57:39 +02:00
Ido Ben-Hur decfcdf982
OpenDelta: Add missing header libs
aka fix build on A12
2021-11-19 15:11:32 +02:00
Ido Ben-Hur 271879d356
OpenDelta: Dismiss download notification when done 2021-08-09 19:26:52 +03:00
Omkar Chandorkar 31ef3ab628
OpenDelta: check ro.yaap.device instead
* people can't seem to stop spoofing props and I am sick of it

Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
2021-08-05 18:43:40 +02:00
Ido Ben-Hur 64bc398cf9
OpenDelta: Get rid of more deprecations and bad practices 2021-08-03 18:17:46 +03:00
Ido Ben-Hur 1ba5c4427e
OpenDelta: Comply with android 11's scoped storage
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.
2021-07-27 13:12:19 +03:00
Jyotiraditya Panda 3dbbddd548
OpenDelta: Switch to blueprint
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
2021-07-02 02:28:28 +03:00
Adhitya Mohan 1848bb6046
OpenDelta: Grammar fixes 2021-06-29 01:42:30 +03:00
Ido Ben-Hur 115fa4fbef
OpenDelta: Slightly improve notifications
* Use a more standardized delimiter for notification sub
* Handle everything from UpdateService
* Never show an empty sub
2021-06-28 02:53:03 +03:00
Ido Ben-Hur 9a154abcd4
OpenDelta: Add progress to the download notification
Also display ETA and speed
2021-06-26 04:36:11 +03:00
Ido Ben-Hur 4cb95a5d9a
OpenDelta: Refresh progress bar on orientation change 2021-06-15 14:09:20 +03:00
Ido Ben-Hur 67f45dea51
OpenDelta: Make A/B progress & checking notifications ongoing 2021-06-14 14:27:21 +03:00
Ido Ben-Hur 11dcea1d74
OpenDelta: Enable local file flash for all, permanently
AKA get rid of that toggle and enable for non AB devices
2021-06-14 14:07:36 +03:00
Ido Ben-Hur 2a0506216d
OpenDelta: Increase padding between buttons 2021-06-14 13:45:48 +03:00
Ido Ben-Hur 42fd04be15
OpenDelta: We rewrote and added enough - add ourselves to about 2021-05-21 14:25:37 +03:00
Ido Ben-Hur 302705edba
OpenDelta: Simplify auto download network type option
Who needs a specific checkbox for each network????
Also get rid of deprecated API calls all over the place, properly use
ConnectivityManager. Clean the NetworkState class
2021-05-15 19:26:08 +03:00
Ido Ben-Hur 1b8c38c3dc
OpenDelta: MD5 -> SHA-256 2021-05-05 19:49:21 +03:00
Ido Ben-Hur 152ebf9110
OpenDelta: Improve code all across
* Simplify some logic
* Get rid of unused imports
* Global vars that can be final / static should be
* Correctly handle & compare strings all across
* Get rid of useless castings, conversions, scoping etc
* Make this mess slightly more readable
* Many many more. Too lazy to sum up all

Left todo:
Get rid of deprecation all across, this is gonna be a huge pain in the
future if we don't.
2021-05-05 19:49:21 +03:00
Ido Ben-Hur 436ccaa8b2
OpenDelta: Change our official tag
R stacks are available, we need seperation
2021-04-06 01:13:29 +03:00
Ido Ben-Hur dfe5b37c50
Revert "OpenDelta: Hide A/B perf mode for now"
This reverts commit 6b07ff9560.
2021-03-19 14:45:04 +02:00
Ido Ben-Hur 475166fab5
OpenDelta: Adapt configs for YAAP 2020-12-11 22:16:27 +02:00
Ido Ben-Hur 96ab5c6225
OpenDelta: Use our advanced reboot 2020-12-07 00:22:45 +02:00
Ido Ben-Hur 6b07ff9560
OpenDelta: Hide A/B perf mode for now
or forever
2020-12-07 00:22:45 +02:00
Ido Ben-Hur d9252c49b5
OpenDelta: Add YAAP logo 2020-10-28 16:12:15 +02:00