diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-10-01 21:49:39 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-01 21:49:39 -0700 |
commit | c0242197eab18a837c374b152a7450f26c22f974 (patch) | |
tree | 6ddb05e5b31cbe031651a7405e2283a791274009 /include | |
parent | 76025e44e45881a089a853dbb08b1f09abb30fb1 (diff) | |
parent | e8d5136fec62caeab0dcd583c47099339e58c887 (diff) | |
download | frameworks_native-c0242197eab18a837c374b152a7450f26c22f974.zip frameworks_native-c0242197eab18a837c374b152a7450f26c22f974.tar.gz frameworks_native-c0242197eab18a837c374b152a7450f26c22f974.tar.bz2 |
am ea58d1ba: am e951ef07: Merge "Wait for initial device scan to finish before updating config." into gingerbread
Merge commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1'
* commit 'ea58d1bac2960c1794f048bfa5d1a60b1a3d23a1':
Wait for initial device scan to finish before updating config.
Diffstat (limited to 'include')
-rw-r--r-- | include/ui/EventHub.h | 16 | ||||
-rw-r--r-- | include/ui/InputReader.h | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/include/ui/EventHub.h b/include/ui/EventHub.h index d077d0e..d78e35f 100644 --- a/include/ui/EventHub.h +++ b/include/ui/EventHub.h @@ -142,8 +142,13 @@ protected: public: // Synthetic raw event type codes produced when devices are added or removed. enum { + // Sent when a device is added. DEVICE_ADDED = 0x10000000, - DEVICE_REMOVED = 0x20000000 + // Sent when a device is removed. + DEVICE_REMOVED = 0x20000000, + // Sent when all added/removed devices from the most recent scan have been reported. + // This event is always sent at least once. + FINISHED_DEVICE_SCAN = 0x30000000, }; virtual uint32_t getDeviceClasses(int32_t deviceId) const = 0; @@ -221,10 +226,10 @@ protected: private: bool openPlatformInput(void); - int open_device(const char *device); - int close_device(const char *device); - int scan_dir(const char *dirname); - int read_notify(int nfd); + int openDevice(const char *device); + int closeDevice(const char *device); + int scanDir(const char *dirname); + int readNotify(int nfd); status_t mError; @@ -273,6 +278,7 @@ private: int mFDCount; bool mOpened; + bool mNeedToSendFinishedDeviceScan; List<String8> mExcludedDevices; // device ids that report particular switches. diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h index 2209cb8..3619189 100644 --- a/include/ui/InputReader.h +++ b/include/ui/InputReader.h @@ -279,14 +279,14 @@ private: // low-level input event decoding and device management void process(const RawEvent* rawEvent); - void addDevice(nsecs_t when, int32_t deviceId); - void removeDevice(nsecs_t when, int32_t deviceId); + void addDevice(int32_t deviceId); + void removeDevice(int32_t deviceId); InputDevice* createDevice(int32_t deviceId, const String8& name, uint32_t classes); void configureExcludedDevices(); void consumeEvent(const RawEvent* rawEvent); - void handleConfigurationChanged(nsecs_t when); + void handleConfigurationChanged(); // state management for all devices Mutex mStateLock; |