diff options
author | Dees_Troy <dees_troy@teamw.in> | 2013-01-22 02:41:09 +0100 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2013-01-24 20:48:08 +0100 |
commit | 01b6d0c9befc7fb41c989a48d3b0a403aafd6317 (patch) | |
tree | 75c787e08756fff444b7e90c042d5e10a9e3f6b2 /gui/action.cpp | |
parent | Output most build flags to log (diff) | |
download | android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar.gz android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar.bz2 android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar.lz android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar.xz android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.tar.zst android_bootable_recovery-01b6d0c9befc7fb41c989a48d3b0a403aafd6317.zip |
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 997cf558e..9c3ee5916 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1014,6 +1014,18 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) DataManager::SetValue(TW_IS_ENCRYPTED, 0); DataManager::ReadSettingsFile(); + // Check for the SCRIPT_FILE_TMP first as these are AOSP recovery commands + // that we converted to ORS commands during boot in recovery.cpp. + // Run those first. + if (TWFunc::Path_Exists(SCRIPT_FILE_TMP)) { + ui_print("Processing AOSP recovery commands...\n"); + if (OpenRecoveryScript::run_script_file() == 0) { + usleep(2000000); // Sleep for 2 seconds before rebooting + TWFunc::tw_reboot(rb_system); + load_theme = 0; + } + } + // Check for the ORS file in /cache and attempt to run those commands. if (OpenRecoveryScript::check_for_script_file()) { ui_print("Processing OpenRecoveryScript file...\n"); if (OpenRecoveryScript::run_script_file() == 0) { |