aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-02-14 12:37:41 -0600
committerTao Bao2017-02-28 17:27:08 -0600
commitc9447cc505e21ea448e365529e971826f97033f3 (patch)
tree1c7b5e5defb42214d0246a29f4ee0954128f6fd5 /recovery.cpp
parent021304503aec1f32321f6e91efc8c82b517909e0 (diff)
downloadplatform-bootable-recovery-c9447cc505e21ea448e365529e971826f97033f3.tar.gz
platform-bootable-recovery-c9447cc505e21ea448e365529e971826f97033f3.tar.xz
platform-bootable-recovery-c9447cc505e21ea448e365529e971826f97033f3.zip
recovery: Remember the last log position.
After reading one log entry, it should stay at the same menu position. Test: 'View recovery logs' -> Read -> Exit Change-Id: I4b579be4c2fe1e3a1dcc4873e128fd0b2d619ba3
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 8c214beb..5c60ce65 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -972,8 +972,9 @@ static void choose_recovery_file(Device* device) {
972 972
973 const char* headers[] = { "Select file to view", nullptr }; 973 const char* headers[] = { "Select file to view", nullptr };
974 974
975 int chosen_item = 0;
975 while (true) { 976 while (true) {
976 int chosen_item = get_menu_selection(headers, entries, 1, 0, device); 977 chosen_item = get_menu_selection(headers, entries, 1, chosen_item, device);
977 if (strcmp(entries[chosen_item], "Back") == 0) break; 978 if (strcmp(entries[chosen_item], "Back") == 0) break;
978 979
979 ui->ShowFile(entries[chosen_item]); 980 ui->ShowFile(entries[chosen_item]);