diff --git a/app/src/main/java/eu/darken/capod/pods/core/PodModel.kt b/app/src/main/java/eu/darken/capod/pods/core/PodModel.kt index 97459479..9b90fdc8 100644 --- a/app/src/main/java/eu/darken/capod/pods/core/PodModel.kt +++ b/app/src/main/java/eu/darken/capod/pods/core/PodModel.kt @@ -11,178 +11,349 @@ enum class PodModel( @DrawableRes val iconRes: Int = R.drawable.device_earbuds_generic_both, val features: Features = Features(), ) { - @SerialName("airpods.gen1") AIRPODS_GEN1( - "AirPods (Gen 1)", R.drawable.device_airpods_gen1_both, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("airpods.gen2") AIRPODS_GEN2( - "AirPods (Gen 2)", R.drawable.device_airpods_gen1_both, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("airpods.gen3") AIRPODS_GEN3( - "AirPods (Gen 3)", R.drawable.device_airpods_gen3_both, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("airpods.gen4") AIRPODS_GEN4( - "AirPods (Gen 4)", R.drawable.device_airpods_gen3_both, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("airpods.gen4.anc") AIRPODS_GEN4_ANC( - "AirPods (Gen 4 ANC)", R.drawable.device_airpods_gen4anc_both, + @SerialName("airpods.gen1") + AIRPODS_GEN1( + "AirPods (Gen 1)", + R.drawable.device_airpods_gen1_both, Features( - hasDualPods = true, hasCase = true, hasEarDetection = true, - hasAncControl = true, hasAdaptiveAnc = true, - hasConversationAwareness = true, hasNcOneAirpod = true, - hasPressSpeed = true, hasPressHoldDuration = true, - hasVolumeSwipe = true, hasVolumeSwipeLength = true, - hasPersonalizedVolume = true, hasToneVolume = true, - hasEndCallMuteMic = true, hasAdaptiveAudioNoise = true, + hasDualPods = true, + hasCase = true, + ), + ), + + @SerialName("airpods.gen2") + AIRPODS_GEN2( + "AirPods (Gen 2)", + R.drawable.device_airpods_gen1_both, + Features( + hasDualPods = true, + hasCase = true, + ), + ), + + @SerialName("airpods.gen3") + AIRPODS_GEN3( + "AirPods (Gen 3)", + R.drawable.device_airpods_gen3_both, + Features( + hasDualPods = true, + hasCase = true, + ), + ), + + @SerialName("airpods.gen4") + AIRPODS_GEN4( + "AirPods (Gen 4)", + R.drawable.device_airpods_gen3_both, + Features( + hasDualPods = true, + hasCase = true, + ), + ), + + @SerialName("airpods.gen4.anc") + AIRPODS_GEN4_ANC( + "AirPods (Gen 4 ANC)", + R.drawable.device_airpods_gen4anc_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + hasAdaptiveAnc = true, + hasConversationAwareness = true, + hasNcOneAirpod = true, + hasPressSpeed = true, + hasPressHoldDuration = true, + hasVolumeSwipe = true, + hasVolumeSwipeLength = true, + hasPersonalizedVolume = true, + hasToneVolume = true, + hasEndCallMuteMic = true, + hasAdaptiveAudioNoise = true, needsInitExt = true, ), ), - @SerialName("airpods.pro") AIRPODS_PRO( - "AirPods Pro", R.drawable.device_airpods_pro2_both, + + @SerialName("airpods.pro") + AIRPODS_PRO( + "AirPods Pro", + R.drawable.device_airpods_pro2_both, Features( - hasDualPods = true, hasCase = true, hasEarDetection = true, + hasDualPods = true, + hasCase = true, + hasEarDetection = true, hasAncControl = true, hasNcOneAirpod = true, - hasPressSpeed = true, hasPressHoldDuration = true, - hasVolumeSwipe = true, hasVolumeSwipeLength = true, + hasPressSpeed = true, + hasPressHoldDuration = true, + hasVolumeSwipe = true, + hasVolumeSwipeLength = true, hasToneVolume = true, ), ), - @SerialName("airpods.pro2") AIRPODS_PRO2( - "AirPods Pro 2", R.drawable.device_airpods_pro2_both, + + @SerialName("airpods.pro2") + AIRPODS_PRO2( + "AirPods Pro 2", + R.drawable.device_airpods_pro2_both, Features( - hasDualPods = true, hasCase = true, hasEarDetection = true, - hasAncControl = true, hasAdaptiveAnc = true, - hasConversationAwareness = true, hasNcOneAirpod = true, - hasPressSpeed = true, hasPressHoldDuration = true, - hasVolumeSwipe = true, hasVolumeSwipeLength = true, - hasPersonalizedVolume = true, hasToneVolume = true, - hasEndCallMuteMic = true, hasAdaptiveAudioNoise = true, + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + hasAdaptiveAnc = true, + hasConversationAwareness = true, + hasNcOneAirpod = true, + hasPressSpeed = true, + hasPressHoldDuration = true, + hasVolumeSwipe = true, + hasVolumeSwipeLength = true, + hasPersonalizedVolume = true, + hasToneVolume = true, + hasEndCallMuteMic = true, + hasAdaptiveAudioNoise = true, needsInitExt = true, ), ), - @SerialName("airpods.pro2.usbc") AIRPODS_PRO2_USBC( - "AirPods Pro 2 USB-C", R.drawable.device_airpods_pro2_both, + + @SerialName("airpods.pro2.usbc") + AIRPODS_PRO2_USBC( + "AirPods Pro 2 USB-C", + R.drawable.device_airpods_pro2_both, Features( - hasDualPods = true, hasCase = true, hasEarDetection = true, - hasAncControl = true, hasAdaptiveAnc = true, - hasConversationAwareness = true, hasNcOneAirpod = true, - hasPressSpeed = true, hasPressHoldDuration = true, - hasVolumeSwipe = true, hasVolumeSwipeLength = true, - hasPersonalizedVolume = true, hasToneVolume = true, - hasEndCallMuteMic = true, hasAdaptiveAudioNoise = true, + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + hasAdaptiveAnc = true, + hasConversationAwareness = true, + hasNcOneAirpod = true, + hasPressSpeed = true, + hasPressHoldDuration = true, + hasVolumeSwipe = true, + hasVolumeSwipeLength = true, + hasPersonalizedVolume = true, + hasToneVolume = true, + hasEndCallMuteMic = true, + hasAdaptiveAudioNoise = true, needsInitExt = true, ), ), - @SerialName("airpods.pro3") AIRPODS_PRO3( - "AirPods Pro 3", R.drawable.device_airpods_pro2_both, + + @SerialName("airpods.pro3") + AIRPODS_PRO3( + "AirPods Pro 3", + R.drawable.device_airpods_pro2_both, Features( - hasDualPods = true, hasCase = true, hasEarDetection = true, - hasAncControl = true, hasAdaptiveAnc = true, - hasConversationAwareness = true, hasNcOneAirpod = true, - hasPressSpeed = true, hasPressHoldDuration = true, - hasVolumeSwipe = true, hasVolumeSwipeLength = true, - hasPersonalizedVolume = true, hasToneVolume = true, - hasEndCallMuteMic = true, hasAdaptiveAudioNoise = true, + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + hasAdaptiveAnc = true, + hasConversationAwareness = true, + hasNcOneAirpod = true, + hasPressSpeed = true, + hasPressHoldDuration = true, + hasVolumeSwipe = true, + hasVolumeSwipeLength = true, + hasPersonalizedVolume = true, + hasToneVolume = true, + hasEndCallMuteMic = true, + hasAdaptiveAudioNoise = true, needsInitExt = true, ), ), - @SerialName("airpods.max") AIRPODS_MAX( - "AirPods Max", R.drawable.device_airpods_max, + + @SerialName("airpods.max") + AIRPODS_MAX( + "AirPods Max", + R.drawable.device_airpods_max, Features( hasAncControl = true, - hasPressSpeed = true, hasPressHoldDuration = true, + hasPressSpeed = true, + hasPressHoldDuration = true, hasToneVolume = true, ), ), - @SerialName("airpods.max.usbc") AIRPODS_MAX_USBC( - "AirPods Max USB-C", R.drawable.device_airpods_max, + + @SerialName("airpods.max.usbc") + AIRPODS_MAX_USBC( + "AirPods Max USB-C", + R.drawable.device_airpods_max, Features( hasAncControl = true, - hasPressSpeed = true, hasPressHoldDuration = true, + hasPressSpeed = true, + hasPressHoldDuration = true, hasToneVolume = true, ), ), - @SerialName("beats.flex") BEATS_FLEX( - "Beats Flex", R.drawable.device_beats_earbuds, - ), - @SerialName("beats.solo.3") BEATS_SOLO_3( - "Beats Solo 3", R.drawable.device_beats_headphones, - ), - @SerialName("beats.solo.pro") BEATS_SOLO_PRO( - "Beats Solo Pro", R.drawable.device_beats_headphones, + + @SerialName("beats.flex") + BEATS_FLEX("Beats Flex", R.drawable.device_beats_earbuds), + + @SerialName("beats.solo.3") + BEATS_SOLO_3("Beats Solo 3", R.drawable.device_beats_headphones), + + @SerialName("beats.solo.pro") + BEATS_SOLO_PRO( + "Beats Solo Pro", + R.drawable.device_beats_headphones, Features(hasAncControl = true), ), - @SerialName("beats.solo.4") BEATS_SOLO_4( - "Beats Solo 4", R.drawable.device_beats_headphones, + + @SerialName("beats.solo.4") + BEATS_SOLO_4("Beats Solo 4", R.drawable.device_beats_headphones), + + @SerialName("beats.solo.buds") + BEATS_SOLO_BUDS( + "Beats Solo Buds", + R.drawable.device_beats_earbuds, + Features( + hasDualPods = true, + hasCase = true, + ), ), - @SerialName("beats.solo.buds") BEATS_SOLO_BUDS( - "Beats Solo Buds", R.drawable.device_beats_earbuds, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("beats.studio.3") BEATS_STUDIO_3( - "Beats Studio 3", R.drawable.device_beats_studio3, + + @SerialName("beats.studio.3") + BEATS_STUDIO_3( + "Beats Studio 3", + R.drawable.device_beats_studio3, Features(hasAncControl = true), ), - @SerialName("beats.studio.buds") BEATS_STUDIO_BUDS( - "Beats Studio Buds", R.drawable.device_beats_earbuds, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), + + @SerialName("beats.studio.buds") + BEATS_STUDIO_BUDS( + "Beats Studio Buds", + R.drawable.device_beats_earbuds, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("beats.studio.buds.plus") BEATS_STUDIO_BUDS_PLUS( - "Beats Studio Buds+", R.drawable.device_beats_earbuds, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), + + @SerialName("beats.studio.buds.plus") + BEATS_STUDIO_BUDS_PLUS( + "Beats Studio Buds+", + R.drawable.device_beats_earbuds, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("beats.studio.pro") BEATS_STUDIO_PRO( - "Beats Studio Pro", R.drawable.device_beats_headphones, + + @SerialName("beats.studio.pro") + BEATS_STUDIO_PRO( + "Beats Studio Pro", + R.drawable.device_beats_headphones, Features(hasAncControl = true), ), - @SerialName("beats.x") BEATS_X( - "Beats X", R.drawable.device_beats_x, + + @SerialName("beats.x") + BEATS_X("Beats X", R.drawable.device_beats_x), + + @SerialName("beats.powerbeats.3") + POWERBEATS_3("Power Beats 3", R.drawable.device_powerbeats_3), + + @SerialName("beats.powerbeats.4") + POWERBEATS_4("Power Beats 4", R.drawable.device_powerbeats_4), + + @SerialName("beats.powerbeats.pro") + POWERBEATS_PRO( + "Power Beats Pro", + R.drawable.device_powerbeats_pro_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + ), ), - @SerialName("beats.powerbeats.3") POWERBEATS_3( - "Power Beats 3", R.drawable.device_powerbeats_3, + + @SerialName("beats.powerbeats.pro2") + POWERBEATS_PRO2( + "Power Beats Pro 2", + R.drawable.device_powerbeats_pro2_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("beats.powerbeats.4") POWERBEATS_4( - "Power Beats 4", R.drawable.device_powerbeats_4, + + @SerialName("beats.fit.pro") + BEATS_FIT_PRO( + "Beats Fit Pro", + R.drawable.device_beats_fitpro_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("beats.powerbeats.pro") POWERBEATS_PRO( - "Power Beats Pro", R.drawable.device_powerbeats_pro_both, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true), + + @SerialName("fakes.tws.i99999") + FAKE_AIRPODS_GEN1( + "AirPods (Gen 1)? \uD83C\uDFAD", + R.drawable.device_airpods_gen1_both, + Features( + hasDualPods = true, + hasCase = true, + ), ), - @SerialName("beats.powerbeats.pro2") POWERBEATS_PRO2( - "Power Beats Pro 2", R.drawable.device_powerbeats_pro2_both, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), + + @SerialName("fakes.generic.airpods.gen2") + FAKE_AIRPODS_GEN2( + "AirPods (Gen 2)? \uD83C\uDFAD", + R.drawable.device_airpods_gen1_both, + Features( + hasDualPods = true, + hasCase = true, + ), ), - @SerialName("beats.fit.pro") BEATS_FIT_PRO( - "Beats Fit Pro", R.drawable.device_beats_fitpro_both, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), + + @SerialName("fakes.generic.airpods.gen3") + FAKE_AIRPODS_GEN3( + "AirPods (Gen 3)? \uD83C\uDFAD", + R.drawable.device_airpods_gen3_both, + Features( + hasDualPods = true, + hasCase = true, + ), ), - @SerialName("fakes.tws.i99999") FAKE_AIRPODS_GEN1( - "AirPods (Gen 1)? \uD83C\uDFAD", R.drawable.device_airpods_gen1_both, - Features(hasDualPods = true, hasCase = true), + + @SerialName("fakes.varunr.airpodspro") + FAKE_AIRPODS_PRO( + "AirPods Pro? \uD83C\uDFAD", + R.drawable.device_airpods_pro2_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("fakes.generic.airpods.gen2") FAKE_AIRPODS_GEN2( - "AirPods (Gen 2)? \uD83C\uDFAD", R.drawable.device_airpods_gen1_both, - Features(hasDualPods = true, hasCase = true), + + @SerialName("fakes.generic.airpods.pro2") + FAKE_AIRPODS_PRO2( + "AirPods Pro2? \uD83C\uDFAD", + R.drawable.device_airpods_pro2_both, + Features( + hasDualPods = true, + hasCase = true, + hasEarDetection = true, + hasAncControl = true, + ), ), - @SerialName("fakes.generic.airpods.gen3") FAKE_AIRPODS_GEN3( - "AirPods (Gen 3)? \uD83C\uDFAD", R.drawable.device_airpods_gen3_both, - Features(hasDualPods = true, hasCase = true), - ), - @SerialName("fakes.varunr.airpodspro") FAKE_AIRPODS_PRO( - "AirPods Pro? \uD83C\uDFAD", R.drawable.device_airpods_pro2_both, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), - ), - @SerialName("fakes.generic.airpods.pro2") FAKE_AIRPODS_PRO2( - "AirPods Pro2? \uD83C\uDFAD", R.drawable.device_airpods_pro2_both, - Features(hasDualPods = true, hasCase = true, hasEarDetection = true, hasAncControl = true), - ), - @SerialName("unknown") UNKNOWN( - "Unknown" - ); + + @SerialName("unknown") + UNKNOWN("Unknown"), + ; data class Features( // Physical form @@ -206,4 +377,4 @@ enum class PodModel( // Protocol val needsInitExt: Boolean = false, ) -} \ No newline at end of file +}