Fix Lint error

This commit is contained in:
Cameron Gutman
2026-09-01 20:56:50 -05:00
parent 578f38f6a5
commit 8d720748c1
@@ -767,14 +767,14 @@ 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
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();
}
}
}
// Check if this device has a usable RGB LED and cache that result
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {