mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-16 11:16:12 -04:00
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:
@@ -52,6 +52,7 @@ enum class PodModel(
|
|||||||
Features(
|
Features(
|
||||||
hasDualPods = true,
|
hasDualPods = true,
|
||||||
hasCase = true,
|
hasCase = true,
|
||||||
|
hasEarDetection = true,
|
||||||
),
|
),
|
||||||
modelNumbers = setOf("A3050", "A3053", "A3054"), // earphones
|
modelNumbers = setOf("A3050", "A3053", "A3054"), // earphones
|
||||||
),
|
),
|
||||||
@@ -70,8 +71,6 @@ enum class PodModel(
|
|||||||
hasNcOneAirpod = true,
|
hasNcOneAirpod = true,
|
||||||
hasPressSpeed = true,
|
hasPressSpeed = true,
|
||||||
hasPressHoldDuration = true,
|
hasPressHoldDuration = true,
|
||||||
hasVolumeSwipe = true,
|
|
||||||
hasVolumeSwipeLength = true,
|
|
||||||
hasPersonalizedVolume = true,
|
hasPersonalizedVolume = true,
|
||||||
hasToneVolume = true,
|
hasToneVolume = true,
|
||||||
hasEndCallMuteMic = true,
|
hasEndCallMuteMic = true,
|
||||||
@@ -179,6 +178,7 @@ enum class PodModel(
|
|||||||
"AirPods Max",
|
"AirPods Max",
|
||||||
R.drawable.device_airpods_max,
|
R.drawable.device_airpods_max,
|
||||||
Features(
|
Features(
|
||||||
|
hasEarDetection = true,
|
||||||
hasAncControl = true,
|
hasAncControl = true,
|
||||||
hasPressSpeed = true,
|
hasPressSpeed = true,
|
||||||
hasPressHoldDuration = true,
|
hasPressHoldDuration = true,
|
||||||
@@ -192,6 +192,7 @@ enum class PodModel(
|
|||||||
"AirPods Max USB-C",
|
"AirPods Max USB-C",
|
||||||
R.drawable.device_airpods_max,
|
R.drawable.device_airpods_max,
|
||||||
Features(
|
Features(
|
||||||
|
hasEarDetection = true,
|
||||||
hasAncControl = true,
|
hasAncControl = true,
|
||||||
hasPressSpeed = true,
|
hasPressSpeed = true,
|
||||||
hasPressHoldDuration = true,
|
hasPressHoldDuration = true,
|
||||||
@@ -218,7 +219,10 @@ enum class PodModel(
|
|||||||
BEATS_SOLO_PRO(
|
BEATS_SOLO_PRO(
|
||||||
"Beats Solo Pro",
|
"Beats Solo Pro",
|
||||||
R.drawable.device_beats_headphones,
|
R.drawable.device_beats_headphones,
|
||||||
Features(hasAncControl = true),
|
Features(
|
||||||
|
hasEarDetection = true,
|
||||||
|
hasAncControl = true,
|
||||||
|
),
|
||||||
modelNumbers = setOf("A1881"), // headphones
|
modelNumbers = setOf("A1881"), // headphones
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -244,7 +248,10 @@ enum class PodModel(
|
|||||||
BEATS_STUDIO_3(
|
BEATS_STUDIO_3(
|
||||||
"Beats Studio 3",
|
"Beats Studio 3",
|
||||||
R.drawable.device_beats_studio3,
|
R.drawable.device_beats_studio3,
|
||||||
Features(hasAncControl = true),
|
Features(
|
||||||
|
hasEarDetection = true,
|
||||||
|
hasAncControl = true,
|
||||||
|
),
|
||||||
modelNumbers = setOf("A1914"), // headphones
|
modelNumbers = setOf("A1914"), // headphones
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -255,7 +262,6 @@ enum class PodModel(
|
|||||||
Features(
|
Features(
|
||||||
hasDualPods = true,
|
hasDualPods = true,
|
||||||
hasCase = true,
|
hasCase = true,
|
||||||
hasEarDetection = true,
|
|
||||||
hasAncControl = true,
|
hasAncControl = true,
|
||||||
),
|
),
|
||||||
modelNumbers = setOf("A2512", "A2513", "A2514"), // L/R earbuds + case
|
modelNumbers = setOf("A2512", "A2513", "A2514"), // L/R earbuds + case
|
||||||
@@ -268,7 +274,6 @@ enum class PodModel(
|
|||||||
Features(
|
Features(
|
||||||
hasDualPods = true,
|
hasDualPods = true,
|
||||||
hasCase = true,
|
hasCase = true,
|
||||||
hasEarDetection = true,
|
|
||||||
hasAncControl = true,
|
hasAncControl = true,
|
||||||
),
|
),
|
||||||
modelNumbers = setOf("A2871", "A2872", "A2952"), // L/R earbuds + case
|
modelNumbers = setOf("A2871", "A2872", "A2952"), // L/R earbuds + case
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ModelFeaturesTest : BaseTest() {
|
|||||||
val f = PodModel.AIRPODS_MAX.features
|
val f = PodModel.AIRPODS_MAX.features
|
||||||
f.hasDualPods shouldBe false
|
f.hasDualPods shouldBe false
|
||||||
f.hasCase shouldBe false
|
f.hasCase shouldBe false
|
||||||
f.hasEarDetection shouldBe false
|
f.hasEarDetection shouldBe true
|
||||||
f.hasAncControl shouldBe true
|
f.hasAncControl shouldBe true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,9 +61,14 @@ class ModelFeaturesTest : BaseTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@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
|
PodModel.entries
|
||||||
.filter { it.features.hasAncControl && it.features.hasDualPods }
|
.filter { it.features.hasAncControl && it.features.hasDualPods }
|
||||||
|
.filter { it !in noEarDetectionAncModels }
|
||||||
.forEach { model ->
|
.forEach { model ->
|
||||||
model.features.hasEarDetection shouldBe true
|
model.features.hasEarDetection shouldBe true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user