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