OSDN Git Service

Input API review.
authorJeff Brown <jeffbrown@google.com>
Wed, 15 Sep 2010 01:03:38 +0000 (18:03 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 15 Sep 2010 03:46:14 +0000 (20:46 -0700)
Drop currently unsupported input features.
Add documentation comments.

Change-Id: I407d2e1dd90c5ee82983a3ccf177430d35ee7592

include/ui/EventHub.h
libs/ui/InputReader.cpp

index 25d5afb..d6b09dc 100644 (file)
@@ -111,10 +111,10 @@ enum {
     /* The input device is a multi-touch touchscreen. */
     INPUT_DEVICE_CLASS_TOUCHSCREEN_MT= 0x00000010,
 
-    /* The input device is a directional pad. */
+    /* The input device is a directional pad (implies keyboard, has DPAD keys). */
     INPUT_DEVICE_CLASS_DPAD          = 0x00000020,
 
-    /* The input device is a gamepad (implies keyboard). */
+    /* The input device is a gamepad (implies keyboard, has BUTTON keys). */
     INPUT_DEVICE_CLASS_GAMEPAD       = 0x00000040,
 
     /* The input device has switches. */
index 88084c0..783cbc4 100644 (file)
@@ -325,9 +325,6 @@ InputDevice* InputReader::createDevice(int32_t deviceId, const String8& name, ui
     if (classes & INPUT_DEVICE_CLASS_DPAD) {
         keyboardSources |= AINPUT_SOURCE_DPAD;
     }
-    if (classes & INPUT_DEVICE_CLASS_GAMEPAD) {
-        keyboardSources |= AINPUT_SOURCE_GAMEPAD;
-    }
 
     if (keyboardSources != 0) {
         device->addMapper(new KeyboardInputMapper(device,