refactor(aap): Send InitExt unconditionally to all devices

Older devices silently ignore the 0x4D packet, so there is no need to gate it per model. Sending it unconditionally prevents silent feature degradation when new H2+ models are added without the flag.

Remove needsInitExt from PodModel.Features.
This commit is contained in:
darken
2026-04-15 08:07:12 +02:00
committed by Matthias Urhahn
parent f17b6ca99f
commit 6f90687b72
6 changed files with 13 additions and 35 deletions
@@ -349,7 +349,6 @@ class DefaultAapDeviceProfileNewSettingsTest : BaseAapSessionTest() {
f.hasListeningModeCycle shouldBe true
f.hasAllowOffOption shouldBe true
f.hasEarDetectionToggle shouldBe true
f.needsInitExt shouldBe true
// Headphone — no stem/swipe/dual-pod/case features
f.hasDualPods shouldBe false
f.hasCase shouldBe false
@@ -57,19 +57,9 @@ class DefaultAapDeviceProfileTest : BaseAapSessionTest() {
@Nested
inner class InitExtTests {
@Test
fun `returned for Pro 2`() { DefaultAapDeviceProfile(PodModel.AIRPODS_PRO2).encodeInitExt().shouldNotBeNull() }
@Test fun `returned for Pro 3`() { DefaultAapDeviceProfile(PodModel.AIRPODS_PRO3).encodeInitExt().shouldNotBeNull() }
@Test fun `returned for AP4 ANC`() { DefaultAapDeviceProfile(PodModel.AIRPODS_GEN4_ANC).encodeInitExt().shouldNotBeNull() }
@Test
fun `null for basic AirPods`() { DefaultAapDeviceProfile(PodModel.AIRPODS_GEN3).encodeInitExt().shouldBeNull() }
@Test fun `null for Pro 1`() { DefaultAapDeviceProfile(PodModel.AIRPODS_PRO).encodeInitExt().shouldBeNull() }
@Test fun `null for Max`() { DefaultAapDeviceProfile(PodModel.AIRPODS_MAX).encodeInitExt().shouldBeNull() }
@Test fun `returned for Max 2`() { DefaultAapDeviceProfile(PodModel.AIRPODS_MAX2).encodeInitExt().shouldNotBeNull() }
@Test
fun `has correct command byte`() {
profile.encodeInitExt()!![4] shouldBe 0x4d.toByte()
profile.encodeInitExt()[4] shouldBe 0x4d.toByte()
}
}