From e1abe616f272612ca836f1e755c4b23086345cad Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Tue, 9 Jun 2015 11:09:32 -0500 Subject: Fix ORS scripts displaying an error after completing Change-Id: I1329705fca870b4e3017607ad7c7875aa00d664b --- gui/action.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gui/action.cpp') 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; } -- cgit v1.2.3