aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2019-03-23 17:28:22 +0200
committerMichael Bestas <mkbestas@lineageos.org>2019-05-14 15:06:30 +0200
commit5d5abd863e8758447eb7e68baff022df1332b3cf (patch)
tree49e924eedf3993761244ebadc9dd892af6e3a8bd
parente1de083fad203cf6868a035e70203988574d42f3 (diff)
downloadandroid_bootable_recovery-5d5abd863e8758447eb7e68baff022df1332b3cf.tar.gz
android_bootable_recovery-5d5abd863e8758447eb7e68baff022df1332b3cf.tar.bz2
android_bootable_recovery-5d5abd863e8758447eb7e68baff022df1332b3cf.zip
recovery: Blank screen on init
* Fixes touch on some devices like chiron/sagit * Some other devices (e.g. most MTK) need this because their kernel driver implementations do not perform as expected (initial unblank is only happening when altering the panel brightness x -> 0 -> y). In regular Android, that "unblanking" is done on boot when the lights HAL loads and sets the initial brightness. Change-Id: I2fffac508d09d07355a7a7f087805b0dceb5f97e
-rw-r--r--Android.mk4
-rw-r--r--screen_ui.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 5b3a2578..173f0b16 100644
--- a/Android.mk
+++ b/Android.mk
@@ -148,6 +148,10 @@ else
LOCAL_CFLAGS += -DRECOVERY_UI_VR_STEREO_OFFSET=0
endif
+ifeq ($(TARGET_RECOVERY_UI_BLANK_UNBLANK_ON_INIT),true)
+LOCAL_CFLAGS += -DRECOVERY_UI_BLANK_UNBLANK_ON_INIT
+endif
+
ifneq ($(TARGET_RECOVERY_BACKLIGHT_PATH),)
LOCAL_CFLAGS += -DBACKLIGHT_PATH=\"$(TARGET_RECOVERY_BACKLIGHT_PATH)\"
else
diff --git a/screen_ui.cpp b/screen_ui.cpp
index d763343b..4fd11831 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -873,6 +873,11 @@ bool ScreenRecoveryUI::Init(const std::string& locale) {
return false;
}
+#ifdef RECOVERY_UI_BLANK_UNBLANK_ON_INIT
+ gr_fb_blank(true);
+ gr_fb_blank(false);
+#endif
+
// Are we portrait or landscape?
layout_ = (gr_fb_width() > gr_fb_height()) ? LANDSCAPE : PORTRAIT;
// Are we the large variant of our base layout?