summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-02-07 19:38:55 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-07 19:38:55 +0100
commit50b24dd57c4266a34d238b2e7e3278312a685b2d (patch)
tree0c7be37f026aa24597356f26e0e6542aa5cf06fd /gui/action.cpp
parentDisable alpha blending for non-transparent bitmaps (diff)
parentAdd haptic feedback (diff)
downloadandroid_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar.gz
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar.bz2
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar.lz
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar.xz
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.tar.zst
android_bootable_recovery-50b24dd57c4266a34d238b2e7e3278312a685b2d.zip
Diffstat (limited to 'gui/action.cpp')
-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") {