Loading services/inputflinger/InputClassifier.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -405,6 +405,11 @@ void InputClassifier::notifyDeviceReset(const NotifyDeviceResetArgs* args) { mListener->notifyDeviceReset(args); } void InputClassifier::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { // pass through mListener->notifyPointerCaptureChanged(args); } void InputClassifier::setMotionClassifier( std::unique_ptr<MotionClassifierInterface> motionClassifier) { std::scoped_lock lock(mLock); Loading services/inputflinger/InputClassifier.h +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ public: virtual void notifyMotion(const NotifyMotionArgs* args) override; virtual void notifySwitch(const NotifySwitchArgs* args) override; virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) override; void notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) override; virtual void dump(std::string& dump) override; Loading services/inputflinger/InputListener.cpp +22 −5 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& li listener->notifyConfigurationChanged(this); } // --- NotifyKeyArgs --- NotifyKeyArgs::NotifyKeyArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, Loading Loading @@ -90,7 +89,6 @@ void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const { listener->notifyKey(this); } // --- NotifyMotionArgs --- NotifyMotionArgs::NotifyMotionArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, Loading Loading @@ -189,7 +187,6 @@ void NotifyMotionArgs::notify(const sp<InputListenerInterface>& listener) const listener->notifyMotion(this); } // --- NotifySwitchArgs --- NotifySwitchArgs::NotifySwitchArgs(int32_t id, nsecs_t eventTime, uint32_t policyFlags, Loading @@ -214,7 +211,6 @@ void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const listener->notifySwitch(this); } // --- NotifyDeviceResetArgs --- NotifyDeviceResetArgs::NotifyDeviceResetArgs(int32_t id, nsecs_t eventTime, int32_t deviceId) Loading @@ -231,6 +227,23 @@ void NotifyDeviceResetArgs::notify(const sp<InputListenerInterface>& listener) c listener->notifyDeviceReset(this); } // --- NotifyPointerCaptureChangedArgs --- NotifyPointerCaptureChangedArgs::NotifyPointerCaptureChangedArgs(int32_t id, nsecs_t eventTime, bool enabled) : NotifyArgs(id, eventTime), enabled(enabled) {} NotifyPointerCaptureChangedArgs::NotifyPointerCaptureChangedArgs( const NotifyPointerCaptureChangedArgs& other) : NotifyArgs(other.id, other.eventTime), enabled(other.enabled) {} bool NotifyPointerCaptureChangedArgs::operator==(const NotifyPointerCaptureChangedArgs& rhs) const { return id == rhs.id && eventTime == rhs.eventTime && enabled == rhs.enabled; } void NotifyPointerCaptureChangedArgs::notify(const sp<InputListenerInterface>& listener) const { listener->notifyPointerCaptureChanged(this); } // --- QueuedInputListener --- Loading Loading @@ -278,6 +291,11 @@ void QueuedInputListener::notifyDeviceReset(const NotifyDeviceResetArgs* args) { mArgsQueue.push_back(new NotifyDeviceResetArgs(*args)); } void QueuedInputListener::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { traceEvent(__func__, args->id); mArgsQueue.push_back(new NotifyPointerCaptureChangedArgs(*args)); } void QueuedInputListener::flush() { size_t count = mArgsQueue.size(); for (size_t i = 0; i < count; i++) { Loading @@ -288,5 +306,4 @@ void QueuedInputListener::flush() { mArgsQueue.clear(); } } // namespace android services/inputflinger/dispatcher/InputDispatcher.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -3542,6 +3542,15 @@ void InputDispatcher::notifyDeviceReset(const NotifyDeviceResetArgs* args) { } } void InputDispatcher::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS ALOGD("notifyPointerCaptureChanged - eventTime=%" PRId64 ", enabled=%s", args->eventTime, args->enabled ? "true" : "false"); #endif // TODO(prabirmsp): Implement. } InputEventInjectionResult InputDispatcher::injectInputEvent( const InputEvent* event, int32_t injectorPid, int32_t injectorUid, InputEventInjectionSync syncMode, std::chrono::milliseconds timeout, uint32_t policyFlags) { Loading services/inputflinger/dispatcher/InputDispatcher.h +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public: virtual void notifyMotion(const NotifyMotionArgs* args) override; virtual void notifySwitch(const NotifySwitchArgs* args) override; virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) override; virtual void notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) override; virtual android::os::InputEventInjectionResult injectInputEvent( const InputEvent* event, int32_t injectorPid, int32_t injectorUid, Loading Loading
services/inputflinger/InputClassifier.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -405,6 +405,11 @@ void InputClassifier::notifyDeviceReset(const NotifyDeviceResetArgs* args) { mListener->notifyDeviceReset(args); } void InputClassifier::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { // pass through mListener->notifyPointerCaptureChanged(args); } void InputClassifier::setMotionClassifier( std::unique_ptr<MotionClassifierInterface> motionClassifier) { std::scoped_lock lock(mLock); Loading
services/inputflinger/InputClassifier.h +1 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,7 @@ public: virtual void notifyMotion(const NotifyMotionArgs* args) override; virtual void notifySwitch(const NotifySwitchArgs* args) override; virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) override; void notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) override; virtual void dump(std::string& dump) override; Loading
services/inputflinger/InputListener.cpp +22 −5 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& li listener->notifyConfigurationChanged(this); } // --- NotifyKeyArgs --- NotifyKeyArgs::NotifyKeyArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, Loading Loading @@ -90,7 +89,6 @@ void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const { listener->notifyKey(this); } // --- NotifyMotionArgs --- NotifyMotionArgs::NotifyMotionArgs(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32_t source, Loading Loading @@ -189,7 +187,6 @@ void NotifyMotionArgs::notify(const sp<InputListenerInterface>& listener) const listener->notifyMotion(this); } // --- NotifySwitchArgs --- NotifySwitchArgs::NotifySwitchArgs(int32_t id, nsecs_t eventTime, uint32_t policyFlags, Loading @@ -214,7 +211,6 @@ void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const listener->notifySwitch(this); } // --- NotifyDeviceResetArgs --- NotifyDeviceResetArgs::NotifyDeviceResetArgs(int32_t id, nsecs_t eventTime, int32_t deviceId) Loading @@ -231,6 +227,23 @@ void NotifyDeviceResetArgs::notify(const sp<InputListenerInterface>& listener) c listener->notifyDeviceReset(this); } // --- NotifyPointerCaptureChangedArgs --- NotifyPointerCaptureChangedArgs::NotifyPointerCaptureChangedArgs(int32_t id, nsecs_t eventTime, bool enabled) : NotifyArgs(id, eventTime), enabled(enabled) {} NotifyPointerCaptureChangedArgs::NotifyPointerCaptureChangedArgs( const NotifyPointerCaptureChangedArgs& other) : NotifyArgs(other.id, other.eventTime), enabled(other.enabled) {} bool NotifyPointerCaptureChangedArgs::operator==(const NotifyPointerCaptureChangedArgs& rhs) const { return id == rhs.id && eventTime == rhs.eventTime && enabled == rhs.enabled; } void NotifyPointerCaptureChangedArgs::notify(const sp<InputListenerInterface>& listener) const { listener->notifyPointerCaptureChanged(this); } // --- QueuedInputListener --- Loading Loading @@ -278,6 +291,11 @@ void QueuedInputListener::notifyDeviceReset(const NotifyDeviceResetArgs* args) { mArgsQueue.push_back(new NotifyDeviceResetArgs(*args)); } void QueuedInputListener::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { traceEvent(__func__, args->id); mArgsQueue.push_back(new NotifyPointerCaptureChangedArgs(*args)); } void QueuedInputListener::flush() { size_t count = mArgsQueue.size(); for (size_t i = 0; i < count; i++) { Loading @@ -288,5 +306,4 @@ void QueuedInputListener::flush() { mArgsQueue.clear(); } } // namespace android
services/inputflinger/dispatcher/InputDispatcher.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -3542,6 +3542,15 @@ void InputDispatcher::notifyDeviceReset(const NotifyDeviceResetArgs* args) { } } void InputDispatcher::notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) { #if DEBUG_INBOUND_EVENT_DETAILS ALOGD("notifyPointerCaptureChanged - eventTime=%" PRId64 ", enabled=%s", args->eventTime, args->enabled ? "true" : "false"); #endif // TODO(prabirmsp): Implement. } InputEventInjectionResult InputDispatcher::injectInputEvent( const InputEvent* event, int32_t injectorPid, int32_t injectorUid, InputEventInjectionSync syncMode, std::chrono::milliseconds timeout, uint32_t policyFlags) { Loading
services/inputflinger/dispatcher/InputDispatcher.h +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public: virtual void notifyMotion(const NotifyMotionArgs* args) override; virtual void notifySwitch(const NotifySwitchArgs* args) override; virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) override; virtual void notifyPointerCaptureChanged(const NotifyPointerCaptureChangedArgs* args) override; virtual android::os::InputEventInjectionResult injectInputEvent( const InputEvent* event, int32_t injectorPid, int32_t injectorUid, Loading