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 --- libs/androidfw/InputDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/androidfw/InputDevice.cpp') diff --git a/libs/androidfw/InputDevice.cpp b/libs/androidfw/InputDevice.cpp index 6bb06a929592..d6c49f711329 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(); } -- cgit v1.2.3-59-g8ed1b