summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2013-10-22 22:48:50 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-02-03 19:12:14 +0100
commit0940e414e2604320320c7f1bc6c5ae4d56f385c6 (patch)
tree954b6440e7a0e7bfbdd18fb3b695169f42f67c7c /minui
parentClear the relative directory before passing on to twrpTar with the static du object. Otherwise we will not backup /system/media etc (diff)
downloadandroid_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar.gz
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar.bz2
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar.lz
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar.xz
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.tar.zst
android_bootable_recovery-0940e414e2604320320c7f1bc6c5ae4d56f385c6.zip
Diffstat (limited to '')
-rw-r--r--minui/Android.mk4
-rw-r--r--minui/graphics.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/minui/Android.mk b/minui/Android.mk
index 9bda6dd36..d8895873e 100644
--- a/minui/Android.mk
+++ b/minui/Android.mk
@@ -31,4 +31,8 @@ else
LOCAL_CFLAGS += -DOVERSCAN_PERCENT=0
endif
+ifneq ($(TARGET_RECOVERY_LCD_BACKLIGHT_PATH),)
+ LOCAL_CFLAGS += -DRECOVERY_LCD_BACKLIGHT_PATH=$(TARGET_RECOVERY_LCD_BACKLIGHT_PATH)
+endif
+
include $(BUILD_STATIC_LIBRARY)
diff --git a/minui/graphics.c b/minui/graphics.c
index 8998d9fd1..ff3967496 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -437,9 +437,21 @@ gr_pixel *gr_fb_data(void)
void gr_fb_blank(bool blank)
{
+#ifdef RECOVERY_LCD_BACKLIGHT_PATH
+ int fd;
+
+ fd = open(RECOVERY_LCD_BACKLIGHT_PATH, O_RDWR);
+ if (fd < 0) {
+ perror("cannot open LCD backlight");
+ return;
+ }
+ write(fd, blank ? "000" : "127", 3);
+ close(fd);
+#else
int ret;
ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK);
if (ret < 0)
perror("ioctl(): blank");
+#endif
}