A CAPod widget, oh my! ¯\_(ツ)_/¯

This commit is contained in:
darken
2022-11-05 11:53:09 +01:00
committed by Matthias Urhahn
parent 07a1fee013
commit b9f4992a33
18 changed files with 688 additions and 10 deletions
@@ -176,6 +176,15 @@ class PodMonitor @Inject constructor(
}
}
suspend fun latestMainDevice(): PodDevice? {
val currentMain = mainDevice.firstOrNull()
log(TAG) { "Live mainDevice is $currentMain" }
return currentMain ?: podDeviceCache.loadMainDevice()
?.let { podFactory.createPod(it)?.device }
.also { log(TAG) { "Cached mainDevice is $it" } }
}
private fun getUnfilteredFilter(): ScanFilter {
return ScanFilter.Builder().build()
}