From a47425a13c19f95057df78b8bb65bb25657e8753 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 13 Apr 2012 04:09:27 -0700 Subject: Add support for input devices that have vibrators. Added a getVibrator() method to InputDevice which returns a Vibrator associated with that input device. Its uses the same API as the system vibrator which makes it easy for applications to be modified to use one or the other. Bug: 6334179 Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e --- include/androidfw/InputDevice.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/androidfw') diff --git a/include/androidfw/InputDevice.h b/include/androidfw/InputDevice.h index 2eac5441680c..38203afac149 100644 --- a/include/androidfw/InputDevice.h +++ b/include/androidfw/InputDevice.h @@ -93,6 +93,9 @@ public: return mKeyCharacterMap; } + inline void setVibrator(bool hasVibrator) { mHasVibrator = hasVibrator; } + inline bool hasVibrator() const { return mHasVibrator; } + inline const Vector& getMotionRanges() const { return mMotionRanges; } @@ -105,6 +108,7 @@ private: uint32_t mSources; int32_t mKeyboardType; sp mKeyCharacterMap; + bool mHasVibrator; Vector mMotionRanges; }; -- cgit v1.2.3-59-g8ed1b