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

Commit ac988061 authored by Arpit Singh's avatar Arpit Singh
Browse files

Remove unknown connection token from Anr tracker

This CL deletes connection token from ANR tracker if it is not found in
Connections Manager. This prevents same error from being logged multiple
times and spanning logcat.

Bug: 389067592
Bug: 245989146
Test: atest inputflinger_tests
Flag: EXEMPT refactor
Change-Id: I6e3b959df0a3f31893b990d27284401c3a4d029b
parent 5f04e1fa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1092,6 +1092,9 @@ nsecs_t InputDispatcher::processAnrsLocked() {
            mConnectionManager.getConnection(mAnrTracker.firstToken());
    if (connection == nullptr) {
        ALOGE("Could not find connection for entry %" PRId64, mAnrTracker.firstTimeout());
        // As we no longer have entry for this connection, remove it form Anr tracker to prevent
        // samme error being logged multiple times.
        mAnrTracker.eraseToken(mAnrTracker.firstToken());
        return nextAnrCheck;
    }
    connection->responsive = false;