diff --git a/recovery_ui/include/recovery_ui/screen_ui.h b/recovery_ui/include/recovery_ui/screen_ui.h index 2e0fcc24..e24ff84a 100644 --- a/recovery_ui/include/recovery_ui/screen_ui.h +++ b/recovery_ui/include/recovery_ui/screen_ui.h @@ -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(); diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp index ee3cbb13..d3b03b46 100644 --- a/recovery_ui/screen_ui.cpp +++ b/recovery_ui/screen_ui.cpp @@ -319,6 +319,8 @@ ScreenRecoveryUI::ScreenRecoveryUI(bool scrollable_menu) animation_fps_( android::base::GetIntProperty("ro.recovery.ui.animation_fps", kDefaultAnimationFps)), density_(static_cast(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?