summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-05-02 19:38:17 +0200
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-05-02 19:38:17 +0200
commit5823dd46df9667c43e8fc3f5ff79987b7432da3f (patch)
tree68f290826eddfe661871617006b7a1b18a8b58a8 /screen_ui.cpp
parentrecovery: Always log the update attempt. (diff)
parentAdd ability to show "installing security update" (diff)
downloadandroid_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar.gz
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar.bz2
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar.lz
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar.xz
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.tar.zst
android_bootable_recovery-5823dd46df9667c43e8fc3f5ff79987b7432da3f.zip
Diffstat (limited to '')
-rw-r--r--screen_ui.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index ccff5bae5..85f789f3f 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -425,6 +425,16 @@ static char** Alloc2d(size_t rows, size_t cols) {
return result;
}
+// Choose the right background string to display during update.
+void ScreenRecoveryUI::SetSystemUpdateText(bool security_update) {
+ if (security_update) {
+ LoadLocalizedBitmap("installing_security_text", &installing_text);
+ } else {
+ LoadLocalizedBitmap("installing_text", &installing_text);
+ }
+ Redraw();
+}
+
void ScreenRecoveryUI::Init() {
gr_init();
@@ -450,7 +460,10 @@ void ScreenRecoveryUI::Init() {
LoadBitmap("stage_empty", &stageMarkerEmpty);
LoadBitmap("stage_fill", &stageMarkerFill);
- LoadLocalizedBitmap("installing_text", &installing_text);
+ // Background text for "installing_update" could be "installing update"
+ // or "installing security update". It will be set after UI init according
+ // to commands in BCB.
+ installing_text = nullptr;
LoadLocalizedBitmap("erasing_text", &erasing_text);
LoadLocalizedBitmap("no_command_text", &no_command_text);
LoadLocalizedBitmap("error_text", &error_text);