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
This commit is contained in:
Luca Stefani
2018-07-10 21:32:07 +02:00
committed by Gabriele M
parent 74d7a3e78b
commit 4ec02fd780
3 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -57,7 +57,7 @@
<string name="preparing_ota_first_boot">Preparing for first boot</string>
<string name="dialog_prepare_zip_message">Preliminary update preparation</string>
<string name="dialog_battery_low_title">Low battery</string>
<string name="dialog_battery_low_message">The battery level is too low, please charge your device to continue.</string>
<string name="dialog_battery_low_message_pct">The battery level is too low, you need at least <xliff:g id="percent_discharging">%1$d</xliff:g>%% of the battery to continue, <xliff:g id="percent_charging">%2$d</xliff:g>%% if charging.</string>
<string name="reboot">Reboot</string>