Gabriele M
e710060baa
Show a snackbar when trying to download/install invalid updates
...
Instead of disabling the action button, keep it enabled and make it
show a snackbar to inform the user about the impossibility of
installing the selected update.
2017-07-18 00:19:41 +02:00
Gabriele M
c1f0aab382
Show snackbar for some download status changes
2017-07-17 12:27:15 +02:00
Gabriele M
1f0aa4e79b
Collapse header if the device has no touchscreen
...
The header can't be collpased without a touchscreen, so collapse
it if we detect that the current device has no touchscreen.
2017-07-17 12:26:18 +02:00
Gabriele M
e51be80f6a
Initial UI work
...
Look and feel based on CMUpdater.
2017-07-16 22:52:45 +02:00
Gabriele M
fd856dce70
Allow to disable the automatic updates check
2017-07-16 22:52:45 +02:00
Gabriele M
66ca7a79df
Sort the updates, not their IDs
...
Also, use a comparator to sort the updates and stop using the
Comparable interface. There are different ways to sort updates,
so don't define one.
2017-07-10 01:32:19 +02:00
Gabriele M
e34334a1d7
Pass the destination File to the callback
...
The current argument is unused and it should have been removed
with commit 81229329f1
("Generate download clients using a builder class"). Instead of
removing it completely, use it to pass the File of the download.
2017-07-10 01:31:35 +02:00
Gabriele M
a2919a8947
Don't modify the objects of the controller directly
...
Add a method to the controller that allows to set a list of
downloads as not available online.
2017-07-08 22:10:58 +02:00
Gabriele M
81229329f1
Generate download clients using a builder class
...
This change allows to define a proper interface for the download
client and keep its implementation completely separate. It also
allows to create clients without starting the download right away,
which could be useful when defining callbacks that require a
reference to the client.
Note that this change also drops the unused methods of DownloadClient.
2017-07-08 17:43:56 +02:00
Gabriele M
26f149bef1
Import updates downloaded with CMUpdater
2017-07-08 14:05:19 +02:00
Gabriele M
c90700d3d2
Remove no longer available updates when refreshing the list
2017-07-07 22:05:23 +02:00
Gabriele M
d327d61cc6
Send an event when update are canceled
...
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.
2017-07-07 22:05:22 +02:00
Gabriele M
47f48cff3f
Fix first updates list load
2017-07-06 22:07:36 +02:00
Gabriele M
718c877687
Provide some feedback when refreshing the list
...
Add a progress dialog to inform the user about the ongoing operation
and show a snackbar with the result of the operation.
2017-07-05 23:35:14 +02:00
Gabriele M
7819587a22
Add a toolbar menu with back and refresh buttons
...
Change theme just to make the refresh button visible without
changing its color.
2017-07-05 23:35:14 +02:00
Gabriele M
eaba161d43
Replace current json only if new one is valid
2017-07-05 23:35:14 +02:00
Gabriele M
1795bd8b11
Report if a failure is following a download abort
2017-07-05 23:35:14 +02:00
Gabriele M
e245631b46
Add support for A/B (Seamless) System Updates
...
Loosely based on:
https://github.com/LineageOS/android_packages_apps_CMUpdater/commit/0465cb691de5acd2f459ce0687b988ddf050b354
2017-07-04 19:36:32 +02:00
Gabriele M
520105284c
Rename some constants
2017-07-04 19:05:04 +02:00
Gabriele M
db3f14832a
Replace 'Download' prefix with 'Updater'
...
These classes do more than controlling the download of the updates.
2017-07-04 19:05:04 +02:00
Gabriele M
9b3deda9fa
Protect DownloadController instantiation
...
Enforce the use of DownloadService to create new DownloadController
instaces, but give access to the existing instances to anyone.
2017-07-03 17:41:33 +02:00
Gabriele M
bda4d2b9b4
Load the updates stored in the database from DownloadController
...
Also, hide the distinction between local and non-local updates.
Local updates should be handled only by DownloadController.
2017-07-03 16:08:31 +02:00
Gabriele M
e7511d0041
Project init
2017-07-02 18:13:34 +02:00