| Index: device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java
|
| diff --git a/device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java b/device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java
|
| index 7360756cd18e4c196582fa99133aa90349371b9b..268c04d29d73af90e421959a2564ba35fdaccdc6 100644
|
| --- a/device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java
|
| +++ b/device/sensors/android/java/src/org/chromium/device/sensors/DeviceSensors.java
|
| @@ -4,7 +4,6 @@
|
|
|
| package org.chromium.device.sensors;
|
|
|
| -import android.annotation.SuppressLint;
|
| import android.content.Context;
|
| import android.hardware.Sensor;
|
| import android.hardware.SensorEvent;
|
| @@ -67,11 +66,6 @@ class DeviceSensors implements SensorEventListener {
|
| // Lazily initialized when registering for notifications.
|
| private SensorManagerProxy mSensorManagerProxy;
|
|
|
| - // The only instance of that class and its associated lock.
|
| - @SuppressLint("StaticFieldLeak")
|
| - private static DeviceSensors sSingleton;
|
| - private static Object sSingletonLock = new Object();
|
| -
|
| static final Set<Integer> DEVICE_ORIENTATION_SENSORS_A =
|
| CollectionUtil.newHashSet(Sensor.TYPE_GAME_ROTATION_VECTOR);
|
| static final Set<Integer> DEVICE_ORIENTATION_SENSORS_B =
|
| @@ -571,13 +565,8 @@ class DeviceSensors implements SensorEventListener {
|
| }
|
|
|
| @CalledByNative
|
| - static DeviceSensors getInstance(Context appContext) {
|
| - synchronized (sSingletonLock) {
|
| - if (sSingleton == null) {
|
| - sSingleton = new DeviceSensors(appContext);
|
| - }
|
| - return sSingleton;
|
| - }
|
| + static DeviceSensors create(Context appContext) {
|
| + return new DeviceSensors(appContext);
|
| }
|
|
|
| /**
|
|
|