From 9ebf0653bf99b3971e0f86193bf360071bda5098 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Thu, 13 Aug 2020 18:15:17 -0400 Subject: Return the correct action for PromptAndWait Bug: 163613552 Test: mma Change-Id: I204f6aa272c2b56725e658e5613530b27bd223c6 --- recovery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recovery.cpp b/recovery.cpp index d26424ab1..09738eb85 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -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; -- cgit v1.2.3