Merge "Print with newline for ui_print." am: 90deaf9ab7

am: 1313a9636d

Change-Id: I1cc5523b0ae213f5091caa6793c549e08dc148dc
This commit is contained in:
Tao Bao 2017-01-24 05:00:27 +00:00 committed by android-build-merger
commit 14be4eb8ce
3 changed files with 1 additions and 7 deletions

View file

@ -420,11 +420,7 @@ static int try_update_binary(const char* path, ZipArchiveHandle zip, bool* wipe_
LOG(ERROR) << "invalid \"set_progress\" parameters: " << line; LOG(ERROR) << "invalid \"set_progress\" parameters: " << line;
} }
} else if (command == "ui_print") { } else if (command == "ui_print") {
if (!args.empty()) { ui->PrintOnScreenOnly("%s\n", args.c_str());
ui->PrintOnScreenOnly("%s", args.c_str());
} else {
ui->PrintOnScreenOnly("\n");
}
fflush(stdout); fflush(stdout);
} else if (command == "wipe_cache") { } else if (command == "wipe_cache") {
*wipe_cache = true; *wipe_cache = true;

View file

@ -76,7 +76,6 @@ static void uiPrint(State* state, const std::string& buffer) {
for (auto& line : lines) { for (auto& line : lines) {
if (!line.empty()) { if (!line.empty()) {
fprintf(ui->cmd_pipe, "ui_print %s\n", line.c_str()); fprintf(ui->cmd_pipe, "ui_print %s\n", line.c_str());
fprintf(ui->cmd_pipe, "ui_print\n");
} }
} }

View file

@ -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 %s\n", line.c_str());
} }
fprintf(cmd_pipe, "ui_print\n");
} }
if (state.error_code != kNoError) { if (state.error_code != kNoError) {