summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-05-02 19:57:21 +0200
committerTianjie Xu <xunchang@google.com>2016-05-02 20:09:26 +0200
commitcacb47b2a38a84eaae94dd10857a83b7c6b1885e (patch)
tree491b260014a699b690ce32b1a9554b14eb3705ed /recovery.cpp
parentrecovery: Always log the update attempt. (diff)
parentMerge "Add ability to show "installing security update"" into nyc-dev (diff)
downloadandroid_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar.gz
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar.bz2
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar.lz
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar.xz
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.tar.zst
android_bootable_recovery-cacb47b2a38a84eaae94dd10857a83b7c6b1885e.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index cf368e4e9..c681c8ce7 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -75,6 +75,7 @@ static const struct option OPTIONS[] = {
{ "stages", required_argument, NULL, 'g' },
{ "shutdown_after", no_argument, NULL, 'p' },
{ "reason", required_argument, NULL, 'r' },
+ { "security", no_argument, NULL, 'e'},
{ NULL, 0, NULL, 0 },
};
@@ -1328,6 +1329,7 @@ int main(int argc, char **argv) {
bool just_exit = false;
bool shutdown_after = false;
int retry_count = 0;
+ bool security_update = false;
int arg;
while ((arg = getopt_long(argc, argv, "", OPTIONS, NULL)) != -1) {
@@ -1351,6 +1353,7 @@ int main(int argc, char **argv) {
}
case 'p': shutdown_after = true; break;
case 'r': reason = optarg; break;
+ case 'e': security_update = true; break;
case '?':
LOGE("Invalid command argument\n");
continue;
@@ -1370,6 +1373,9 @@ int main(int argc, char **argv) {
ui->SetLocale(locale);
ui->Init();
+ // Set background string to "installing security update" for security update,
+ // otherwise set it to "installing system update".
+ ui->SetSystemUpdateText(security_update);
int st_cur, st_max;
if (stage != NULL && sscanf(stage, "%d/%d", &st_cur, &st_max) == 2) {