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

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

Merge "Verify all injected events" into main

parents 24b7cfac eb75bc8f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -4885,10 +4885,11 @@ InputEventInjectionResult InputDispatcher::injectInputEvent(const InputEvent* ev

            mLock.lock();

            if (policyFlags & POLICY_FLAG_FILTERED) {
                // The events from InputFilter impersonate real hardware devices. Check these
                // events for consistency and print an error. An inconsistent event sent from
                // InputFilter could cause a crash in the later stages of dispatching pipeline.
            {
                // Verify all injected streams, whether the injection is coming from apps or from
                // input filter. Print an error if the stream becomes inconsistent with this event.
                // An inconsistent injected event sent could cause a crash in the later stages of
                // dispatching pipeline.
                auto [it, _] =
                        mInputFilterVerifiersByDisplay.try_emplace(displayId,
                                                                   std::string("Injection on ") +