aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-07-25 11:52:36 -0500
committerTao Bao2017-07-25 11:59:31 -0500
commit7022f33ec8531c742f8f4701552d687233901495 (patch)
treee726cb4caf2f0bb19b0c77537c406e34a31d0bf8 /recovery.cpp
parent031661d4a92c6b0db7b67fa3820a978d2ec0e9b2 (diff)
downloadplatform-bootable-recovery-7022f33ec8531c742f8f4701552d687233901495.tar.gz
platform-bootable-recovery-7022f33ec8531c742f8f4701552d687233901495.tar.xz
platform-bootable-recovery-7022f33ec8531c742f8f4701552d687233901495.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
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 55b12d5d..8f3e9bde 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -1594,15 +1594,14 @@ int main(int argc, char **argv) {
1594 ui->Print("Rebooting automatically.\n"); 1594 ui->Print("Rebooting automatically.\n");
1595 } 1595 }
1596 } else if (!just_exit) { 1596 } else if (!just_exit) {
1597 status = INSTALL_NONE; // No command specified 1597 // If this is an eng or userdebug build, automatically turn on the text display if no command
1598 ui->SetBackground(RecoveryUI::NO_COMMAND); 1598 // is specified. Note that this should be called before setting the background to avoid
1599 1599 // flickering the background image.
1600 // http://b/17489952 1600 if (is_ro_debuggable()) {
1601 // If this is an eng or userdebug build, automatically turn on the 1601 ui->ShowText(true);
1602 // text display if no command is specified. 1602 }
1603 if (is_ro_debuggable()) { 1603 status = INSTALL_NONE; // No command specified
1604 ui->ShowText(true); 1604 ui->SetBackground(RecoveryUI::NO_COMMAND);
1605 }
1606 } 1605 }
1607 1606
1608 if (status == INSTALL_ERROR || status == INSTALL_CORRUPT) { 1607 if (status == INSTALL_ERROR || status == INSTALL_CORRUPT) {