summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2019-03-21 19:17:28 +0100
committerDees Troy <dees_troy@teamw.in>2019-04-03 05:23:34 +0200
commit9a4d7403d94ff8fafd2638dbebb20ac506ee0e12 (patch)
treeaa4319f51109bea58afe1bbe7ee1e4829e8cdff8 /minuitwrp
parentAB Cache dir: If device doesn't have /data/cache for FBE, we should (diff)
downloadandroid_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar.gz
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar.bz2
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar.lz
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar.xz
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.tar.zst
android_bootable_recovery-9a4d7403d94ff8fafd2638dbebb20ac506ee0e12.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk2
-rwxr-xr-xminuitwrp/events.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 58634e34e..3356402ba 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -189,7 +189,7 @@ endif
LOCAL_CLANG := true
LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
-LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils
+LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils libc++
ifneq ($(TW_INCLUDE_JPEG),)
LOCAL_SHARED_LIBRARIES += libjpeg
endif
diff --git a/minuitwrp/events.cpp b/minuitwrp/events.cpp
index 9374ef174..a2a3d166b 100755
--- a/minuitwrp/events.cpp
+++ b/minuitwrp/events.cpp
@@ -127,12 +127,14 @@ int write_to_file(const std::string& fn, const std::string& line) {
int vibrate(int timeout_ms)
{
if (timeout_ms > 10000) timeout_ms = 1000;
+ char tout[6];
+ sprintf(tout, "%i", timeout_ms);
if (std::ifstream(LEDS_HAPTICS_ACTIVATE_FILE).good()) {
- write_to_file(LEDS_HAPTICS_DURATION_FILE, std::to_string(timeout_ms));
+ write_to_file(LEDS_HAPTICS_DURATION_FILE, tout);
write_to_file(LEDS_HAPTICS_ACTIVATE_FILE, "1");
} else
- write_to_file(VIBRATOR_TIMEOUT_FILE, std::to_string(timeout_ms));
+ write_to_file(VIBRATOR_TIMEOUT_FILE, tout);
return 0;
}