diff options
| author | 2024-03-11 22:48:04 +0000 | |
|---|---|---|
| committer | 2024-03-14 19:55:28 +0000 | |
| commit | b95d4aa41b0c6a5219da941a94dab2073ce02be5 (patch) | |
| tree | ab1c6bad78cd016e4920a3b350d2b3a607392dc3 | |
| parent | 10f539294cbd8df95ef1b54af0869b497e9c0c59 (diff) | |
InputTracer: Disallow adding new targets from a derived event tracker
There are complex interactions between features in InputDispatcher that
can lead to cancelations being generated for a derived event. When
this happens, calling dispatchToTargetHint will result in a crash.
Since it is difficult to determine exactly how to reproduce this issue
in a test case, loosen the check so that we only crash if we are trying
to add a new target, which should never happen.
Bug: 328928072
Bug: 210460522
Test: will re-enable the flag and wait for new crash reports
Change-Id: I0134a12b40e1da33a94d61b721e967dfdbc95fe8
| -rw-r--r-- | services/inputflinger/dispatcher/trace/InputTracer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/inputflinger/dispatcher/trace/InputTracer.cpp b/services/inputflinger/dispatcher/trace/InputTracer.cpp index 49e6e21828..4cf6a89db6 100644 --- a/services/inputflinger/dispatcher/trace/InputTracer.cpp +++ b/services/inputflinger/dispatcher/trace/InputTracer.cpp @@ -101,14 +101,15 @@ std::unique_ptr<EventTrackerInterface> InputTracer::createTrackerForSyntheticEve void InputTracer::dispatchToTargetHint(const EventTrackerInterface& cookie, const InputTarget& target) { - if (isDerivedCookie(cookie)) { - LOG(FATAL) << "Event target cannot be updated from a derived cookie."; - } auto& eventState = getState(cookie); if (eventState->isEventProcessingComplete) { // TODO(b/210460522): Disallow adding new targets after eventProcessingComplete() is called. return; } + if (isDerivedCookie(cookie)) { + // TODO(b/210460522): Disallow adding new targets from a derived cookie. + return; + } // TODO(b/210460522): Determine if the event is sensitive based on the target. } |