Fix crash on Android 12

java.lang.SecurityException: To use the sampling rate of 0 microseconds, app needs to declare the normal permission HIGH_SAMPLING_RATE_SENSORS.
This commit is contained in:
Benoit Marty 2021-11-09 18:42:53 +01:00 committed by Benoit Marty
parent e9f53f6b35
commit f25c17881d
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class RageShake @Inject constructor(private val activity: FragmentActivity,
shakeDetector = ShakeDetector(this).apply { shakeDetector = ShakeDetector(this).apply {
setSensitivity(vectorPreferences.getRageshakeSensitivity()) setSensitivity(vectorPreferences.getRageshakeSensitivity())
start(sensorManager) start(sensorManager, SensorManager.SENSOR_DELAY_GAME)
} }
} }