summaryrefslogtreecommitdiffstats
path: root/data.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 /data.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 'data.cpp')
-rw-r--r--data.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/data.cpp b/data.cpp
index c611e78fa..0d490a978 100644
--- a/data.cpp
+++ b/data.cpp
@@ -55,7 +55,7 @@ extern "C"
#include "twcommon.h"
#include "data.h"
#include "gui/pages.h"
-
+ #include "minuitwrp/minui.h"
void gui_notifyVarChange(const char *name, const char* value);
}
@@ -583,6 +583,7 @@ void DataManager::SetDefaultValues()
mConstValues.insert(make_pair(TW_VERSION_VAR, TW_VERSION_STR));
mValues.insert(make_pair("tw_storage_path", make_pair("/", 1)));
+ mValues.insert(make_pair("tw_vibrate", make_pair("80", 1)));
#ifdef TW_FORCE_CPUINFO_FOR_DEVICE_ID
printf("TW_FORCE_CPUINFO_FOR_DEVICE_ID := true\n");
@@ -1240,3 +1241,11 @@ extern "C" void DataManager_ReadSettingsFile(void)
{
return DataManager::ReadSettingsFile();
}
+void DataManager::Vibrate(const string varName)
+{
+ int vib_value = 0;
+ GetValue(varName, vib_value);
+ if (vib_value) {
+ vibrate(vib_value);
+ }
+}