summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-04-12 17:32:48 -0700
committerJeff Brown <jeffbrown@google.com>2012-04-12 18:54:54 -0700
commitaf9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b (patch)
tree50cf9dd27d673bc5b3f75e6e18e9577873eecd6c /include
parentcc1169831921d9295b2fc01c1eaf7e9b00836f53 (diff)
downloadframeworks_base-af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b.zip
frameworks_base-af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b.tar.gz
frameworks_base-af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b.tar.bz2
Notify applications when input devices change.
This change allows the InputManager to keep track of what input devices are registered with the system and when they change. It needs to do this so that it can properly clear its cache of input device properties (especially the key map!) when changes occur. Added new API so that applications can register listeners for input device changes. Fixed a minor bug in EventHub where it didn't handle EPOLLHUP properly so it would spam the log about unsupposed epoll events until inotify noticed that the device was gone and removed it. Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
Diffstat (limited to 'include')
-rw-r--r--include/androidfw/InputDevice.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/androidfw/InputDevice.h b/include/androidfw/InputDevice.h
index c9554dc..2eac544 100644
--- a/include/androidfw/InputDevice.h
+++ b/include/androidfw/InputDevice.h
@@ -66,9 +66,11 @@ public:
float fuzz;
};
- void initialize(int32_t id, const String8& name, const String8& descriptor);
+ void initialize(int32_t id, int32_t generation,
+ const String8& name, const String8& descriptor);
inline int32_t getId() const { return mId; }
+ inline int32_t getGeneration() const { return mGeneration; }
inline const String8 getName() const { return mName; }
inline const String8 getDescriptor() const { return mDescriptor; }
inline uint32_t getSources() const { return mSources; }
@@ -97,6 +99,7 @@ public:
private:
int32_t mId;
+ int32_t mGeneration;
String8 mName;
String8 mDescriptor;
uint32_t mSources;