Skip to content

fix(android): declare the API level the gamepad rumble helper needs - #139

Merged
sqlpxc merged 1 commit into
mainfrom
fix/android-lint-oneshot
Dec 2, 2026
Merged

sqlpxc merged 1 commit into
mainfrom
fix/android-lint-oneshot

Conversation

@sqlpxc

@sqlpxc sqlpxc commented Dec 2, 2026

Copy link
Copy Markdown
Owner

The v0.4.2-rc.4 release run failed in the Android job: lintVitalRelease stopped at Gamepads.kt (from #136), where oneShot() calls VibrationEffect.createOneShot, which needs API 26 while the app's minSdk is 24.

Every caller already checks the version (the API 26+ and API 31+ branches), so it was safe at runtime; lint just can't see through the helper. oneShot() is now marked @RequiresApi(Build.VERSION_CODES.O), so lint checks its callers instead. No behavior change.

Tests

  • ./gradlew :app:lintVitalRelease (failed before with this one error, passes now) and :app:assembleRelease (lint, R8, packaging; the Rust core skipped with -x cargoBuild).
  • ./gradlew :app:testDebugUnitTest.

The Android release build stopped at lintVitalRelease: oneShot() calls
VibrationEffect.createOneShot, which needs API 26, while the app supports
API 24. Every caller already checks the version (O and S branches), but
lint can't see through the helper. Mark it @RequiresApi(O) so lint checks
the callers instead.
@sqlpxc
sqlpxc merged commit 66a4f70 into main Dec 2, 2026
1 check passed
@sqlpxc
sqlpxc deleted the fix/android-lint-oneshot branch December 2, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant