Allow importing and installation of OTA files already
downloaded instead of requiring to reboot to recovery
to install them.
Squash of:
- Add support for importing local updates
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
Change-Id: I64ca3a6af29bdf8b2c6023a502f23080a27fd79e
- OTA: read timestamp from imported zip metadata
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
Change-Id: I93a5c0be81adab9ba8e50afde0e09839f059c9e0
- OTA: fix UI issues with local update
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
Change-Id: I07c8f5507bc52c254c3dc1468fea495a073ae96c
- OTA: fix local updates not being shown in UI (pt.2)
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
Change-Id: Ife40eea05099eca9e1ee84c6f87d2715e5981cab
- OTA: ignore download status changes for local updates
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
Change-Id: I198f9b5462718f8a6e5687c891f3bfc6b1c645bd
- UpdaterService: fix crash with local install
Change-Id: I27b187cf4adec986d516e3017d1b3877691029b2
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
- Local updates: do not remove local update from ui after installation
Change-Id: I869e090f26273006f933ad99c42b7c6a2e963797
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
- Local updates: modify display version
Change-Id: I8a39e0936040bb9546499754ab4a9ef60c56aca0
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
- Local updates: show build date in import dialog
Change-Id: I9014358ea1cf941e76fdd80a5147e9d924fc1a8f
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Change-Id: I64ca3a6af29bdf8b2c6023a502f23080a27fd79e
Signed-off-by: Joey <joey@lineageos.org>
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
* If an update exists and can be deleted, the action button AND the
popup menu both show the delete action
* By checking wether the action already shows "Delete" we can hide
that action from the submenu
* Additionally check for online availability to only hide it when it's
not the last item - otherwise a click on the menu icon wouldn't do
anything
Change-Id: Idc5da3962be4e0a69847f47b3c5f014b251bd438
* Instead of hardcoding it to 86dp (which was probably fine
when we didn't have cutouts, calculate the required top margin
by adding top inset and status bar height and applying it dynamically
* Increase compile and min sdk versions to avoid warnings - we compile
using the build sdk (33) when building inline anyway
Change-Id: I80444e5a2247730f06af461a1cce7ac36c6c9631
* Better integrate with Settings by changing the background
so it matches the Toolbar - one solid background
* Make updates distinct cards with rounded border and
add spacing between them
Change-Id: If9c649f63e9bb3762f2ae272c96f5e62e0821e46
* For cases like local Updates (not yet merged) and probably
others, the parsing might fail and take down the Updater
* Handle NFE properly
Change-Id: If9609c59d1048c9d37aa6de90855e02f28d96ce2
* Let's be more Android Studio friendly
* While at it match AOSP deps with Gradle ones and update them
Change-Id: Ib8829e3d954ce43fbf19280d1db2bc43c6fc89e0
Instead of assuming so, based on whether user is connected over
a WiFi or Ethernet connection, simply use the proper API.
Use default value of PREF_MOBILE_DATA_WARNING, if it had been
already set.
Change-Id: Ie4fa0301df7f2cebf94c967fc188acc54b2ce71e
Signed-off-by: althafvly <althafvly@gmail.com>
Mobile builds on devices with no touch panel are also getting these
settings applied, which is not intended.
Change-Id: I02fac65dc7042c04259d6f65a957185aac32a252
Currently at most of the places, build version is obtained from BuildInfoUtils.getBuildVersion()
method. This method obtains build version from the current running system's property.
However, in case there is a version bump on OTA, this logic results in wrong version
being shown to the user while updating/upgrading the system.
Get the version from the update itself to show the proper version in update notification
and pre-install warning.
Signed-off-by: Aayush Gupta <theimpulson@e.email>
Change-Id: Ia74085d8d7c067c408e7cfce1de90d49dcc68307
-----
E RecoverySystemService: Failed to reserve space for compressed apex:
E RecoverySystemService: java.io.FileNotFoundException: /data/lineageos_updates/lineage-19.1-20220422-UNOFFICIAL-GMS-sagit.zip.uncrypt (Permission denied)
E RecoverySystemService: at java.util.zip.ZipFile.open(Native Method)
E RecoverySystemService: at java.util.zip.ZipFile.<init>(ZipFile.java:265)
E RecoverySystemService: at java.util.zip.ZipFile.<init>(ZipFile.java:187)
E RecoverySystemService: at java.util.zip.ZipFile.<init>(ZipFile.java:158)
E RecoverySystemService: at com.android.server.recoverysystem.RecoverySystemService.getCompressedApexInfoList(RecoverySystemService.java:921)
E RecoverySystemService: at com.android.server.recoverysystem.RecoverySystemService.allocateSpaceForUpdate(RecoverySystemService.java:972)
E RecoverySystemService: at android.os.IRecoverySystem$Stub.onTransact(IRecoverySystem.java:156)
E RecoverySystemService: at android.os.Binder.execTransactInternal(Binder.java:1179)
E RecoverySystemService: at android.os.Binder.execTransact(Binder.java:1143)
E UpdateInstaller: Could not install update
E UpdateInstaller: java.io.IOException: Failed to allocate space for update /data/lineageos_updates/lineage-19.1-20220422-UNOFFICIAL-GMS-sagit.zip.uncrypt
E UpdateInstaller: at android.os.RecoverySystem.installPackage(RecoverySystem.java:678)
E UpdateInstaller: at android.os.RecoverySystem.installPackage(RecoverySystem.java:596)
E UpdateInstaller: at org.lineageos.updater.controller.UpdateInstaller.installPackage(UpdateInstaller.java:100)
E UpdateInstaller: at org.lineageos.updater.controller.UpdateInstaller.access$400(UpdateInstaller.java:35)
E UpdateInstaller: at org.lineageos.updater.controller.UpdateInstaller$1.run(UpdateInstaller.java:144)
E UpdateInstaller: at java.lang.Thread.run(Thread.java:920)
Change-Id: I8250bf58709b92572cdffc8e5faca4bf243935aa
* When pausing and resuming, the ETA calculation is off by a lot
due to the time diff since the last calculation resulting in a
big delta and therefore a very low speed
* By fixing this, we also need to set the last byte count to the total
byte count there, otherwise the downloaded bytes since last calculation
will be larger than in reality, resulting in too fast speeds calculated
Change-Id: Ica1053cc297ff59221ea2bc0014f20973a080c88
Author: Michael W <baddaemon87@gmail.com>
Date: Fri Feb 11 18:16:02 2022 +0100
Updater: Move progress next to progressbar
* The progress text can get very long, resulting in jumping marquee text
* In order to reduce the length, move the percentage out of the text
and next to the progressbar
* The behavior can be observed e.g. on pro1 in german, where the button
is also wider due to the german text
Change-Id: I0276182efed757c0929b31434edad9be548b841c
Author: Timi Rautamäki <timi.rautamaki@gmail.com>
Date: Thu Mar 3 16:12:16 2022 +0000
fixup! Updater: Move progress next to progressbar
Fix crash on ATV devices by applying same layout changes to
layout-large-notouch.
Change-Id: Id6eabcf8b1960106eb63bd15bcf97f9b4cf0bbc8
Change-Id: I8aed4c35c6ac4261c0536a6b263d63f5b1fd11ba
-----
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: FATAL EXCEPTION: main
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: Process: com.shiftos.updater, PID: 19707
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.shiftos.updater/org.lineageos.updater.controller.UpdaterService }: app is in background uid UidRecord{1463ce2 u0a63 TPSL bg:+47m50s26ms idle change:idle procs:1 seq(0,0,0)}
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1616)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.ContextImpl.startService(ContextImpl.java:1571)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:669)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at org.lineageos.updater.UpdatesActivity.onStart(UpdatesActivity.java:181)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:7847)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3295)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7397)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
-----
Change-Id: Ibc2d471b028c1d4e824b3ede4bbc336d76801f88
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
* It's not immediately clear that an export is started since the
notification isn't intrusive
* Show a toast - that will be clear enough
Change-Id: I78d78b23884df3ddb37bc486c1d6012f899c888d