mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-11 19:14:00 +00:00
Fix Lint error
This commit is contained in:
@@ -767,12 +767,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
// created upon the first call to InputDevice.getSensorManager(), so we avoid calling this
|
||||
// on Android 12 unless we have a gamepad that could plausibly have motion sensors.
|
||||
// https://cs.android.com/android/_/android/platform/frameworks/base/+/8970010a5e9f3dc5c069f56b4147552accfcbbeb
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU ||
|
||||
(Build.VERSION.SDK_INT == Build.VERSION_CODES.S &&
|
||||
(context.vendorId == 0x054c || context.vendorId == 0x057e))) && // Sony or Nintendo
|
||||
prefConfig.gamepadMotionSensors) {
|
||||
if (dev.getSensorManager().getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null || dev.getSensorManager().getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null) {
|
||||
context.sensorManager = dev.getSensorManager();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU || context.vendorId == 0x054c || context.vendorId == 0x057e) && // Sony or Nintendo
|
||||
prefConfig.gamepadMotionSensors) {
|
||||
if (dev.getSensorManager().getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null || dev.getSensorManager().getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null) {
|
||||
context.sensorManager = dev.getSensorManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user