summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-01-25 15:54:04 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-25 16:59:19 +0100
commit7ce7f0cde40bf127196cfac4bedce79ac5c59d77 (patch)
treea8c57436b198d104803625910d174f237c470400 /gui/action.cpp
parentUse GUI for ORS instead of console only (diff)
downloadandroid_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar.gz
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar.bz2
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar.lz
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar.xz
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.tar.zst
android_bootable_recovery-7ce7f0cde40bf127196cfac4bedce79ac5c59d77.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 19a8b69a0..22e362177 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1059,6 +1059,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
simulate_progress_bar();
} else {
int wipe_cache = 0;
+ int wipe_dalvik = 0;
string result, Sideload_File;
if (!PartitionManager.Mount_Current_Storage(true)) {
@@ -1070,11 +1071,16 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
unlink(Sideload_File.c_str());
}
ui_print("Starting ADB sideload feature...\n");
+ DataManager::GetValue("tw_wipe_dalvik", wipe_dalvik);
ret = apply_from_adb(ui, &wipe_cache, Sideload_File.c_str());
- if (ret != 0)
+ if (ret != 0) {
ret = 1; // failure
- else if (wipe_cache)
- PartitionManager.Wipe_By_Path("/cache");
+ } else {
+ if (wipe_cache || DataManager::GetIntValue("tw_wipe_cache"))
+ PartitionManager.Wipe_By_Path("/cache");
+ if (wipe_dalvik)
+ PartitionManager.Wipe_Dalvik_Cache();
+ }
if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
operation_start("ReinjectTWRP");
ui_print("Injecting TWRP into boot image...\n");