screen_ui: Word-wrap menu headers.
This CL adds ScreenRecoveryUI::DrawWrappedTextLines() to better handle
long menu header texts. It does a word wrap at spaces, if available.
This avoids fixed-length menu headers being truncated on small screens.
Bug: 64293520
Test: On bullhead, boot into recovery with --prompt_and_wipe_data, and
check the prompt texts.
Change-Id: Ia22746583516dd230567a267584aca558429395e
(cherry picked from commit 2bbc6d642d)
This commit is contained in:
+5
-4
@@ -758,12 +758,13 @@ static bool wipe_data(Device* device) {
|
||||
}
|
||||
|
||||
static bool prompt_and_wipe_data(Device* device) {
|
||||
// Use a single string and let ScreenRecoveryUI handles the wrapping.
|
||||
const char* const headers[] = {
|
||||
"Can't load Android system. Your data may be corrupt.",
|
||||
"If you continue to get this message, you may need to",
|
||||
"perform a factory data reset and erase all user data",
|
||||
"Can't load Android system. Your data may be corrupt. "
|
||||
"If you continue to get this message, you may need to "
|
||||
"perform a factory data reset and erase all user data "
|
||||
"stored on this device.",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
const char* const items[] = {
|
||||
"Try again",
|
||||
|
||||
Reference in New Issue
Block a user