Merge "Return the correct action for PromptAndWait" am: 99277fa6af

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1398888

Change-Id: I8b8a07f433aa34cd29de401f3137c6992812dc20
This commit is contained in:
Treehugger Robot 2020-08-18 03:17:12 +00:00 committed by Automerger Merge Worker
commit c55e7fd95d

View file

@ -421,15 +421,15 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
case Device::REBOOT:
case Device::SHUTDOWN:
if (!ui->IsTextVisible()) {
return Device::REBOOT;
return chosen_action;
}
// okay to reboot; no need to ask.
if (!update_in_progress) {
return Device::REBOOT;
return chosen_action;
}
// An update might have been failed. Ask if user really wants to reboot.
if (AskToReboot(device, chosen_action)) {
return Device::REBOOT;
return chosen_action;
}
break;