diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2018-05-08 20:11:35 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-08 20:11:35 +0200 |
commit | 1f3a9c0a43b8aac3d82237422eb518491c410a35 (patch) | |
tree | 8acd67dc6ed240efc1929960e8ccae31ab1b0095 /screen_ui.cpp | |
parent | Merge "recovery: Get UI and locale from device." (diff) | |
parent | screen_ui: Drop the parameter in CheckBackgroundTextImages. (diff) | |
download | android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar.gz android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar.bz2 android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar.lz android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar.xz android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.tar.zst android_bootable_recovery-1f3a9c0a43b8aac3d82237422eb518491c410a35.zip |
Diffstat (limited to '')
-rw-r--r-- | screen_ui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<std::string std::string header = "Show background text image"; text_y += DrawTextLine(text_x, text_y, header, true); std::string locale_selection = android::base::StringPrintf( - "Current locale: %s, %zu/%zu", locales_entries[sel].c_str(), sel, locales_entries.size()); + "Current locale: %s, %zu/%zu", locales_entries[sel].c_str(), sel + 1, locales_entries.size()); // clang-format off std::vector<std::string> instruction = { locale_selection, @@ -395,13 +395,14 @@ void ScreenRecoveryUI::SelectAndShowBackgroundText(const std::vector<std::string pthread_mutex_unlock(&updateMutex); } -void ScreenRecoveryUI::CheckBackgroundTextImages(const std::string& saved_locale) { +void ScreenRecoveryUI::CheckBackgroundTextImages() { // Load a list of locales embedded in one of the resource files. std::vector<std::string> 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); |