@@ -511,15 +511,17 @@ class InputDispatcher : public InputDispatcherInterface {
511511 float xPrecision;
512512 float yPrecision;
513513 nsecs_t downTime;
514+ int32_t displayId;
514515 uint32_t pointerCount;
515516 PointerProperties pointerProperties[MAX_POINTERS];
516517 PointerCoords pointerCoords[MAX_POINTERS];
517518
518519 MotionEntry (nsecs_t eventTime,
519- int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
520- int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags,
520+ int32_t deviceId, uint32_t source, uint32_t policyFlags,
521+ int32_t action, int32_t flags,
522+ int32_t metaState, int32_t buttonState, int32_t edgeFlags,
521523 float xPrecision, float yPrecision,
522- nsecs_t downTime, uint32_t pointerCount,
524+ nsecs_t downTime, int32_t displayId, uint32_t pointerCount,
523525 const PointerProperties* pointerProperties, const PointerCoords* pointerCoords);
524526 virtual void appendDescription (String8& msg) const ;
525527
@@ -696,7 +698,7 @@ class InputDispatcher : public InputDispatcherInterface {
696698
697699 // Returns true if the specified source is known to have received a hover enter
698700 // motion event.
699- bool isHovering (int32_t deviceId, uint32_t source) const ;
701+ bool isHovering (int32_t deviceId, uint32_t source, int32_t displayId ) const ;
700702
701703 // Records tracking information for a key event that has just been published.
702704 // Returns true if the event should be delivered, false if it is inconsistent
@@ -752,6 +754,7 @@ class InputDispatcher : public InputDispatcherInterface {
752754 float xPrecision;
753755 float yPrecision;
754756 nsecs_t downTime;
757+ int32_t displayId;
755758 uint32_t pointerCount;
756759 PointerProperties pointerProperties[MAX_POINTERS];
757760 PointerCoords pointerCoords[MAX_POINTERS];
@@ -867,7 +870,7 @@ class InputDispatcher : public InputDispatcherInterface {
867870 // to transfer focus to a new application.
868871 EventEntry* mNextUnblockedEvent ;
869872
870- sp<InputWindowHandle> findTouchedWindowAtLocked (int32_t x, int32_t y);
873+ sp<InputWindowHandle> findTouchedWindowAtLocked (int32_t displayId, int32_t x, int32_t y);
871874
872875 // All registered connections mapped by channel file descriptor.
873876 KeyedVector<int , sp<Connection> > mConnectionsByFd ;
@@ -899,6 +902,10 @@ class InputDispatcher : public InputDispatcherInterface {
899902 bool runCommandsLockedInterruptible ();
900903 CommandEntry* postCommandLocked (Command command);
901904
905+ // Input filter processing.
906+ bool shouldSendKeyToInputFilterLocked (const NotifyKeyArgs* args);
907+ bool shouldSendMotionToInputFilterLocked (const NotifyMotionArgs* args);
908+
902909 // Inbound event processing.
903910 void drainInboundQueueLocked ();
904911 void releasePendingEventLocked ();
@@ -928,6 +935,7 @@ class InputDispatcher : public InputDispatcherInterface {
928935 bool split;
929936 int32_t deviceId; // id of the device that is currently down, others are rejected
930937 uint32_t source; // source of the device that is current down, others are rejected
938+ int32_t displayId; // id to the display that currently has a touch, others are rejected
931939 Vector<TouchedWindow> windows;
932940
933941 TouchState ();
0 commit comments