summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-07-06 14:56:10 -0700
committerAravind Akella <aakella@google.com>2015-07-06 14:57:23 -0700
commitd4cc5ec230779f13f30f9fc0671743bc62256656 (patch)
tree4529c68de2aff9fd5c88dc84087de26040edff13
parent61d7acae0cafc265e94a35ad3ba1677f60346de9 (diff)
downloadframeworks_base-d4cc5ec230779f13f30f9fc0671743bc62256656.zip
frameworks_base-d4cc5ec230779f13f30f9fc0671743bc62256656.tar.gz
frameworks_base-d4cc5ec230779f13f30f9fc0671743bc62256656.tar.bz2
Remove flag mDataInjectionMode.
Change-Id: Ia7cbe8942168ac57abbb92c1a1ed51c568be94fe
-rw-r--r--core/java/android/hardware/SystemSensorManager.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java
index 50e1a68..85474a8 100644
--- a/core/java/android/hardware/SystemSensorManager.java
+++ b/core/java/android/hardware/SystemSensorManager.java
@@ -47,7 +47,6 @@ public class SystemSensorManager extends SensorManager {
private static boolean sSensorModuleInitialized = false;
private static InjectEventQueue mInjectEventQueue = null;
- private static boolean mDataInjectionMode = false;
private final Object mLock = new Object();
@@ -235,7 +234,6 @@ public class SystemSensorManager extends SensorManager {
Log.e(TAG, "Data Injection mode not enabled");
return false;
}
- mDataInjectionMode = true;
// Initialize a client for data_injection.
if (mInjectEventQueue == null) {
mInjectEventQueue = new InjectEventQueue(mMainLooper, this);
@@ -254,7 +252,7 @@ public class SystemSensorManager extends SensorManager {
protected boolean injectSensorDataImpl(Sensor sensor, float[] values, int accuracy,
long timestamp) {
synchronized (mLock) {
- if (!mDataInjectionMode) {
+ if (mInjectEventQueue == null) {
Log.e(TAG, "Data injection mode not activated before calling injectSensorData");
return false;
}
@@ -264,7 +262,6 @@ public class SystemSensorManager extends SensorManager {
if (ret != 0) {
mInjectEventQueue.dispose();
mInjectEventQueue = null;
- mDataInjectionMode = false;
}
return ret == 0;
}