From 35926c4b89f9dc51f3e55ef03a61e4da6dcb34be Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 28 Apr 2016 18:06:26 -0700 Subject: Add ability to show "installing security update" Add a new command "--security" to boot commands. If this command is observed as part of BCB, choose a different background text picture for installing stage in recovery UI. As a result, users will see "installing security update" instead of "installing system update" when applying a security update package. Bug: 27837319 Change-Id: I2e2253a124993ecc24804fa1ee0b918ac96837c5 --- recovery.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index dbdc1fbd6..4b71881f7 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 }, }; @@ -1344,6 +1345,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) { @@ -1368,6 +1370,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; @@ -1387,6 +1390,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) { -- cgit v1.2.3