Add haptic feedback
Change-Id: I15d723f73c0b0bb4a40645d1c3f4c1c616f36998
This commit is contained in:
committed by
Gerrit Code Review
parent
4011c71f98
commit
71e9b049c2
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user