Let InputReaderContext hold a single PointerController
InputMappers obtain the pointer controller directly from the policy,
which, when we support multiple pointer controller, makes it natural to
have one pointer controller for an input device.
Rather than that, we want to build a system that makes it more natural
to have one pointer per display. To give more control over the
management of pointers, we make it so that InputReaderContext is
responsible for managing the pointer controller.
Bug: 146385350
Test: atest inputflinger_tests
Change-Id: I0b9276ed4a7f55f04f910dd484ecc7f767b8723b
diff --git a/services/inputflinger/reader/include/InputReaderContext.h b/services/inputflinger/reader/include/InputReaderContext.h
index e14fbbe..d5527cf 100644
--- a/services/inputflinger/reader/include/InputReaderContext.h
+++ b/services/inputflinger/reader/include/InputReaderContext.h
@@ -28,6 +28,7 @@
class InputListenerInterface;
class InputMapper;
class InputReaderPolicyInterface;
+class PointerControllerInterface;
struct StylusState;
/* Internal interface used by individual input devices to access global input device state
@@ -45,6 +46,7 @@
virtual bool shouldDropVirtualKey(nsecs_t now, int32_t keyCode, int32_t scanCode) = 0;
virtual void fadePointer() = 0;
+ virtual sp<PointerControllerInterface> getPointerController(int32_t deviceId) = 0;
virtual void requestTimeoutAtTime(nsecs_t when) = 0;
virtual int32_t bumpGeneration() = 0;