Fade out the mouse pointer after inactivity or other events.
Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down
Extended the native Looper to support enqueuing time delayed
messages. This is used by the PointerController to control
pointer fade timing.
Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
diff --git a/services/input/InputReader.h b/services/input/InputReader.h
index cf41535..b344ffe 100644
--- a/services/input/InputReader.h
+++ b/services/input/InputReader.h
@@ -157,6 +157,8 @@
virtual bool shouldDropVirtualKey(nsecs_t now,
InputDevice* device, int32_t keyCode, int32_t scanCode) = 0;
+ virtual void fadePointer() = 0;
+
virtual InputReaderPolicyInterface* getPolicy() = 0;
virtual InputDispatcherInterface* getDispatcher() = 0;
virtual EventHubInterface* getEventHub() = 0;
@@ -241,6 +243,8 @@
virtual void updateGlobalMetaState();
virtual int32_t getGlobalMetaState();
+ virtual void fadePointer();
+
InputConfiguration mInputConfiguration;
void updateInputConfiguration();
@@ -299,6 +303,8 @@
int32_t getMetaState();
+ void fadePointer();
+
inline const PropertyMap& getConfiguration() {
return mConfiguration;
}
@@ -351,6 +357,8 @@
virtual int32_t getMetaState();
+ virtual void fadePointer();
+
protected:
InputDevice* mDevice;
InputReaderContext* mContext;
@@ -459,6 +467,8 @@
virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+ virtual void fadePointer();
+
private:
// Amount that trackball needs to move in order to generate a key event.
static const int32_t TRACKBALL_MOVEMENT_THRESHOLD = 6;