mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-15 02:36: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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user