Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9439620 authored by Michael Bestas's avatar Michael Bestas
Browse files

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
parent 4a2e25b9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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?