summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorSamer Diab (S.a.M.e.R_d) <remasdiab@gmail.com>2014-01-07 21:18:47 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-06 20:27:28 +0100
commit71e9b049c21fb01d558f49844d17e792c347a930 (patch)
treea150e27f45af15339211d6f8333c6a03dba0b412 /gui/action.cpp
parentMerge "Load RTC offset on Qualcomm Krait chips, fixes the broken time & date" into android-4.4 (diff)
downloadandroid_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar.gz
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar.bz2
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar.lz
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar.xz
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.tar.zst
android_bootable_recovery-71e9b049c21fb01d558f49844d17e792c347a930.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 5536c82b1..8539386a0 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -314,6 +314,7 @@ void* GUIAction::thread_start(void *cookie)
void GUIAction::operation_start(const string operation_name)
{
+ time(&Start);
DataManager::SetValue(TW_ACTION_BUSY, 1);
DataManager::SetValue("ui_progress", 0);
DataManager::SetValue("tw_operation", operation_name);
@@ -323,6 +324,7 @@ void GUIAction::operation_start(const string operation_name)
void GUIAction::operation_end(const int operation_status, const int simulate)
{
+ time_t Stop;
int simulate_fail;
DataManager::SetValue("ui_progress", 100);
if (simulate) {
@@ -344,6 +346,9 @@ void GUIAction::operation_end(const int operation_status, const int simulate)
#ifndef TW_NO_SCREEN_TIMEOUT
blankTimer.resetTimerAndUnblank();
#endif
+ time(&Stop);
+ if ((int) difftime(Stop, Start) > 10)
+ DataManager::Vibrate("tw_vibrate");
}
int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
@@ -920,6 +925,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
else {
operation_end(1, simulate);
return -1;
+
}
DataManager::SetValue(TW_BACKUP_NAME, "(Auto Generate)");
} else if (arg == "restore") {