summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-06-09 18:09:32 +0200
committerDees Troy <dees_troy@teamw.in>2015-06-17 23:12:34 +0200
commite1abe616f272612ca836f1e755c4b23086345cad (patch)
tree7771152e0c4da69a0bf3f51dea590b436df62ec6
parentFix system read only behavior during boot (diff)
downloadandroid_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar.gz
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar.bz2
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar.lz
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar.xz
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.tar.zst
android_bootable_recovery-e1abe616f272612ca836f1e755c4b23086345cad.zip
-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;
}