summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/action.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 265d6de0f..5a7646147 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1545,6 +1545,8 @@ int GUIAction::adbsideloadcancel(std::string arg)
int GUIAction::openrecoveryscript(std::string arg)
{
+ int op_status = 1;
+
operation_start("OpenRecoveryScript");
if (simulate) {
simulate_progress_bar();
@@ -1565,6 +1567,7 @@ int GUIAction::openrecoveryscript(std::string arg)
gui_print("Processing OpenRecoveryScript file...\n");
if (OpenRecoveryScript::run_script_file() == 0) {
reboot = 1;
+ op_status = 0;
}
}
if (reboot) {
@@ -1572,11 +1575,11 @@ int GUIAction::openrecoveryscript(std::string arg)
TWFunc::Disable_Stock_Recovery_Replace();
usleep(2000000); // Sleep for 2 seconds before rebooting
TWFunc::tw_reboot(rb_system);
+ usleep(5000000); // Sleep for 5 seconds to allow reboot to occur
} else {
DataManager::SetValue("tw_page_done", 1);
}
- operation_end(1);
- return 0;
+ operation_end(op_status);
}
return 0;
}