summaryrefslogtreecommitdiffstats
path: root/libs
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 /libs
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 'libs')
-rw-r--r--libs/androidfw/InputDevice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/androidfw/InputDevice.cpp b/libs/androidfw/InputDevice.cpp
index 6bb06a9..d6c49f7 100644
--- a/libs/androidfw/InputDevice.cpp
+++ b/libs/androidfw/InputDevice.cpp
@@ -136,6 +136,7 @@ InputDeviceInfo::InputDeviceInfo(const InputDeviceInfo& other) :
mSources(other.mSources),
mKeyboardType(other.mKeyboardType),
mKeyCharacterMap(other.mKeyCharacterMap),
+ mHasVibrator(other.mHasVibrator),
mMotionRanges(other.mMotionRanges) {
}
@@ -150,6 +151,7 @@ void InputDeviceInfo::initialize(int32_t id, int32_t generation,
mDescriptor = descriptor;
mSources = 0;
mKeyboardType = AINPUT_KEYBOARD_TYPE_NONE;
+ mHasVibrator = false;
mMotionRanges.clear();
}