summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-01-24 06:09:29 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-24 06:09:29 +0100
commit64b91ee9c2275def8fb797ad0eb98413786d414f (patch)
tree97cc403993662c37d4cd6e6a33a0ae22f73d726b
parentMerge "bootctrl HAL uses "default" service name" am: cf1af460d5 am: ee3030ad4e am: 58eace4a96 (diff)
parentMerge "Print with newline for ui_print." am: 90deaf9ab7 am: 1313a9636d (diff)
downloadandroid_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar.gz
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar.bz2
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar.lz
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar.xz
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.tar.zst
android_bootable_recovery-64b91ee9c2275def8fb797ad0eb98413786d414f.zip
-rw-r--r--install.cpp6
-rw-r--r--updater/install.cpp1
-rw-r--r--updater/updater.cpp1
3 files changed, 1 insertions, 7 deletions
diff --git a/install.cpp b/install.cpp
index 9bb1216cf..553ebae10 100644
--- a/install.cpp
+++ b/install.cpp
@@ -420,11 +420,7 @@ static int try_update_binary(const char* path, ZipArchiveHandle zip, bool* wipe_
LOG(ERROR) << "invalid \"set_progress\" parameters: " << line;
}
} else if (command == "ui_print") {
- if (!args.empty()) {
- ui->PrintOnScreenOnly("%s", args.c_str());
- } else {
- ui->PrintOnScreenOnly("\n");
- }
+ ui->PrintOnScreenOnly("%s\n", args.c_str());
fflush(stdout);
} else if (command == "wipe_cache") {
*wipe_cache = true;
diff --git a/updater/install.cpp b/updater/install.cpp
index 643145447..7a8e92f6c 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -76,7 +76,6 @@ static void uiPrint(State* state, const std::string& buffer) {
for (auto& line : lines) {
if (!line.empty()) {
fprintf(ui->cmd_pipe, "ui_print %s\n", line.c_str());
- fprintf(ui->cmd_pipe, "ui_print\n");
}
}
diff --git a/updater/updater.cpp b/updater/updater.cpp
index 473066263..22c060fcb 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -191,7 +191,6 @@ int main(int argc, char** argv) {
}
fprintf(cmd_pipe, "ui_print %s\n", line.c_str());
}
- fprintf(cmd_pipe, "ui_print\n");
}
if (state.error_code != kNoError) {