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

Commit 53c5e774 authored by Harry Cutts's avatar Harry Cutts
Browse files

TouchpadInputMapper: add more log lines when producing atoms

The previous log line isn't appearing in cases where the test flakes, so
add some more to confirm whether the issue is with getting the pull
request or acquiring the lock.

Bug: 329725372
Test: check the log line appears when running the test:
      $ atest 'android.input.cts.hostside.InputAtomsTest#testTouchpadUsageAtom_FingerAndPalmCounts'
Change-Id: Ic062a5fe5db905c4691147a1267600981b9017e8
parent 442b5df4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ private:
    static AStatsManager_PullAtomCallbackReturn pullAtomCallback(int32_t atomTag,
                                                                 AStatsEventList* outEventList,
                                                                 void* cookie) {
        ALOGI("Received pull request for touchpad usage atom");
        LOG_ALWAYS_FATAL_IF(atomTag != android::util::TOUCHPAD_USAGE);
        MetricsAccumulator& accumulator = MetricsAccumulator::getInstance();
        accumulator.produceAtomsAndReset(*outEventList);
@@ -192,6 +193,7 @@ private:
    }

    void produceAtomsAndReset(AStatsEventList& outEventList) {
        ALOGI("Acquiring lock for touchpad usage metrics...");
        std::scoped_lock lock(mLock);
        produceAtomsLocked(outEventList);
        resetCountersLocked();