From 39c4918a404a9c8119aac5086014df26c2a71664 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 7 May 2018 22:50:33 -0700 Subject: screen_ui: Drop the parameter in CheckBackgroundTextImages. ScreenRecoveryUI already has the info in locale_. Also when showing "Current locale: X/Y" on screen, use 1-based index for X, so that we have 1 <= X <= Y. Test: Build anf flash recovery image on aosp_bullhead-userdebug. Choose `Run locale test` from UI. Change-Id: I5dd4de82e63890ddf755f4e23cd2290ad5d50ece --- screen_ui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'screen_ui.cpp') diff --git a/screen_ui.cpp b/screen_ui.cpp index 4a1a5b99c..90e0e30af 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -372,7 +372,7 @@ void ScreenRecoveryUI::SelectAndShowBackgroundText(const std::vector instruction = { locale_selection, @@ -395,13 +395,14 @@ void ScreenRecoveryUI::SelectAndShowBackgroundText(const std::vector locales_entries = get_locales_in_png("installing_text"); if (locales_entries.empty()) { Print("Failed to load locales from the resource files\n"); return; } + std::string saved_locale = locale_; size_t selected = 0; SelectAndShowBackgroundText(locales_entries, selected); -- cgit v1.2.3