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:05:36 +0200
commite943962053b46d2621b1a471dc6a9cbfe8acae60 (patch)
treea5b5e7520bae115201da8cd81c8fa8d77946d941
parent4a2e25b9d7f6ae588a5cdfeced9388237f93071b (diff)
downloadandroid_bootable_recovery-lineage-15.1.tar.gz
android_bootable_recovery-lineage-15.1.tar.bz2
android_bootable_recovery-lineage-15.1.zip
recovery: Blank screen on initlineage-15.1
* 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 b3a9b0a5..43ec7d35 100644
--- a/Android.mk
+++ b/Android.mk
@@ -158,6 +158,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 1dd10e9d..5d9d39f2 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -800,6 +800,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?