summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorTom Hite <tdhite@gmail.com>2014-09-15 03:31:03 +0200
committerDees Troy <dees_troy@teamw.in>2014-10-08 19:35:32 +0200
commit5a9267283c05ba70822ae27a8496c95cdd4a1058 (patch)
tree57c58881136d29aa6a5d4b5db4dbc91935df0434 /twrp-functions.cpp
parentmtp: cleanup, fixes and performance improvements (diff)
downloadandroid_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar.gz
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar.bz2
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar.lz
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar.xz
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.tar.zst
android_bootable_recovery-5a9267283c05ba70822ae27a8496c95cdd4a1058.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 1798c49b7..cd8700f8f 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -42,6 +42,7 @@
#include "partitions.hpp"
#include "variables.h"
#include "bootloader.h"
+#include "cutils/properties.h"
#ifdef ANDROID_RB_POWEROFF
#include "cutils/android_reboot.h"
#endif
@@ -1278,4 +1279,14 @@ bool TWFunc::Toggle_MTP(bool enable) {
#endif
}
+void TWFunc::SetPerformanceMode(bool mode) {
+ if (mode) {
+ property_set("recovery.perf.mode", "1");
+ } else {
+ property_set("recovery.perf.mode", "0");
+ }
+ // Some time for events to catch up to init handlers
+ usleep(500000);
+}
+
#endif // ndef BUILD_TWRPTAR_MAIN