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
This commit is contained in:
parent
0e844b0289
commit
36c90b36d3
2 changed files with 10 additions and 0 deletions
|
@ -262,6 +262,9 @@ class ScreenRecoveryUI : public RecoveryUI, public DrawInterface {
|
|||
// The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
|
||||
const float density_;
|
||||
|
||||
// Whether we should blank and unblank screen on init to workaround device specific issues
|
||||
bool blank_unblank_on_init_;
|
||||
|
||||
virtual bool InitTextParams();
|
||||
|
||||
virtual bool LoadWipeDataMenuText();
|
||||
|
|
|
@ -319,6 +319,8 @@ ScreenRecoveryUI::ScreenRecoveryUI(bool scrollable_menu)
|
|||
animation_fps_(
|
||||
android::base::GetIntProperty("ro.recovery.ui.animation_fps", kDefaultAnimationFps)),
|
||||
density_(static_cast<float>(android::base::GetIntProperty("ro.sf.lcd_density", 160)) / 160.f),
|
||||
blank_unblank_on_init_(
|
||||
android::base::GetBoolProperty("ro.recovery.ui.blank_unblank_on_init", false)),
|
||||
current_icon_(NONE),
|
||||
current_frame_(0),
|
||||
intro_done_(false),
|
||||
|
@ -918,6 +920,11 @@ bool ScreenRecoveryUI::Init(const std::string& locale) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (blank_unblank_on_init_) {
|
||||
gr_fb_blank(true);
|
||||
gr_fb_blank(false);
|
||||
}
|
||||
|
||||
// Are we portrait or landscape?
|
||||
layout_ = (gr_fb_width() > gr_fb_height()) ? LANDSCAPE : PORTRAIT;
|
||||
// Are we the large variant of our base layout?
|
||||
|
|
Loading…
Reference in a new issue