diff options
author | Samer Diab (S.a.M.e.R_d) <remasdiab@gmail.com> | 2014-01-07 21:18:47 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit> | 2014-02-06 20:27:28 +0100 |
commit | 71e9b049c21fb01d558f49844d17e792c347a930 (patch) | |
tree | a150e27f45af15339211d6f8333c6a03dba0b412 /data.cpp | |
parent | Merge "Load RTC offset on Qualcomm Krait chips, fixes the broken time & date" into android-4.4 (diff) | |
download | android_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 'data.cpp')
-rw-r--r-- | data.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); + } +} |