From 56194ebec6212e229f4ccdaa4b187166d20013ef Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 2 Mar 2011 19:23:13 -0800 Subject: Wake screen from external HID peripherals. Added some plumbing to enable the policy to intercept motion events when the screen is off to handle wakeup if needed. Added a basic concept of an external device to limit the scope of the wakeup policy to external devices only. The wakeup policy for internal devices should be based on explicit rules such as policy flags in key layout files. Moved isTouchEvent to native. Ensure the dispatcher sends the right event type to userActivity for non-touch pointer events like HOVER_MOVE and SCROLL. Bug: 3193114 Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86 --- include/ui/Input.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/ui') diff --git a/include/ui/Input.h b/include/ui/Input.h index 082f11c..e92d7f5 100644 --- a/include/ui/Input.h +++ b/include/ui/Input.h @@ -476,6 +476,11 @@ public: status_t writeToParcel(Parcel* parcel) const; #endif + static bool isTouchEvent(int32_t source, int32_t action); + inline bool isTouchEvent() const { + return isTouchEvent(mSource, mAction); + } + // Low-level accessors. inline const int32_t* getPointerIds() const { return mPointerIds.array(); } inline const nsecs_t* getSampleEventTimes() const { return mSampleEventTimes.array(); } -- cgit v1.1