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

Commit 5ae553fc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a delay while dumping InputReader state" into main

parents c9906cea e0eb20cf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@

#include <algorithm>
#include <cinttypes>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <sstream>
@@ -51,6 +52,8 @@

namespace android {

using std::chrono_literals::operator""ms;

namespace input_flags = com::android::input::flags;

// --- Constants ---
@@ -1393,6 +1396,9 @@ std::list<NotifyArgs> TouchInputMapper::sync(nsecs_t when, nsecs_t readTime) {
        std::string line;
        while (std::getline(stream, line, '\n')) {
            ALOGD(INDENT "%s", line.c_str());
            // To prevent overwhelming liblog, add a small delay between each line to give it
            // time to process the data written so far.
            std::this_thread::sleep_for(1ms);
        }
    }