fix: Correct feature flags for multiple PodModel entries

Remove false positive hasEarDetection from Beats Studio Buds and Studio Buds+ (neither has in-ear detection). Remove false positive hasVolumeSwipe and hasVolumeSwipeLength from AirPods 4 ANC (volume swipe is exclusive to AirPods Pro). Add missing hasEarDetection to AirPods Max, AirPods Max USB-C, AirPods Gen 4, Beats Solo Pro, and Beats Studio 3 (all have head/ear detection per Apple docs).
This commit is contained in:
darken
2026-04-01 06:57:45 +02:00
committed by Matthias Urhahn
parent 618229b96b
commit fe4ac306cf
2 changed files with 18 additions and 8 deletions
@@ -52,6 +52,7 @@ enum class PodModel(
Features(
hasDualPods = true,
hasCase = true,
hasEarDetection = true,
),
modelNumbers = setOf("A3050", "A3053", "A3054"), // earphones
),
@@ -70,8 +71,6 @@ enum class PodModel(
hasNcOneAirpod = true,
hasPressSpeed = true,
hasPressHoldDuration = true,
hasVolumeSwipe = true,
hasVolumeSwipeLength = true,
hasPersonalizedVolume = true,
hasToneVolume = true,
hasEndCallMuteMic = true,
@@ -179,6 +178,7 @@ enum class PodModel(
"AirPods Max",
R.drawable.device_airpods_max,
Features(
hasEarDetection = true,
hasAncControl = true,
hasPressSpeed = true,
hasPressHoldDuration = true,
@@ -192,6 +192,7 @@ enum class PodModel(
"AirPods Max USB-C",
R.drawable.device_airpods_max,
Features(
hasEarDetection = true,
hasAncControl = true,
hasPressSpeed = true,
hasPressHoldDuration = true,
@@ -218,7 +219,10 @@ enum class PodModel(
BEATS_SOLO_PRO(
"Beats Solo Pro",
R.drawable.device_beats_headphones,
Features(hasAncControl = true),
Features(
hasEarDetection = true,
hasAncControl = true,
),
modelNumbers = setOf("A1881"), // headphones
),
@@ -244,7 +248,10 @@ enum class PodModel(
BEATS_STUDIO_3(
"Beats Studio 3",
R.drawable.device_beats_studio3,
Features(hasAncControl = true),
Features(
hasEarDetection = true,
hasAncControl = true,
),
modelNumbers = setOf("A1914"), // headphones
),
@@ -255,7 +262,6 @@ enum class PodModel(
Features(
hasDualPods = true,
hasCase = true,
hasEarDetection = true,
hasAncControl = true,
),
modelNumbers = setOf("A2512", "A2513", "A2514"), // L/R earbuds + case
@@ -268,7 +274,6 @@ enum class PodModel(
Features(
hasDualPods = true,
hasCase = true,
hasEarDetection = true,
hasAncControl = true,
),
modelNumbers = setOf("A2871", "A2872", "A2952"), // L/R earbuds + case
@@ -29,7 +29,7 @@ class ModelFeaturesTest : BaseTest() {
val f = PodModel.AIRPODS_MAX.features
f.hasDualPods shouldBe false
f.hasCase shouldBe false
f.hasEarDetection shouldBe false
f.hasEarDetection shouldBe true
f.hasAncControl shouldBe true
}
@@ -61,9 +61,14 @@ class ModelFeaturesTest : BaseTest() {
}
@Test
fun `all ANC-capable models also have ear detection or are headphones`() {
fun `all ANC-capable dual-pod models have ear detection except Studio Buds`() {
val noEarDetectionAncModels = setOf(
PodModel.BEATS_STUDIO_BUDS,
PodModel.BEATS_STUDIO_BUDS_PLUS,
)
PodModel.entries
.filter { it.features.hasAncControl && it.features.hasDualPods }
.filter { it !in noEarDetectionAncModels }
.forEach { model ->
model.features.hasEarDetection shouldBe true
}