Age | Commit message (Collapse) | Author |
|
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
|
|
* Make final where possible
* Remove unused casts, imports, methods, enums and constructors
* Add null checks
Change-Id: Idd1a16426dd1928e2ed9922f5a35ba32ce4f808b
|
|
Fixes:
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE
or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some
functionality depends on the PendingIntent being mutable,
e.g. if it needs to be used with inline replies or bubbles.
Change-Id: I63b25512d3bf6e0d3b0cc95d91295f4065175848
|
|
* Even if the package is removed on A/B devices
we still want to show the reboot notification
Change-Id: I980d36766a1427874b65b11674a8f0ae4ce1db88
|
|
* Looks like we first need to process the notification before we can delete
an update
Change-Id: I49f6c03a109f908e8a7b01f02b821a68ab273af3
|
|
Change-Id: I7bd67915638db5330b854f66f9fc1adb864b64be
|
|
Change-Id: I0387fd491a07a2214e4331a2cfe25988e0016a61
|
|
FLAG_ONE_SHOT doesn't make so much sense here, the intents are generic
and can be repeated.
Change-Id: Ib457d975387dfd838372639e2aaa40a3df6f4d15
|
|
- Don't use BigTextStyle if we only need to show a single line of
text, but keep using it if the progressbar is visible.
- Change the icon to reflect the currrent state.
- Use android.R.drawable instead of com.android.internal.R.drawable
Change-Id: I0f69fe5f4fa63cdec180e89afa098d27819f33fd
|
|
For symmetry with ABUpdateInstaller.
Change-Id: I9b61ed286c91f10140705e7b3e24b0eab0c75f49
|
|
This is just useless as is.
Change-Id: I957ea3bda4097ccb8d730943639cd5e74b1b2440
|
|
Change-Id: Ie6bbbddbbd9fd7adbc16472ad9c42c1d257413a1
|
|
This should prevent future changes from accidentally turning a
sticky service into a not sticky one.
Change-Id: I89f172626a98635149441a63536e0aa5a27f8280
|
|
The NPE shouldn't happen as we get a null intent only when the
service is sticky (i.e., isInstallingUpdate() is true), so this
is currently not a problem.
Change-Id: I8647498d9a1022f5c7207a2da3e42cf57d9ee030
|
|
We are loosely tied to UpdateEngine and have no way to know whether
we are bound or not without keeping track of the connection manually.
Since UpdaterService is for both A/B and legacy updates, turn
ABUpdateInstaller into a singleton to keep the code simple while
ensuring that a single callback is registered.
Change-Id: Ib4e9ad1413ba96bf5ed59cc3383741b5c9bac427
|
|
Change-Id: I2f538fb47fe90e1008bf286739d33c829123353a
|
|
Change-Id: If49c8d0ca2270f22dcc5350379f1bb1f34f02041
|
|
Change-Id: I5e11db1e6e338a510b3c1c7d16f8c085d874a9db
|
|
Same as change I488018d01c0baf74660362a384e53bfe5d85de2b
("Use a service to export the updates"). While at it, move the code
out of UpdaterService to better separate the code that deal with AB
updates and regular updates.
Change-Id: I2bc3e78e80f5e63c57303cbbcdc0353dbab0f67f
|
|
This allows to show the correct labels.
Change-Id: I52f42e042af0df2d091d786c03102cec352b3a5b
|
|
Change-Id: I46884b42b6e3f87fbee99a23f538cec990b3b873
|
|
The update engine service is independent and once started doesn't need
our service to install updates. Therefore we can't assume that our
service will stay up as long as the installation is being performed.
If the service gets terminated while an update is being installed, we
simply lose our connection to the update engine service and stop
receiving notifications, the installation itself won't stop. Keep
track of ongoing installations using a shared preference and use a
sticky service when installing updates. The service will try to
re-connect to the update engine service and determine if the
installation is still ongoing.
Change-Id: Id2fc11cab51610d04bf41a0927824bb8c0c94d71
|
|
Change-Id: If8cd2e2da1f15a4af415aa35ccf61052c318333f
|
|
Change-Id: Ibb77c7f0d4309874fcfa591d12b5e6ce4a6d6abc
|
|
Change-Id: Iac7e838e8ecf1e5ed27bb0c9587442aa2ec8ffec
(cherry picked from commit 8ff6f57e7bb353e9daeb2cfa279b349a8b560538)
|
|
Change-Id: I2e5eaffa2b64ce8d387958b070a23f393f827c5e
|
|
|
|
ic_tab_install is basically the same as ic_system_update. The only
difference is the color, but that doesn't really matter.
|
|
|
|
This is mostly useful on encrypted devices since it allows to not
copy the update before installing it.
|
|
On encrypted devices, uncrypt modifies the zip so that it can be
read without mounting the filesystem. Instead of installing the zip
downloaded, create a copy of it which will be deleted. This will
allow to re-install the zip multiple times or export it after
installing it.
|
|
This also changes the code to use the new interfaces wherever the
update is not supposed to change.
|
|
These went out of order moving some stuff around. Reorder them so
that there won't be unnecessary line changes in future.
|
|
|
|
|
|
DateUtils.formatDuration() is not public, so create our own version.
|
|
|
|
|
|
Be consistent with the rest of the app and use "version - date".
|
|
Since there's no quick and clean way to show a dialog from a
serivice, don't allow to install updates from the notification.
|
|
|
|
This allows to easily handle AB updates.
|
|
This allows to properly update the status of the application.
In particular, when an update is deleted:
- Cancel the associated notification, if any.
- Remove the entry from the controller if the update is no longer
available online.
- Disable the resume button if download is partially downloaded
and is no longer available online.
|
|
Loosely based on:
https://github.com/LineageOS/android_packages_apps_CMUpdater/commit/0465cb691de5acd2f459ce0687b988ddf050b354
|
|
Similar to the 'paused' case, but take into account that the error
can happen when the progress is 0, in which case we just hide the
progress bar.
|
|
|
|
|
|
We are using it as non-sticky service, so just declare it as such.
|
|
These classes do more than controlling the download of the updates.
|