diff options
author | Tao Bao <tbao@google.com> | 2015-09-12 03:24:49 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-12 03:24:49 +0200 |
commit | 8b2dcfb1049ddc2ff6111c4faa81ae20c6545285 (patch) | |
tree | 45d2108fa1ba0e5825fda910a283938554d337ba | |
parent | am 0cf19d9b: am 7a677807: Merge "updater: Fix the line breaks in ui_print commands." (diff) | |
parent | am b83fd518: Merge "recovery: Remove redirect_stdio() when calling ShowFile()." (diff) | |
download | android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar.gz android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar.bz2 android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar.lz android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar.xz android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.tar.zst android_bootable_recovery-8b2dcfb1049ddc2ff6111c4faa81ae20c6545285.zip |
-rw-r--r-- | recovery.cpp | 3 | ||||
-rw-r--r-- | screen_ui.cpp | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/recovery.cpp b/recovery.cpp index c683bae1d..379137a64 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -745,10 +745,7 @@ static void choose_recovery_file(Device* device) { int chosen_item = get_menu_selection(headers, entries, 1, 0, device); if (strcmp(entries[chosen_item], "Back") == 0) break; - // TODO: do we need to redirect? ShowFile could just avoid writing to stdio. - redirect_stdio("/dev/null"); ui->ShowFile(entries[chosen_item]); - redirect_stdio(TEMPORARY_LOG_FILE); } for (size_t i = 0; i < (sizeof(entries) / sizeof(*entries)); i++) { diff --git a/screen_ui.cpp b/screen_ui.cpp index ddf85c19e..f2fda2fb5 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -581,7 +581,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { bool show_prompt = false; while (true) { if (show_prompt) { - Print("--(%d%% of %d bytes)--", + PrintOnScreenOnly("--(%d%% of %d bytes)--", static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), static_cast<int>(sb.st_size)); Redraw(); |