Pointer icon refactor for stylus (base)
When PointerChoreographer is enabled, PointerChoreographer can
create multiple StylusPointerControllers for each stylus device.
A StylusPointerController is created when the corresponding stylus
sends the first hover event. It can show and hide a hover pointer
on the associated display.
Test: atest libinputservice_test
Bug: 293587049
Change-Id: I208f09f0e0f73a6396d60f5b2bd0242dddd3c66b
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h
index 1a8e109..6461abf 100644
--- a/libs/input/PointerController.h
+++ b/libs/input/PointerController.h
@@ -198,6 +198,24 @@
void setInactivityTimeout(InactivityTimeout) override {}
};
+class StylusPointerController : public PointerController {
+public:
+ /** A version of PointerController that controls one stylus pointer. */
+ StylusPointerController(const sp<PointerControllerPolicyInterface>& policy,
+ const sp<Looper>& looper, SpriteController& spriteController,
+ bool enabled);
+
+ void setPresentation(Presentation) override {
+ LOG_ALWAYS_FATAL("Should not be called");
+ }
+ void setSpots(const PointerCoords*, const uint32_t*, BitSet32, int32_t) override {
+ LOG_ALWAYS_FATAL("Should not be called");
+ }
+ void clearSpots() override {
+ LOG_ALWAYS_FATAL("Should not be called");
+ }
+};
+
} // namespace android
#endif // _UI_POINTER_CONTROLLER_H