Skip to content

Commit ac98806

Browse files
author
Arpit Singh
committed
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
1 parent 5f04e1f commit ac98806

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

services/inputflinger/dispatcher/InputDispatcher.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,9 @@ nsecs_t InputDispatcher::processAnrsLocked() {
10921092
mConnectionManager.getConnection(mAnrTracker.firstToken());
10931093
if (connection == nullptr) {
10941094
ALOGE("Could not find connection for entry %" PRId64, mAnrTracker.firstTimeout());
1095+
// As we no longer have entry for this connection, remove it form Anr tracker to prevent
1096+
// samme error being logged multiple times.
1097+
mAnrTracker.eraseToken(mAnrTracker.firstToken());
10951098
return nextAnrCheck;
10961099
}
10971100
connection->responsive = false;

0 commit comments

Comments
 (0)