Introduce PointerChoreographer stage in C++
PointerChoreographer will be the new inputflinger component responsible
for managing the pointer icons drawn on the screen.
In this CL, we set up the PointerChoreographer InputListener stage,
which will be created when the choreographer is enabled.
Bug: 293587049
Bug: 278783893
Test: adb shell setprop persist.input.enable_pointer_choreographer 1;
boot
Change-Id: Ice610055ef7ffc44c7c3e1d3904715eabda31a86
diff --git a/services/inputflinger/InputManager.h b/services/inputflinger/InputManager.h
index 51d582f..20b9fd5 100644
--- a/services/inputflinger/InputManager.h
+++ b/services/inputflinger/InputManager.h
@@ -23,10 +23,12 @@
#include "InputDeviceMetricsCollector.h"
#include "InputProcessor.h"
#include "InputReaderBase.h"
+#include "PointerChoreographer.h"
#include "include/UnwantedInteractionBlockerInterface.h"
#include <InputDispatcherInterface.h>
#include <InputDispatcherPolicyInterface.h>
+#include <PointerChoreographerPolicyInterface.h>
#include <input/Input.h>
#include <input/InputTransport.h>
@@ -86,6 +88,9 @@
/* Gets the input reader. */
virtual InputReaderInterface& getReader() = 0;
+ /* Gets the PointerChoreographer. */
+ virtual PointerChoreographerInterface& getChoreographer() = 0;
+
/* Gets the input processor. */
virtual InputProcessorInterface& getProcessor() = 0;
@@ -108,12 +113,14 @@
public:
InputManager(const sp<InputReaderPolicyInterface>& readerPolicy,
- InputDispatcherPolicyInterface& dispatcherPolicy);
+ InputDispatcherPolicyInterface& dispatcherPolicy,
+ PointerChoreographerPolicyInterface& choreographerPolicy);
status_t start() override;
status_t stop() override;
InputReaderInterface& getReader() override;
+ PointerChoreographerInterface& getChoreographer() override;
InputProcessorInterface& getProcessor() override;
InputDeviceMetricsCollectorInterface& getMetricsCollector() override;
InputDispatcherInterface& getDispatcher() override;
@@ -130,6 +137,8 @@
std::unique_ptr<UnwantedInteractionBlockerInterface> mBlocker;
+ std::unique_ptr<PointerChoreographerInterface> mChoreographer;
+
std::unique_ptr<InputProcessorInterface> mProcessor;
std::unique_ptr<InputDeviceMetricsCollectorInterface> mCollector;