Skip to content

Add support for both AirPods 5 models - #788

Open
cfy114514 wants to merge 1 commit into
librepods-org:mainfrom
cfy114514:codex/airpods-5-support
Open

cfy114514 wants to merge 1 commit into
librepods-org:mainfrom
cfy114514:codex/airpods-5-support

Conversation

@cfy114514

Copy link
Copy Markdown

Recognize both AirPods 5 variants in device information and BLE advertisements. Show their supported controls, including sleep detection and volume swipe on the wireless-case model, without exposing Pro-only hearing settings.

Reuse AirPods 4 artwork on the main screen and connection popups. Remove the Pro model fallback and make audio settings follow the actual model capabilities.

Tested: 17 JVM tests (local Android 37.0 SDK selector). Device checks covered the A3441 wireless-case model; individual controls such as EQ and sleep detection still need full hardware validation.

Bluetooth connection fixes are separate in #787. No release signing or fork CI changes are included here.

Copilot AI lite review requested due to automatic review settings September 20, 2026 05:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Missing artwork resources can prevent the build, and reconnect or initial-connection paths can show incomplete controls or incorrect artwork.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds support for both AirPods 5 variants, including BLE detection, capability-based controls, artwork handling, documentation, and tests.

Changes:

  • Registers AirPods 5 models and BLE identifiers.
  • Gates settings by model capabilities.
  • Adds AirPods 4 artwork integration and JVM coverage.
File Summary
docs/​airpods-5.md Documents capabilities and acceptance checks.
docs/​airpods-4-artwork.md Documents reused artwork provenance and crops.
android/​app/​src/​test/​java/​me/​kavishdevar/​librepods/​data/​AirPodsModelsTest.kt Tests model registration and capabilities.
android/​app/​src/​test/​java/​me/​kavishdevar/​librepods/​bluetooth/​AirPodsProximityModelsTest.kt Tests BLE model identification.
android/​app/​src/​main/​res/​values/​strings.xml Updates identity setting text.
android/​app/​src/​main/​res/​values-zh-rTW/​strings.xml Updates Traditional Chinese strings.
android/​app/​src/​main/​res/​values-zh-rCN/​strings.xml Updates Simplified Chinese strings.
android/​app/​src/​main/​res/​layout/​popup_window.xml Adds static artwork support.
android/​app/​src/​main/​res/​layout/​island_window.xml Adds static island artwork support.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​services/​AirPodsService.kt Passes model artwork to overlays; initial connection fallbacks need correction.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​viewmodel/​AirPodsViewModel.kt Loads model capabilities; reconnect handling does not refresh them.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​screens/​AppSettingsScreen.kt Updates identity setting description.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​screens/​AirPodsSettingsScreen.kt Gates audio controls by capabilities.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​screens/​AccessibilitySettingsScreen.kt Gates custom transparency by capability.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​overlays/​PopupWindow.kt Displays static or animated artwork.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​presentation/​overlays/​IslandWindow.kt Displays static or animated artwork.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​data/​AirPods.kt Adds AirPods 5 metadata and artwork references; required artwork resources are missing.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​bluetooth/​BLEManager.kt Uses centralized proximity model parsing.
android/​app/​src/​main/​java/​me/​kavishdevar/​librepods/​bluetooth/​AirPodsProximityModels.kt Adds AirPods 5 BLE mappings and validation.
android/​app/​build.gradle.kts Adds the JUnit dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +106 to +110
budCaseRes = R.drawable.airpods_4,
budsRes = R.drawable.airpods_4_buds,
leftBudsRes = R.drawable.airpods_4_left,
rightBudsRes = R.drawable.airpods_4_right,
caseRes = R.drawable.airpods_4_case,
Comment on lines +1671 to +1672
val model = airpodsInstance?.model ?: AirPodsModels.getModelByModelNumber(config.airpodsModelNumber)
popupWindow.open(name, batteryNotification, model?.connectionArtworkRes)
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.

2 participants