summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-13 04:09:27 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-13 17:01:15 -0700
commita47425a13c19f95057df78b8bb65bb25657e8753 (patch)
tree675c0d6bf611f2427bb3d11315d410bf9087b20a /include
parentc2346134bb519a54d50655cbef940fc3fdec60a9 (diff)
downloadframeworks_base-a47425a13c19f95057df78b8bb65bb25657e8753.zip
frameworks_base-a47425a13c19f95057df78b8bb65bb25657e8753.tar.gz
frameworks_base-a47425a13c19f95057df78b8bb65bb25657e8753.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/androidfw/InputDevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/androidfw/InputDevice.h b/include/androidfw/InputDevice.h
index 2eac544..38203af 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<MotionRange>& getMotionRanges() const {
return mMotionRanges;
}
@@ -105,6 +108,7 @@ private:
uint32_t mSources;
int32_t mKeyboardType;
sp<KeyCharacterMap> mKeyCharacterMap;
+ bool mHasVibrator;
Vector<MotionRange> mMotionRanges;
};