From b99e6069c1b0749a4811c4d222c5009cbad1edc8 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Tue, 16 Oct 2018 15:13:09 -0700 Subject: Add function to show localized rescue party menu Add a function in screenUI to display the pre-generated graphs for rescue party. If these graphs are not valid, falls back to display the old text strings. Right now we haven't generated the localized graphs yet, so the UI always shows the TextMenu. Bug: 116655889 Test: check rescue party under recovery Change-Id: I0558cb536b659cdc25c8b7946d3a39820935b003 --- ui.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui.h') diff --git a/ui.h b/ui.h index e0fb13e40..1e6186a11 100644 --- a/ui.h +++ b/ui.h @@ -162,6 +162,13 @@ class RecoveryUI { const std::vector& items, size_t initial_selection, bool menu_only, const std::function& key_handler) = 0; + // Displays the localized wipe data menu with pre-generated graphs. If there's an issue + // with the graphs, falls back to use the backup string headers and items instead. The initial + // selection is the 0th item in the menu, which is expected to reboot the device without a wipe. + virtual size_t ShowPromptWipeDataMenu(const std::vector& backup_headers, + const std::vector& backup_items, + const std::function& key_handler) = 0; + // Resets the key interrupt status. void ResetKeyInterruptStatus() { key_interrupted_ = false; -- cgit v1.2.3