diff options
author | Aravind Akella <aakella@google.com> | 2015-10-19 21:15:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-19 21:15:28 +0000 |
commit | a817c90a7ab296473345b0e106acc9be4e5b678c (patch) | |
tree | 5cbc9e57edcf2eb4560a1cf72d490f1c31e043f4 /core | |
parent | 7ba59c35596bd53ebc9b5bed40b2d7bd2e5ac94d (diff) | |
parent | a05df455e81909e97c8ab869f5528c32e17ae59e (diff) | |
download | frameworks_base-a817c90a7ab296473345b0e106acc9be4e5b678c.zip frameworks_base-a817c90a7ab296473345b0e106acc9be4e5b678c.tar.gz frameworks_base-a817c90a7ab296473345b0e106acc9be4e5b678c.tar.bz2 |
Merge "Fix a possible race condition in SensorManager initialization." into mnc-dr-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/hardware/SystemSensorManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java index 30cdfd3..2fe8fb6 100644 --- a/core/java/android/hardware/SystemSensorManager.java +++ b/core/java/android/hardware/SystemSensorManager.java @@ -78,14 +78,14 @@ public class SystemSensorManager extends SensorManager { sSensorModuleInitialized = true; nativeClassInit(); } - } - // initialize the sensor list - for (int index = 0;;++index) { - Sensor sensor = new Sensor(); - if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break; - mFullSensorsList.add(sensor); - mHandleToSensor.append(sensor.getHandle(), sensor); + // initialize the sensor list + for (int index = 0;;++index) { + Sensor sensor = new Sensor(); + if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break; + mFullSensorsList.add(sensor); + mHandleToSensor.append(sensor.getHandle(), sensor); + } } } |