summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Android/app/src/main/java/org')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinSensorEventListener.kt15
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinSensorEventListener.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinSensorEventListener.kt
index 6076b67384..6aa5ce2fc0 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinSensorEventListener.kt
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/DolphinSensorEventListener.kt
@@ -60,18 +60,11 @@ class DolphinSensorEventListener : SensorEventListener {
constructor(inputDevice: InputDevice) {
rotateCoordinatesForScreenOrientation = false
canSuspendSensorsIndividually = false
- sensorManager = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- inputDevice.sensorManager
-
- // TODO: There is a bug where after suspending sensors, onSensorChanged can get called for
- // a sensor that we never registered as a listener for. The way our code is currently written,
- // this causes a NullPointerException, but if we checked for null we would instead have the
- // problem of being spammed with onSensorChanged calls even though the sensor shouldn't be
- // enabled. For now, let's comment out the ability to use InputDevice sensors.
-
- //addSensors();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
+ sensorManager = inputDevice.sensorManager
+ addSensors()
} else {
- null
+ sensorManager = null
}
sortSensorDetails()
}