Add SensorManager support in inputflinger.
Add sensor device, sensor input mapper, sens event dispatcher support
into inputflinger.
Bug: 161634265
Test: atest inputflinger_tests
Change-Id: I2dcb2c35d9dccefc4cd8d939b79cf340931a9410
diff --git a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
index 2909d69..6e76c92 100644
--- a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
+++ b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
@@ -25,6 +25,7 @@
#include <android/os/InputEventInjectionResult.h>
#include <android/os/InputEventInjectionSync.h>
#include <input/InputApplication.h>
+#include <input/InputDevice.h>
#include <input/InputTransport.h>
#include <input/InputWindow.h>
#include <unordered_map>
@@ -193,6 +194,11 @@
* InputDispatcher is the source of truth of Pointer Capture.
*/
virtual void requestPointerCapture(const sp<IBinder>& windowToken, bool enabled) = 0;
+ /* Flush input device motion sensor.
+ *
+ * Returns true on success.
+ */
+ virtual bool flushSensor(int deviceId, InputDeviceSensorType sensorType) = 0;
};
} // namespace android