feat(popup): Add product photo icons for all device models

Replace vector silhouette placeholders with actual product photo PNGs
for 14 device families across 5 DPI buckets. Fix drawable naming prefix
(devic_ -> device_), add per-model icon overrides for popup left/right/case
views, disable image tinting for color PNGs, fix inverted signal visibility
logic, and use monochrome icon for notification small icon.
This commit is contained in:
darken
2026-02-21 19:22:07 +01:00
committed by Matthias Urhahn
parent 8405406d22
commit a801f2d701
215 changed files with 196 additions and 85 deletions
@@ -55,7 +55,7 @@ class MonitorNotifications @Inject constructor(
builder = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID).apply { builder = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID).apply {
setContentIntent(openPi) setContentIntent(openPi)
priority = NotificationCompat.PRIORITY_LOW priority = NotificationCompat.PRIORITY_LOW
setSmallIcon(R.drawable.devic_earbuds_generic_both) setSmallIcon(R.drawable.device_earbuds_generic_both)
setOngoing(true) setOngoing(true)
setContentTitle(context.getString(R.string.app_name)) setContentTitle(context.getString(R.string.app_name))
} }
@@ -68,7 +68,7 @@ class MonitorNotifications @Inject constructor(
setStyle(NotificationCompat.BigTextStyle()) setStyle(NotificationCompat.BigTextStyle())
setContentTitle(context.getString(R.string.pods_none_label_short)) setContentTitle(context.getString(R.string.pods_none_label_short))
setSubText(context.getString(R.string.app_name)) setSubText(context.getString(R.string.app_name))
setSmallIcon(R.drawable.devic_earbuds_generic_both) setSmallIcon(R.drawable.device_earbuds_generic_both)
} }
} }
@@ -135,7 +135,7 @@ class MonitorNotifications @Inject constructor(
setStyle(NotificationCompat.DecoratedCustomViewStyle()) setStyle(NotificationCompat.DecoratedCustomViewStyle())
setCustomBigContentView(notificationViewFactory.createContentView(device)) setCustomBigContentView(notificationViewFactory.createContentView(device))
setSmallIcon(device.iconRes) setSmallIcon(R.drawable.device_earbuds_generic_both)
setContentTitle("$batteryText ~ $stateText") setContentTitle("$batteryText ~ $stateText")
setSubText(null) setSubText(null)
log(TAG, VERBOSE) { "updatingNotification(): $device" } log(TAG, VERBOSE) { "updatingNotification(): $device" }
@@ -186,7 +186,7 @@ class MonitorNotifications @Inject constructor(
) )
return NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID) return NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID)
.setContentIntent(openPi) .setContentIntent(openPi)
.setSmallIcon(R.drawable.devic_earbuds_generic_both) .setSmallIcon(R.drawable.device_earbuds_generic_both)
.setContentTitle(context.getString(R.string.app_name)) .setContentTitle(context.getString(R.string.app_name))
.setPriority(NotificationCompat.PRIORITY_LOW) .setPriority(NotificationCompat.PRIORITY_LOW)
.setOngoing(true) .setOngoing(true)
@@ -16,9 +16,9 @@ interface DualPodDevice : PodDevice {
@get:DrawableRes @get:DrawableRes
val leftPodIcon: Int val leftPodIcon: Int
get() = R.drawable.devic_airpods_gen1_left get() = R.drawable.device_airpods_gen1_left
@get:DrawableRes @get:DrawableRes
val rightPodIcon: Int val rightPodIcon: Int
get() = R.drawable.devic_airpods_gen1_right get() = R.drawable.device_airpods_gen1_right
} }
@@ -11,5 +11,5 @@ interface HasCase {
@get:DrawableRes @get:DrawableRes
val caseIcon: Int val caseIcon: Int
get() = R.drawable.devic_airpods_gen1_case get() = R.drawable.device_airpods_gen1_case
} }
@@ -77,98 +77,107 @@ interface PodDevice {
@JsonClass(generateAdapter = false) @JsonClass(generateAdapter = false)
enum class Model( enum class Model(
val label: String, val label: String,
@DrawableRes val iconRes: Int = R.drawable.devic_earbuds_generic_both, @DrawableRes val iconRes: Int = R.drawable.device_earbuds_generic_both,
) { ) {
@Json(name = "airpods.gen1") AIRPODS_GEN1( @Json(name = "airpods.gen1") AIRPODS_GEN1(
label = "AirPods (Gen 1)", label = "AirPods (Gen 1)",
iconRes = R.drawable.devic_airpods_gen1_both, iconRes = R.drawable.device_airpods_gen1_both,
), ),
@Json(name = "airpods.gen2") AIRPODS_GEN2( @Json(name = "airpods.gen2") AIRPODS_GEN2(
"AirPods (Gen 2)", "AirPods (Gen 2)",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen1_both,
), ),
@Json(name = "airpods.gen3") AIRPODS_GEN3( @Json(name = "airpods.gen3") AIRPODS_GEN3(
"AirPods (Gen 3)", "AirPods (Gen 3)",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen3_both,
), ),
@Json(name = "airpods.gen4") AIRPODS_GEN4( @Json(name = "airpods.gen4") AIRPODS_GEN4(
"AirPods (Gen 4)", "AirPods (Gen 4)",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen3_both,
), ),
@Json(name = "airpods.gen4.anc") AIRPODS_GEN4_ANC( @Json(name = "airpods.gen4.anc") AIRPODS_GEN4_ANC(
"AirPods (Gen 4 ANC)", "AirPods (Gen 4 ANC)",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen4anc_both,
), ),
@Json(name = "airpods.pro") AIRPODS_PRO( @Json(name = "airpods.pro") AIRPODS_PRO(
"AirPods Pro", "AirPods Pro",
R.drawable.devic_airpods_pro2_both R.drawable.device_airpods_pro2_both
), ),
@Json(name = "airpods.pro2") AIRPODS_PRO2( @Json(name = "airpods.pro2") AIRPODS_PRO2(
"AirPods Pro 2", "AirPods Pro 2",
R.drawable.devic_airpods_pro2_both R.drawable.device_airpods_pro2_both
), ),
@Json(name = "airpods.pro2.usbc") AIRPODS_PRO2_USBC( @Json(name = "airpods.pro2.usbc") AIRPODS_PRO2_USBC(
"AirPods Pro 2 USB-C", "AirPods Pro 2 USB-C",
R.drawable.devic_airpods_pro2_both R.drawable.device_airpods_pro2_both
), ),
@Json(name = "airpods.pro3") AIRPODS_PRO3( @Json(name = "airpods.pro3") AIRPODS_PRO3(
"AirPods Pro 3", "AirPods Pro 3",
R.drawable.devic_airpods_pro2_both R.drawable.device_airpods_pro2_both
), ),
@Json(name = "airpods.max") AIRPODS_MAX( @Json(name = "airpods.max") AIRPODS_MAX(
"AirPods Max", "AirPods Max",
R.drawable.devic_headphones_generic R.drawable.device_airpods_max
), ),
@Json(name = "airpods.max.usbc") AIRPODS_MAX_USBC( @Json(name = "airpods.max.usbc") AIRPODS_MAX_USBC(
"AirPods Max USB-C", "AirPods Max USB-C",
R.drawable.devic_headphones_generic R.drawable.device_airpods_max
), ),
@Json(name = "beats.flex") BEATS_FLEX( @Json(name = "beats.flex") BEATS_FLEX(
"Beats Flex" "Beats Flex",
R.drawable.device_beats_earbuds,
), ),
@Json(name = "beats.solo.3") BEATS_SOLO_3( @Json(name = "beats.solo.3") BEATS_SOLO_3(
"Beats Solo 3" "Beats Solo 3",
R.drawable.device_beats_headphones,
), ),
@Json(name = "beats.studio.3") BEATS_STUDIO_3( @Json(name = "beats.studio.3") BEATS_STUDIO_3(
"Beats Studio 3" "Beats Studio 3",
R.drawable.device_beats_studio3,
), ),
@Json(name = "beats.x") BEATS_X( @Json(name = "beats.x") BEATS_X(
"Beats X" "Beats X",
R.drawable.device_beats_x,
), ),
@Json(name = "beats.powerbeats.3") POWERBEATS_3( @Json(name = "beats.powerbeats.3") POWERBEATS_3(
"Power Beats 3" "Power Beats 3",
R.drawable.device_powerbeats_3,
), ),
@Json(name = "beats.powerbeats.4") POWERBEATS_4( @Json(name = "beats.powerbeats.4") POWERBEATS_4(
"Power Beats 4" "Power Beats 4",
R.drawable.device_powerbeats_4,
), ),
@Json(name = "beats.powerbeats.pro") POWERBEATS_PRO( @Json(name = "beats.powerbeats.pro") POWERBEATS_PRO(
"Power Beats Pro" "Power Beats Pro",
R.drawable.device_powerbeats_pro_both,
), ),
@Json(name = "beats.powerbeats.pro2") POWERBEATS_PRO2( @Json(name = "beats.powerbeats.pro2") POWERBEATS_PRO2(
"Power Beats Pro 2" "Power Beats Pro 2",
R.drawable.device_powerbeats_pro2_both,
), ),
@Json(name = "beats.fit.pro") BEATS_FIT_PRO( @Json(name = "beats.fit.pro") BEATS_FIT_PRO(
"Beats Fit Pro" "Beats Fit Pro",
R.drawable.device_beats_fitpro_both,
), ),
@Json(name = "fakes.tws.i99999") FAKE_AIRPODS_GEN1( @Json(name = "fakes.tws.i99999") FAKE_AIRPODS_GEN1(
"AirPods (Gen 1)? \uD83C\uDFAD", "AirPods (Gen 1)? \uD83C\uDFAD",
R.drawable.devic_airpods_gen1_both, R.drawable.device_airpods_gen1_both,
), ),
@Json(name = "fakes.generic.airpods.gen2") FAKE_AIRPODS_GEN2( @Json(name = "fakes.generic.airpods.gen2") FAKE_AIRPODS_GEN2(
"AirPods (Gen 2)? \uD83C\uDFAD", "AirPods (Gen 2)? \uD83C\uDFAD",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen1_both,
), ),
@Json(name = "fakes.generic.airpods.gen3") FAKE_AIRPODS_GEN3( @Json(name = "fakes.generic.airpods.gen3") FAKE_AIRPODS_GEN3(
"AirPods (Gen 3)? \uD83C\uDFAD", "AirPods (Gen 3)? \uD83C\uDFAD",
R.drawable.devic_airpods_gen2_both, R.drawable.device_airpods_gen3_both,
), ),
@Json(name = "fakes.varunr.airpodspro") FAKE_AIRPODS_PRO( @Json(name = "fakes.varunr.airpodspro") FAKE_AIRPODS_PRO(
"AirPods Pro? \uD83C\uDFAD", "AirPods Pro? \uD83C\uDFAD",
R.drawable.devic_airpods_pro2_both, R.drawable.device_airpods_pro2_both,
), ),
@Json(name = "fakes.generic.airpods.pro2") FAKE_AIRPODS_PRO2( @Json(name = "fakes.generic.airpods.pro2") FAKE_AIRPODS_PRO2(
"AirPods Pro2? \uD83C\uDFAD", "AirPods Pro2? \uD83C\uDFAD",
R.drawable.devic_airpods_pro2_both, R.drawable.device_airpods_pro2_both,
), ),
@Json(name = "unknown") UNKNOWN( @Json(name = "unknown") UNKNOWN(
"Unknown" "Unknown"
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.airpods package eu.darken.capod.pods.core.apple.airpods
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class AirPodsGen3(
override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN3 override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN3
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_airpods_gen3_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_airpods_gen3_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_airpods_gen3_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.airpods package eu.darken.capod.pods.core.apple.airpods
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class AirPodsGen4(
override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN4 override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN4
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_airpods_gen3_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_airpods_gen3_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_airpods_gen3_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.airpods package eu.darken.capod.pods.core.apple.airpods
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class AirPodsGen4Anc(
override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN4_ANC override val model: PodDevice.Model = PodDevice.Model.AIRPODS_GEN4_ANC
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_airpods_gen4anc_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_airpods_gen4anc_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_airpods_gen4anc_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -34,19 +34,19 @@ data class AirPodsPro(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -34,19 +34,19 @@ data class AirPodsPro2(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -34,19 +34,19 @@ data class AirPodsPro2Usbc(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -34,19 +34,19 @@ data class AirPodsPro3(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.beats package eu.darken.capod.pods.core.apple.beats
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class BeatsFitPro(
override val model: PodDevice.Model = PodDevice.Model.BEATS_FIT_PRO override val model: PodDevice.Model = PodDevice.Model.BEATS_FIT_PRO
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_beats_fitpro_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_beats_fitpro_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_beats_fitpro_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.beats package eu.darken.capod.pods.core.apple.beats
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class PowerBeatsPro(
override val model: PodDevice.Model = PodDevice.Model.POWERBEATS_PRO override val model: PodDevice.Model = PodDevice.Model.POWERBEATS_PRO
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_powerbeats_pro_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_powerbeats_pro_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_powerbeats_pro_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.beats package eu.darken.capod.pods.core.apple.beats
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.PodDevice import eu.darken.capod.pods.core.PodDevice
@@ -29,6 +31,18 @@ data class PowerBeatsPro2(
override val model: PodDevice.Model = PodDevice.Model.POWERBEATS_PRO2 override val model: PodDevice.Model = PodDevice.Model.POWERBEATS_PRO2
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_powerbeats_pro2_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_powerbeats_pro2_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_powerbeats_pro2_case
override val batteryCasePercent: Float? override val batteryCasePercent: Float?
get() = super.batteryCasePercent ?: cachedBatteryPercentage get() = super.batteryCasePercent ?: cachedBatteryPercentage
@@ -1,5 +1,7 @@
package eu.darken.capod.pods.core.apple.misc package eu.darken.capod.pods.core.apple.misc
import androidx.annotation.DrawableRes
import eu.darken.capod.R
import eu.darken.capod.common.bluetooth.BleScanResult import eu.darken.capod.common.bluetooth.BleScanResult
import eu.darken.capod.common.debug.logging.logTag import eu.darken.capod.common.debug.logging.logTag
import eu.darken.capod.pods.core.HasCase import eu.darken.capod.pods.core.HasCase
@@ -35,6 +37,18 @@ data class FakeAirPodsGen3(
override val model: PodDevice.Model = PodDevice.Model.FAKE_AIRPODS_GEN3 override val model: PodDevice.Model = PodDevice.Model.FAKE_AIRPODS_GEN3
@get:DrawableRes
override val leftPodIcon: Int
get() = R.drawable.device_airpods_gen3_left
@get:DrawableRes
override val rightPodIcon: Int
get() = R.drawable.device_airpods_gen3_right
@get:DrawableRes
override val caseIcon: Int
get() = R.drawable.device_airpods_gen3_case
override val rssi: Int override val rssi: Int
get() = rssiAverage ?: super<DualApplePods>.rssi get() = rssiAverage ?: super<DualApplePods>.rssi
@@ -39,19 +39,19 @@ data class FakeAirPodsPro(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val rssi: Int override val rssi: Int
get() = rssiAverage ?: super<DualApplePods>.rssi get() = rssiAverage ?: super<DualApplePods>.rssi
@@ -41,19 +41,19 @@ data class FakeAirPodsPro2(
@get:DrawableRes @get:DrawableRes
override val iconRes: Int override val iconRes: Int
get() = R.drawable.devic_airpods_pro2_both get() = R.drawable.device_airpods_pro2_both
@get:DrawableRes @get:DrawableRes
override val caseIcon: Int override val caseIcon: Int
get() = R.drawable.devic_airpods_pro2_case get() = R.drawable.device_airpods_pro2_case
@get:DrawableRes @get:DrawableRes
override val leftPodIcon: Int override val leftPodIcon: Int
get() = R.drawable.devic_airpods_pro2_left get() = R.drawable.device_airpods_pro2_left
@get:DrawableRes @get:DrawableRes
override val rightPodIcon: Int override val rightPodIcon: Int
get() = R.drawable.devic_airpods_pro2_right get() = R.drawable.device_airpods_pro2_right
override val rssi: Int override val rssi: Int
get() = rssiAverage ?: super<DualApplePods>.rssi get() = rssiAverage ?: super<DualApplePods>.rssi
@@ -41,11 +41,12 @@ class PopUpPodViewFactory @Inject constructor(
PopupNotificationDualPodsBinding.inflate(layoutInflater, parent, false).apply { PopupNotificationDualPodsBinding.inflate(layoutInflater, parent, false).apply {
podLabel.text = device.getLabel(context) podLabel.text = device.getLabel(context)
signal.text = device.getSignalQuality(context) signal.text = device.getSignalQuality(context)
signal.isGone = debugSettings.isDebugModeEnabled.value signal.isGone = !debugSettings.isDebugModeEnabled.value
// Left // Left
val leftPercent = device.batteryLeftPodPercent val leftPercent = device.batteryLeftPodPercent
podLeftIcon.setImageResource(device.leftPodIcon) podLeftIcon.setImageResource(device.leftPodIcon)
podLeftIcon.imageTintList = null
podLeftBatteryIcon.setImageResource(getBatteryDrawable(leftPercent)) podLeftBatteryIcon.setImageResource(getBatteryDrawable(leftPercent))
podLeftBatteryLabel.text = formatBatteryPercent(context, leftPercent) podLeftBatteryLabel.text = formatBatteryPercent(context, leftPercent)
@@ -54,6 +55,7 @@ class PopUpPodViewFactory @Inject constructor(
(device as? HasCase)?.let { case -> (device as? HasCase)?.let { case ->
val casePercent = case.batteryCasePercent val casePercent = case.batteryCasePercent
podCaseIcon.setImageResource(case.caseIcon) podCaseIcon.setImageResource(case.caseIcon)
podCaseIcon.imageTintList = null
podCaseBatteryIcon.setImageResource(getBatteryDrawable(casePercent)) podCaseBatteryIcon.setImageResource(getBatteryDrawable(casePercent))
podCaseBatteryLabel.text = formatBatteryPercent(context, casePercent) podCaseBatteryLabel.text = formatBatteryPercent(context, casePercent)
} }
@@ -61,6 +63,7 @@ class PopUpPodViewFactory @Inject constructor(
// Right // Right
val rightPercent = device.batteryRightPodPercent val rightPercent = device.batteryRightPodPercent
podRightIcon.setImageResource(device.rightPodIcon) podRightIcon.setImageResource(device.rightPodIcon)
podRightIcon.imageTintList = null
podRightBatteryIcon.setImageResource(getBatteryDrawable(rightPercent)) podRightBatteryIcon.setImageResource(getBatteryDrawable(rightPercent))
podRightBatteryLabel.text = formatBatteryPercent(context, rightPercent) podRightBatteryLabel.text = formatBatteryPercent(context, rightPercent)
}.root }.root
@@ -68,9 +71,10 @@ class PopUpPodViewFactory @Inject constructor(
private fun createSinglePod(parent: ViewGroup, device: SinglePodDevice): View = private fun createSinglePod(parent: ViewGroup, device: SinglePodDevice): View =
PopupNotificationSinglePodsBinding.inflate(layoutInflater, parent, false).apply { PopupNotificationSinglePodsBinding.inflate(layoutInflater, parent, false).apply {
headphonesIcon.setImageResource(device.iconRes) headphonesIcon.setImageResource(device.iconRes)
headphonesIcon.imageTintList = null
headphonesLabel.text = device.getLabel(context) headphonesLabel.text = device.getLabel(context)
signal.text = device.getSignalQuality(context) signal.text = device.getSignalQuality(context)
signal.isGone = debugSettings.isDebugModeEnabled.value signal.isGone = !debugSettings.isDebugModeEnabled.value
val headsetPercent = device.batteryHeadsetPercent val headsetPercent = device.batteryHeadsetPercent
headphonesBatteryIcon.setImageResource(getBatteryDrawable(headsetPercent)) headphonesBatteryIcon.setImageResource(getBatteryDrawable(headsetPercent))
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Some files were not shown because too many files have changed in this diff Show More