summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-05-02 20:17:57 +0200
committerTianjie Xu <xunchang@google.com>2016-05-02 20:17:57 +0200
commit70b5353274a72109b7cb8b259f40075f073f35a0 (patch)
tree491b260014a699b690ce32b1a9554b14eb3705ed /recovery.cpp
parentMerge "recovery: Always log the update attempt. am: 5687001895 am: f13662a349" into nyc-mr1-dev-plus-aosp (diff)
parentMerge "Add ability to show "installing security update"" into nyc-dev (diff)
downloadandroid_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar.gz
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar.bz2
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar.lz
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar.xz
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.tar.zst
android_bootable_recovery-70b5353274a72109b7cb8b259f40075f073f35a0.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) {