Merge "screen_ui: Move the call to gr_init() into Init()."

am: 4264ee890e

Change-Id: Ibc9c227d25a0b67ccfc97cf075de9314a2732c71
This commit is contained in:
Tao Bao
2018-06-13 21:12:35 -07:00
committed by android-build-merger
+6 -2
View File
@@ -702,10 +702,10 @@ void ScreenRecoveryUI::SetSystemUpdateText(bool security_update) {
}
bool ScreenRecoveryUI::InitTextParams() {
if (gr_init() < 0) {
// gr_init() would return successfully on font initialization failure.
if (gr_sys_font() == nullptr) {
return false;
}
gr_font_size(gr_sys_font(), &char_width_, &char_height_);
text_rows_ = (ScreenHeight() - kMarginHeight * 2) / char_height_;
text_cols_ = (ScreenWidth() - kMarginWidth * 2) / char_width_;
@@ -715,6 +715,10 @@ bool ScreenRecoveryUI::InitTextParams() {
bool ScreenRecoveryUI::Init(const std::string& locale) {
RecoveryUI::Init(locale);
if (gr_init() == -1) {
return false;
}
if (!InitTextParams()) {
return false;
}