aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Updater: Add notification channelsstaging/lineage-15.1Harry Youd2018-01-234-6/+40
| | | | Change-Id: I2f538fb47fe90e1008bf286739d33c829123353a
* Add support for duplicate linksGabriele M2018-01-233-3/+112
| | | | | | | | | Support duplicate links [1] to handle better temporarily unavailable mirrors. [1] https://tools.ietf.org/html/rfc6249 Change-Id: If78fb4a90da68ef221294eed2c59063a14cf1f43
* Updater: Android Studio supportGabriele M2018-01-236-0/+189
| | | | | | See README-STUDIO.txt for more info. Change-Id: Ie673bba5618b0f00a585049cd85687a64db2b420
* Updater: Set version code explicitlyGabriele M2018-01-231-1/+2
| | | | | | | In this way apks built with gradle/Android Studio will have the same versionCode, allowing to update the one in /system. Change-Id: I020cc623dd7c1c5085fec4e6f5978b6ee46468a2
* Remove progress from notification when doneGabriele M2018-01-231-2/+6
| | | | Change-Id: If49c8d0ca2270f22dcc5350379f1bb1f34f02041
* Report installation failuresGabriele M2018-01-233-2/+12
| | | | Change-Id: I5e11db1e6e338a510b3c1c7d16f8c085d874a9db
* Copy the updates for uncrypt using a ServiceGabriele M2018-01-238-128/+181
| | | | | | | | | 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
* Keep track of the installation status of AB updatesGabriele M2018-01-236-14/+26
| | | | | | This allows to show the correct labels. Change-Id: I52f42e042af0df2d091d786c03102cec352b3a5b
* Don't allow any operation if a reboot is neededGabriele M2018-01-231-10/+14
| | | | Change-Id: I175525071faa44f30b8f2bbf36da56a2e6f2dd1b
* Allow to cancel ongoing installationsGabriele M2018-01-235-1/+71
| | | | Change-Id: I46884b42b6e3f87fbee99a23f538cec990b3b873
* Allow service restarts while installing AB updatesGabriele M2018-01-234-36/+99
| | | | | | | | | | | | | | | 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
* Wait for the UPDATED_NEED_REBOOT statusGabriele M2018-01-231-21/+14
| | | | | | | | | Consider an update as installed only when update engine reports that the device needs to be rebooted. This change also move the entire logic in onStatusUpdate(), which reports all we need to properly track the progress of the installation. Change-Id: Ic8db00cccdd19fd62ba4dee31fd1dccc9037193d
* Show progress when installing AB updatesGabriele M2018-01-232-3/+6
| | | | Change-Id: If8cd2e2da1f15a4af415aa35ccf61052c318333f
* Use a service to export the updatesGabriele M2018-01-235-88/+224
| | | | | | | | AsyncTasks are not suitable for long lasting operations and can easily cause memory leaks. The use of ProgressDialogs is also discouraged, so move to a foreground service to export the updates. Change-Id: I488018d01c0baf74660362a384e53bfe5d85de2b
* Stop service when pausing downloadsGabriele M2018-01-231-0/+2
| | | | Change-Id: Ibb77c7f0d4309874fcfa591d12b5e6ce4a6d6abc
* Use the right preference for the auto-delete optionGabriele M2018-01-181-1/+1
| | | | | Change-Id: Iac7e838e8ecf1e5ed27bb0c9587442aa2ec8ffec (cherry picked from commit 8ff6f57e7bb353e9daeb2cfa279b349a8b560538)
* Updater: Move to new lineage build propslineage-15.0Harry Youd2017-11-281-4/+4
| | | | Change-Id: I6ff93f34602de6e79208d382f9be157c14ffbb99
* Don't stop service while installing AB updatesGabriele M2017-11-121-1/+2
| | | | Change-Id: I2e5eaffa2b64ce8d387958b070a23f393f827c5e
* Show delete button for old updatesGabriele M2017-11-123-1/+27
| | | | | | | Old updates can't be installed if the current build is newer, so show a delete button instead. Change-Id: Ib34aad31d93e87a1009c23f86686fc4a008129e7
* Implement DownloadClient using HttpURLConnectionGabriele M2017-11-127-324/+267
| | | | | | | | | | | | The version of OkHttp used in AOSP doesn't handle dynamic table size updates [1] properly [2]. Instead of fixing OkHttp or importing a prebuilt updated version, implement a new download client only using HttpURLConnection, which seems to work properly. [1] https://tools.ietf.org/html/rfc7541#section-6.3 [2] https://trac.nginx.org/nginx/ticket/1397 Change-Id: I3eedf7326f2017812c4a12d41f9ea028d255f7a8
* Automatic translation importAbhisek Devkota2017-10-219-5/+391
| | | | Change-Id: I139708300601c694863783cb23cf7c2ce49150f3
* Updater: Allow specifying a new device namePaul Keith2017-10-122-1/+3
| | | | | | | | | | * To allow transitions from e.g. variant->unified build * Example process, using klteusc->klte as the example: - Set ro.updater.next_device to klte in klteusc's tree - Wait for build to roll out with ro.updater.next_device - Pull klteusc from build roster Change-Id: I3c70d54de3f9e036cd8700edc4ee0b11093740d2
* Automatic translation importAbhisek Devkota2017-09-1999-0/+4132
| | | | Change-Id: I15611e4ff76d2364d8be1c1873dc40796e17a7f1
* Improve the automatic updates checksGabriele M2017-08-312-44/+115
| | | | | | | | | | | | | The builds for each device are released more or less at the same time of the day, so check when the last build was released and schedule the next check accordingly. Also, allow multiple automatic updates check in the same day. There's no need to limit the number of checks since they are not frequent and this can affect negatively the effectiveness of the new algorithm. In addition to that, remove any pending oneshot alarm in case a subsequent check succeeds and log every new alarm. Change-Id: I4668f2e342e51d3578992eec6d8c270065d9aa21
* Minor code refactoringGabriele M2017-08-311-14/+16
| | | | | | | Use a separate function to process the new json to increase the readability of the code. Change-Id: If508563fd9ccb2a6b0edb40a3cfe2a0081cb97f4
* Allow to keep incompatible updates when parsing jsonsGabriele M2017-08-311-1/+1
| | | | | | | The condition was wrong and incompatible updates were always discarded regardless of the flag passed. Change-Id: Iefc2d64b841921eb77a9f73cf374b63b477d2588
* Show alert dialog for major upgradesGabriele M2017-08-253-1/+49
| | | | | | | | | | Major upgrades are not possible with Updater and they are already blocked. This commit adds a dialog with a link to a webpage that explains how to upgrade manually. Based on: https://github.com/LineageOS/android_packages_apps_CMUpdater/commit/d5d343d6275c0c896e2f50daa1ef5aec973ef891 Change-Id: Ifb23e0a4db1060fc696d13e6694f3e849af70e2d
* Show the actual version of the updateGabriele M2017-08-251-1/+1
| | | | | | | We were showing the version of the currently installed build for all the updates. Change-Id: I76150ff248d6c6a106571c2ba4d26ae57847aed3
* Fix No updates found for users with Turkish LocaleMustafa Karatas2017-08-202-2/+4
| | | | | | | | | | | | | | | | There is a problem with Java's toLowerCase() method which returns "LATIN SMALL LETTER DOTLESS I" for "I" character. This breaks update check because Utils.getInstalledBuildType() returns "nıghtly (notice dottles small i)" instead of "nightly". This change forces toLowerCase() to use ROOT locale which is recommended in javadocs There is a note for Turkish locale on javadocs: http://devdocs.io/openjdk~8/java/lang/string#toLowerCase-- Change-Id: Ifada815202588d67643136846de08f94cefb46a5 Signed-off-by: Mustafa Karatas <mstfkaratas@gmail.com>
* Don't change status when cancelled downloads failGabriele M2017-08-181-1/+0
| | | | | | | | | | | | | | | | | It takes a bit of time to actually pause (i.e. cancel) a download. If we change the update status once the download is actually cancelled, we might override any status change that happened between the user request and its completion. For example, the following can happen when the user deletes an ongoing downloads: - pauseDownload(): DOWNLOADING -> PAUSED - deleteUpdate(): PAUSED -> DELETED - onFailure(): DELETED -> PAUSED Don't change the status of cancelled downloads from the onFailure() callback not to have an incorrect final status. Change-Id: Iee90482d82df984672c59d7c508ad834fa08061f
* Disable clip to paddingLuca Stefani2017-08-141-0/+2
| | | | | | * Allow the last item shadow to be seen Change-Id: If24b0db3feb75a4468b6dddde62b4c79917552c8
* Don't add margins in update itemsLuca Stefani2017-08-141-2/+0
| | | | Change-Id: I71a22a4bd0a15e70a045cef1c49f67ff5625dbd6
* Exclude updater from recentsLuca Stefani2017-08-141-1/+2
| | | | Change-Id: Iae2737aa5890aa00da79c5b04dd253273aa9fabc
* Show message if there are no updatesGabriele M2017-08-093-9/+33
|
* Don't use lower case device names when requesting the updates listGabriele M2017-08-081-1/+1
| | | | | URLs are case sensitive, the server expects the same exact value stored in the system property, so don't change it.
* Dismiss some notifications when clickedGabriele M2017-08-082-0/+10
|
* Warn user about downloading update package via mobile dataGabriele M2017-08-087-1/+81
| | | | Based on: https://github.com/LineageOS/android_packages_apps_CMUpdater/commit/89284925355ff221713572f85266ec524b582bdd
* Remove duplicate iconGabriele M2017-08-072-12/+1
| | | | | ic_tab_install is basically the same as ic_system_update. The only difference is the color, but that doesn't really matter.
* Add permission to show system alert dialogsGabriele M2017-07-261-2/+3
| | | | While at it, sort the permissions and fix their coding style.
* Actually check if an OTA is encryptedGabriele M2017-07-262-8/+5
|
* Restore the status of the checkboxes when creating the menuGabriele M2017-07-221-0/+6
|
* Allow to delete updates currently in downloadGabriele M2017-07-221-0/+2
|
* Add option to delete updates when installedGabriele M2017-07-226-7/+45
| | | | | This is mostly useful on encrypted devices since it allows to not copy the update before installing it.
* Create a copy of the zips on encrypted devicesGabriele M2017-07-215-3/+136
| | | | | | | | 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.
* Rename cancelDownload() to deleteUpdate()Gabriele M2017-07-213-3/+3
| | | | The method can be used to delete any update, incomplete or not.
* Rename UpdateDownload and Update classesGabriele M2017-07-218-209/+209
|
* Define interfaces with only getters for the updatesGabriele M2017-07-2111-68/+153
| | | | | This also changes the code to use the new interfaces wherever the update is not supposed to change.
* Reorder includes directivesGabriele M2017-07-216-11/+11
| | | | | These went out of order moving some stuff around. Reorder them so that there won't be unnecessary line changes in future.
* Allow to resume updates fully downloadedGabriele M2017-07-201-2/+3
| | | | | | Resuming an update fully downloaded will simply trigger an update verification. This is useful for imported downloads since it allows exporting them.
* Allow to export verified updatesGabriele M2017-07-208-0/+316
|