summaryrefslogtreecommitdiff
path: root/include/androidfw/InputDevice.h
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2012-05-01 15:54:03 -0700
committer Jeff Brown <jeffbrown@google.com> 2012-05-01 16:34:20 -0700
commitdaa3753a04699724d2cfe824ac1f5a266d643a05 (patch)
treeddc33d395dd0f3d01a95775397356983fb28a076 /include/androidfw/InputDevice.h
parent32c8113510b2774f865e8ac763976b90d9db2706 (diff)
Improve handling of built-in keyboard.
The window manager policy made some incorrect assumptions about the meaning of the Configuration.keyboard field. We need to be more careful about distinguishing between built-in and external keyboards. Most of this change is to move the determination of the parts of the Configuration related to input devices into the WindowManagerService leveraging new features of the InputManagerService to good effect. Then we plumb through the flag that indicates whether a device is internal or external so that we can be more particular about how the lid switch effects changes to the Configuration. Bug: 6424373 Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
Diffstat (limited to 'include/androidfw/InputDevice.h')
-rw-r--r--include/androidfw/InputDevice.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/androidfw/InputDevice.h b/include/androidfw/InputDevice.h
index d6ecbf0712a7..1aecf80e13e1 100644
--- a/include/androidfw/InputDevice.h
+++ b/include/androidfw/InputDevice.h
@@ -67,7 +67,7 @@ public:
};
void initialize(int32_t id, int32_t generation, const InputDeviceIdentifier& identifier,
- const String8& alias);
+ const String8& alias, bool isExternal);
inline int32_t getId() const { return mId; }
inline int32_t getGeneration() const { return mGeneration; }
@@ -76,6 +76,7 @@ public:
inline const String8& getDisplayName() const {
return mAlias.isEmpty() ? mIdentifier.name : mAlias;
}
+ inline bool isExternal() const { return mIsExternal; }
inline uint32_t getSources() const { return mSources; }
const MotionRange* getMotionRange(int32_t axis, uint32_t source) const;
@@ -108,6 +109,7 @@ private:
int32_t mGeneration;
InputDeviceIdentifier mIdentifier;
String8 mAlias;
+ bool mIsExternal;
uint32_t mSources;
int32_t mKeyboardType;
sp<KeyCharacterMap> mKeyCharacterMap;