diff options
author | Tao Bao <tbao@google.com> | 2017-07-25 09:52:36 -0700 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2017-07-25 10:16:48 -0700 |
commit | fda6ee7d6117f1ef563a590571af65c185169efe (patch) | |
tree | ff7d2044afa89637cf0a4861ddeeddb178f1c091 | |
parent | 5cee24f4f1aa3f53c0b386abb2797c1e0f3088eb (diff) | |
download | android_bootable_recovery-fda6ee7d6117f1ef563a590571af65c185169efe.tar.gz android_bootable_recovery-fda6ee7d6117f1ef563a590571af65c185169efe.tar.bz2 android_bootable_recovery-fda6ee7d6117f1ef563a590571af65c185169efe.zip |
recovery: Fix the flickering when turning on text mode.
When there's no command specified when booting into debuggable builds
(such as using `adb reboot recovery`), we turn on the text mode (i.e.
recovery menu) directly. This CL fixes the issue to avoid showing the
background image in a flash while turning on the text mode.
Bug: 63985334
Test: `fastboot boot $OUT/recovery.img` and it shows the recovery menu
directly without the no command image in a flash.
Change-Id: Id86bbe346ab76c8defc95e2b423e695a86774b09
(cherry picked from commit 7022f33ec8531c742f8f4701552d687233901495)
-rw-r--r-- | recovery.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/recovery.cpp b/recovery.cpp index 11c12f6f..8f08c53f 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1591,15 +1591,14 @@ int main(int argc, char **argv) { ui->Print("Rebooting automatically.\n"); } } else if (!just_exit) { - status = INSTALL_NONE; // No command specified - ui->SetBackground(RecoveryUI::NO_COMMAND); - - // http://b/17489952 - // If this is an eng or userdebug build, automatically turn on the - // text display if no command is specified. - if (is_ro_debuggable()) { - ui->ShowText(true); - } + // If this is an eng or userdebug build, automatically turn on the text display if no command + // is specified. Note that this should be called before setting the background to avoid + // flickering the background image. + if (is_ro_debuggable()) { + ui->ShowText(true); + } + status = INSTALL_NONE; // No command specified + ui->SetBackground(RecoveryUI::NO_COMMAND); } if (status == INSTALL_ERROR || status == INSTALL_CORRUPT) { |