Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934135d5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[adb] Print fewer progress messages for push/pull" into rvc-dev

parents fd3b80c9 67caf0ce
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ struct TransferLedger {
    uint64_t bytes_transferred;
    uint64_t bytes_expected;
    bool expect_multiple_files;
    std::string last_progress_str;

    TransferLedger() {
        Reset();
@@ -127,6 +128,7 @@ struct TransferLedger {
    }

    void Reset() {
        last_progress_str.clear();
        start_time = std::chrono::steady_clock::now();
        files_transferred = 0;
        files_skipped = 0;
@@ -181,7 +183,10 @@ struct TransferLedger {
                    android::base::StringPrintf("[%4s] %s", overall_percentage_str, file.c_str());
            }
        }
        if (output != last_progress_str) {
            lp.Print(output, LinePrinter::LineType::INFO);
            last_progress_str = std::move(output);
        }
    }

    void ReportTransferRate(LinePrinter& lp, const std::string& name, TransferDirection direction) {