summaryrefslogtreecommitdiff
path: root/recovery.cpp
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-08-13 18:15:17 -0400
committerKelvin Zhang <zhangkelvin@google.com>2020-08-13 18:16:40 -0400
commit9ebf0653bf99b3971e0f86193bf360071bda5098 (patch)
tree9c61709deac3a727ef109d3734903446d22a0f72 /recovery.cpp
parent435a5fc0c288c0134edc597c2297a602602be108 (diff)
Return the correct action for PromptAndWait
Bug: 163613552 Test: mma Change-Id: I204f6aa272c2b56725e658e5613530b27bd223c6
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/recovery.cpp b/recovery.cpp
index d26424ab..09738eb8 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;