diff options
author | Michael Wright <michaelwr@google.com> | 2014-03-19 12:06:10 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2014-03-24 17:26:52 -0700 |
commit | d0bd3911462f42487944dbaf85d87d569e2f9633 (patch) | |
tree | 0f5fdb11559f992295177207b71d78dc7d9cf0b3 /include/input | |
parent | 40c68757ef51d270174103f31a39a7d268bab3e2 (diff) | |
download | frameworks_native-d0bd3911462f42487944dbaf85d87d569e2f9633.zip frameworks_native-d0bd3911462f42487944dbaf85d87d569e2f9633.tar.gz frameworks_native-d0bd3911462f42487944dbaf85d87d569e2f9633.tar.bz2 |
Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE
Bug: 11480300
Change-Id: I5a4096970c9e588d134f05dd0eb3a9c91c836b2f
Diffstat (limited to 'include/input')
-rw-r--r-- | include/input/Input.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/input/Input.h b/include/input/Input.h index ea9c4c2..bb5ceaf 100644 --- a/include/input/Input.h +++ b/include/input/Input.h @@ -22,11 +22,12 @@ */ #include <android/input.h> -#include <utils/Vector.h> +#include <utils/BitSet.h> #include <utils/KeyedVector.h> -#include <utils/Timers.h> #include <utils/RefBase.h> #include <utils/String8.h> +#include <utils/Timers.h> +#include <utils/Vector.h> /* * Additional private constants not defined in ndk/ui/input.h. @@ -205,7 +206,11 @@ struct PointerCoords { float values[MAX_AXES]; inline void clear() { - bits = 0; + BitSet64::clear(bits); + } + + bool isEmpty() const { + return BitSet64::isEmpty(bits); } float getAxisValue(int32_t axis) const; |