Commit Graph

244 Commits

Author SHA1 Message Date
Michael Bestas
56349fabc5 Automatic translation import
Change-Id: Ibbab351981135e7f0c213a97f169d98b737aff27
2019-08-25 19:28:18 +03:00
Michael Bestas
a3332eca1f Automatic translation import
Change-Id: Ic00c496504fe3e3083dff55b70b660d8fa11f5e4
2019-08-04 16:24:50 +03:00
Michael Bestas
d9fe6ee908 Automatic translation import
Change-Id: I90864874a46a7e651ded45605cf3d99d7b37f400
2019-07-06 11:59:32 +03:00
Michael Bestas
44a35fca4d Automatic translation import
Change-Id: I406b8de8d199e2c230254787aa0a29924952e8de
2019-06-19 21:21:33 +03:00
Michael Bestas
22a41280f0 Automatic translation import
Change-Id: I5c475240409637bee28aafba6b752e96509a97d7
2019-06-08 18:59:02 +03:00
Michael W
5763bc9d38 Updater: Make upgrade-url device specific
* After moving from the generic /upgrade.html url to a device specific
  one, updater needs to display that instead

Change-Id: If9fc6bddfab206a97283f2080ea4df0cbb742a7d
2019-04-28 11:33:32 +02:00
Luca Stefani
50d0fd5291 Updater: Allow to suspend A/B updates
Change-Id: I0387fd491a07a2214e4331a2cfe25988e0016a61
2019-04-10 22:04:32 +02:00
Michael Bestas
6a012ef541 Automatic translation import
Change-Id: I887ce69c970d42e6026c41c54edd5160b53f00b2
2019-04-07 21:59:19 +03:00
Michael W
dc17539da6 Automatic translation import
Change-Id: Ice67efb943862bc160150a4b1424e6af4f9511d8
2019-03-11 00:22:30 +01:00
Han Wang
f4a3c575f4 Updater: Assume older Android version to be incompatible
* Issue happens when both 15.1 and 16.0 are built.

Change-Id: I0cb7c834824056f450129524a7aec8091c9d3dc7
2019-03-05 09:59:45 +01:00
Michael Bestas
2849967e61 Automatic translation import
Change-Id: I3d9d81c42c6e6465cd66a12054389bafe34ad192
2019-02-26 19:01:42 +02:00
LuK1337
2454a339a3 Updater: Implement auto update check interval preference
* This replaces auto update check switch with a dropdown with 4 options:
  * Never
  * Once a day
  * Once a week (default)
  * Once a month

Change-Id: I4bcae4c013a5d44958f9c54d641e64aac3062a8b
2019-02-10 10:45:35 +01:00
Michael Bestas
ee251456c3 Automatic translation import
Change-Id: I699982fe2506a85cf9cb05295fafef3e59467b8d
2019-01-12 20:04:46 +02:00
LuK1337
a08dcb6078 Updater: Grant FOREGROUND_SERVICE permission
* Required to be able to call startForeground()
  and stopForeground().

Change-Id: I7ac78cf450a60cc8985876ddcc42621e61aa5245
2018-09-27 19:50:55 +02:00
Luca Stefani
6c67e68d55 Updater: Add SYSTEM_UPDATE_SETTINGS intent filter
Change-Id: Ie3f32e91ff5d6dc1422783bdef403c023b519149
2018-08-30 18:07:11 +02:00
Nolen Johnson
3f16a3cafc Updater: Clarify A/B Performance mode string
Change-Id: I8891b94c4b44201e9a0d9184e435c8da6eba3d3b
2018-08-30 14:12:35 +02:00
Anton Hansson
832efc94ca Updater: Set LOCAL_PRIVATE_PLATFORM_APIS
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Bug: 73535841
Change-Id: Iabb0556dc1c80c7fc7f6c76d61d5e441b03cdce0
2018-08-26 15:28:08 +02:00
Michael Bestas
6ba5645d01 Automatic translation import
Change-Id: I500c131c176e7f511972bb0b1529e54f127b7306
2018-08-16 19:08:22 +03:00
LuK1337
7ad6b6153a Updater: Fix EXTRA_PLUGGED check in isBatteryLevelOk
* EXTRA_PLUGGED is not a boolean.

Change-Id: I3c2869cc4e08b48e396e5bae5ef22383fcbf7260
2018-08-08 15:27:27 +02:00
Michael Bestas
c548bdf138 Automatic translation import
Change-Id: I641ddf4c5fa3061d8316be990c1332dc6000e34d
2018-08-05 17:33:19 +03:00
Rashed Abdel-Tawab
1022c6bcd1 push-update: Don't leave adb in root mode
Change-Id: I90d5a86bb943f137a44e70be508ee6efb0c77ed8
2018-07-26 16:47:12 -04:00
LuK1337
09e6fcab06 Updater: Use PowerManager instead of Intent.ACTION_REBOOT broadcast
* We are getting permission denial when sending Intent.ACTION_REBOOT
  broadcast, using pm.reboot() instead works just fine.

Change-Id: I38d0ad8cc5f4c9362fd5baf7476e14bff56616dd
2018-07-24 11:45:52 +02:00
LuK1337
e46f532c8c Updater: Fix 'REBOOT' button not showing up after A/B update
* After update is complete button is being handled in
  handleNotActiveStatus instead of handleActiveStatus.

Change-Id: I6a4df580f93b71fd12e902801125acae668ec991
2018-07-24 11:45:52 +02:00
Michael Bestas
412810e0b7 Automatic translation import
Change-Id: I7e73d20b38b6d9b743ef278c39057d558121e883
2018-07-15 21:47:00 +03:00
Gabriele M
5648b3cd27 Don't use one shot PendingIntents for the notification actions
FLAG_ONE_SHOT doesn't make so much sense here, the intents are generic
and can be repeated.

Change-Id: Ib457d975387dfd838372639e2aaa40a3df6f4d15
2018-07-14 18:47:12 +02:00
Luca Stefani
4ec02fd780 Updater: Improve battery check
* Lower default value by 10%
* Decrease the level by another 10% if charging
* Always allow installation in case device doesn't have a battery
* Show the requirements in the alert dialog

Change-Id: Iebb10220612006fbd096eb474cf3034ef52144b3
2018-07-14 18:47:12 +02:00
Gabriele M
74d7a3e78b Don't treat the current build as compatible
Even if technically it is compatible.

Change-Id: I72d39c761ad02b851c5ec7cfae664e886931f852
2018-07-14 18:33:07 +02:00
LuK1337
460cb87510 Updater: Add property that allows us to downgrade
Change-Id: I6916639f05c52ae198f0d1656deb23ee5186907f
2018-07-14 18:31:33 +02:00
TheScarastic
608789ff36 Updater: Allow toggling A/B perf mode
Change-Id: I380a39bf6008b341c8005ac548d42d2413d0d643
2018-07-11 22:27:33 +02:00
Michael Bestas
5a93f3f91a Automatic translation import
Change-Id: Icf78471c3fea2d0c67e63ce155e92748787e7a9c
2018-07-09 22:03:42 +03:00
Michael Bestas
599ed80201 Automatic translation import
Change-Id: Ie3bbaadd470b5d1fc22683b9f7280d912b644e53
2018-06-18 23:28:29 +03:00
LuK1337
67cb2626a9 Updater: Move battery level check to UpdatesListAdapter
* We cannot create dialog from service level without
  hardcoding theme resource and granting SYSTEM_ALERT_WINDOW
  permission therefore we got to move it here.

Change-Id: I70ee5d6c8ef4af4f5c6f29e593b1c20797781017
2018-06-15 21:26:36 +02:00
Gabriele M
f9463c3770 Requre a minimum remaining battery capacity to install updates
The recovery doesn't install the update if the remaining battery
capacity isn't at least 20% (or 15% if charging). Require at least
40%, just to be safe.

Change-Id: I5cd7c40f029141cde2b0922b25fece2b55989710
2018-06-13 23:30:08 +02:00
Gabriele M
0332be5ec7 Minor app notification improvements
- 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
2018-06-13 23:30:08 +02:00
Gabriele M
ce4b02697f Show in app reboot button
Change-Id: I8d65746b58c16a7cf4a430ea29bb7b0fba1802d5
2018-06-13 23:30:08 +02:00
Gabriele M
f4b3729426 Turn UpdateInstaller into a singleton
For symmetry with ABUpdateInstaller.

Change-Id: I9b61ed286c91f10140705e7b3e24b0eab0c75f49
2018-06-13 23:30:08 +02:00
Gabriele M
4bacd24da4 Remove Controller interface
This is just useless as is.

Change-Id: I957ea3bda4097ccb8d730943639cd5e74b1b2440
2018-06-13 23:30:08 +02:00
Gabriele M
78e69c05d8 Remove LegacySupport class
This was meant to provide an upgrade path from the old app. It's
been almost a year now, this class is no longer needed.

Change-Id: I17c82e5877b275c5ceb3caefa28066abc170f095
2018-06-13 23:30:08 +02:00
Michael Bestas
9285b1c1a6 Automatic translation import
Change-Id: I27a25d23f5bffb328cce4dab3b440ad20d3a00bc
2018-06-03 14:10:09 +03:00
Gabriele M
8b300f0d05 Prevent null pointer exceptions
The main activity connects to the service after setting up the local
broadcast. This allows the service to send notification before the
activity is ready, causing null pointer exceptions. This happens for
example rotating the screen while an update is being installed.

Also, replace the existing check on mUpdaterController with a check
on mDownloadsId since the latter depends on the former and both are
required.

Change-Id: I620fd7aa1e90468ab40dfedaa06c23f96f3e6807
2018-05-16 22:46:10 +02:00
Gabriele M
4f7db45fa6 Use Content-Length if greater than current size
The server may temporarily report an incorrect size that is smaller
than the actual size. Content-Length is expected to always be
accurate, but its value does not correspond to the full file size
when resuming downloads. Use Content-Length only if it's bigger
than the currently known size.

Change-Id: I2cc06bfbd2349f21528047b4840f549fbe84964e
2018-05-16 22:46:10 +02:00
Michael Bestas
907486ad4f Automatic translation import
Change-Id: I7197b0358cd9e9e94260cee425390fa7deb6fe2d
2018-05-08 19:47:25 +03:00
Michael Bestas
8a8f1d98f0 Fix eta_hours quantity="one" string
* Fixes fd096a564a

Change-Id: I19633ead80b690e1c22655bcac842a901e450f8a
2018-05-04 22:36:25 +03:00
Gabriele M
fd096a564a Allow to properly translate the download ETA string
Change-Id: Ie6bbbddbbd9fd7adbc16472ad9c42c1d257413a1
2018-04-21 16:31:28 +02:00
Gabriele M
cc1ad0e827 Append random ID to temporary json file names
Multiple update list downloads can happen simultaneously. Use
unique file names for the temporary jsons to avoid conflicts.

Change-Id: I751c9838394e1f5aebbe359f61532947b429f39b
2018-04-20 21:26:30 +02:00
Gabriele M
dc9890f09c Use a determinate progressbar while installing A/B updates
This needs to be done explicitly after the recent UI changes.

Change-Id: Ie333a51d7c679c17998872071b2bd84c1f47ca48
2018-04-20 21:26:07 +02:00
Michael Bestas
75c31f3274 Automatic translation import
Change-Id: I593d19fa09ae2605d05aa0a38029691d3653821b
2018-04-20 00:56:08 +03:00
Bruno Martins
569d9a2c51 Updater: Build with AAPT2
Change-Id: I45553984269bd2375311047b053e01f67349c695
2018-04-17 15:39:42 +02:00
Gabriele M
6aa0a04fbb Replace some paddings with margings in the preferences
This ensures that each Switch is always fully visible independently
of the size of system font.

Change-Id: I1e56a9537dbbb124d86ea0da76d48b7b53172e47
2018-04-12 00:19:41 +02:00
Gabriele M
e198389bd5 Add a script to push updates
Useful to test OTA updates without setting up a server.

Change-Id: Ic4c2dc1ea9ce6bd6ec6750d1c4250079a5be7580
2018-04-11 00:33:05 +02:00