Commit Graph

242 Commits

Author SHA1 Message Date
Michael Bestas
422d1aa228 Automatic translation import
Change-Id: I9631017ef29a2e4b2456fd23342bd16d024f74a0
2022-02-13 02:06:44 +02:00
Michael Bestas
17a7e95d97 Automatic translation import
Change-Id: I197e89de0086645e4a18fed1c38422c038dc4668
2019-08-06 17:35:10 +03:00
Michael W
bc3ce51fe8 Automatic translation import
Change-Id: If13b9a143ccd336cb5ffb69025ce6dfcb9ad0448
2019-06-19 23:31:07 +02:00
Michael Bestas
425bcc3812 Automatic translation import
Change-Id: Ia985d9da0394c24ca5ae03f57743be4ee63ad955
2019-05-26 15:25:43 +03:00
Michael W
122377db5f 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-15 07:33:25 +02:00
Michael W
9a13b2dc0c Automatic translation import
Change-Id: Ib2cc20b15a108bc6c96a5bda1c619c4d8d649e5d
2019-03-10 17:21:38 +01:00
Michael W
fb8be5bf41 Automatic translation import
Change-Id: I28bf844464f91daf942a4f474ad7d6e5ba6adeb7
2019-03-01 15:27:52 +01:00
LuK1337
308f4b1aca 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-01-22 21:44:51 +01:00
Michael W
7f0a8938ab Automatic translation import
Change-Id: Ic9fc59265975a8922f96c6e93067de68cdbd03b5
2019-01-05 16:27:22 +01:00
Michael Bestas
5a16c239b2 Automatic translation import
Change-Id: I8da5632b28c1b836c98074686239e9e8298a6754
2018-12-14 23:48:27 +02:00
Michael Bestas
cacc3e88d0 Automatic translation import
Change-Id: I2a966c4be59499fcaf267a443f140eee11ccc711
2018-11-26 01:50:52 +02:00
Michael Bestas
83a0e68555 Automatic translation import
Change-Id: Ic4faadd183831343ea46af8db49d92d5413295b6
2018-11-15 21:41:40 +02:00
Michael Bestas
5dbe9195ab Automatic translation import
Change-Id: Ib09c828e25770b4f1c57223360f2b4d45f986a99
2018-11-05 00:38:13 +02:00
Michael Bestas
629ba11641 Automatic translation import
Change-Id: Ie5cdce59daf63289d97c40a5fe2b1877ca6850a3
2018-10-13 17:15:25 +03:00
Nolen Johnson
425515af9c Updater: Clarify A/B Performance mode string
Change-Id: I8891b94c4b44201e9a0d9184e435c8da6eba3d3b
(cherry picked from commit 3f16a3cafc)
2018-09-01 09:48:18 +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
Gabriele M
6c0aa8118e gen-keystore.sh: Don't pass the passwords as args
Also mention that the password is saved in clear text.

Change-Id: Ia7bf8b1b85193aa76b541dc5c6ee99a471d12f92
2018-04-11 00:33:05 +02:00
Gabriele M
d5f4c1bcec Detect update failures
This allows to delete the update only if the installation succeeded
and to notify the user in case the installation failed.

Since we now need the file in case of failure, create a copy for
uncrypt even if the user chose to delete installed updates.

Change-Id: I80b0f499663bbf50bcbca5f643c01ffdb4cd3957
2018-04-08 22:48:19 +02:00