Add a new InputClassifier stage
The new InputClassifier stage could be used for additional processing
of input events prior to sending them to InputDispatcher. The new flow
of events will be InputReader -> InputClassifier -> InputDispatcher.
Here, we are calling the InputClassifier HAL and setting the MotionEvent
classification appropriately.
Bug: 62940136
Test: override notifyMotion to add extra flags to NotifyMotionArgs for
certain types of input events.
Test: atest inputflinger_tests
Change-Id: I2f390dc69f587ea25a3be8e4b8d5a207a5d529bf
diff --git a/include/input/TouchVideoFrame.h b/include/input/TouchVideoFrame.h
index d68f274..640bf1f 100644
--- a/include/input/TouchVideoFrame.h
+++ b/include/input/TouchVideoFrame.h
@@ -35,6 +35,14 @@
mWidth(width), mHeight(height), mData(std::move(data)), mTimestamp(timestamp) {
}
+ bool operator==(const TouchVideoFrame& rhs) const {
+ return mWidth == rhs.mWidth
+ && mHeight == rhs.mHeight
+ && mData == rhs.mData
+ && mTimestamp.tv_sec == rhs.mTimestamp.tv_sec
+ && mTimestamp.tv_usec == rhs.mTimestamp.tv_usec;
+ }
+
/**
* Width of the frame
*/