SensorService flush fixes.

 i) Fix a possible race condition when adding a pending flush connection
 to mActiveSensors data structure.
 ii) Invalidate flush_complete_events as soon as they are consumed by a
 connection so that they are not used by other connections which are
 registered for the same sensor.

Change-Id: I1491bea8c2081c4aab1feacc60add13b7aa26bb7
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
index 019308d..5402f37 100644
--- a/include/gui/SensorEventQueue.h
+++ b/include/gui/SensorEventQueue.h
@@ -27,7 +27,7 @@
 #include <gui/BitTube.h>
 
 // ----------------------------------------------------------------------------
-#define WAKE_UP_SENSOR_EVENT_NEEDS_ACK (1U << 31)
+#define WAKE_UP_SENSOR_EVENT_NEEDS_ACK (1U << 30)
 struct ALooper;
 struct ASensorEvent;