mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b08d9a4d0 | ||
|
|
977f135c50 | ||
|
|
3c777d377e | ||
|
|
b98994f2f1 | ||
|
|
85860a53bf |
@@ -198,9 +198,10 @@ class PodMonitor @Inject constructor(
|
||||
}
|
||||
|
||||
private fun determineMainDevice(pods: List<PodDevice>): PodDevice? {
|
||||
val irkHit = pods.filterIsInstance<ApplePods>().firstOrNull { it.flags.isIRKMatch }
|
||||
if (irkHit != null) {
|
||||
log(TAG) { "Main device determined via IRK: $irkHit" }
|
||||
val identityKey = generalSettings.mainDeviceIdentityKey.value?.takeIf { it.isNotEmpty() }
|
||||
if (identityKey != null) {
|
||||
val irkHit = pods.filterIsInstance<ApplePods>().firstOrNull { it.flags.isIRKMatch }
|
||||
log(TAG) { "IRK is configured, main device irkHit=$irkHit" }
|
||||
return irkHit
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class AppleFactory @Inject constructor(
|
||||
if (!isIrkMatch) return@run null
|
||||
if (proximityMessage.data.size != ProximityPairing.PAIRING_MESSAGE_LENGTH) return@run null
|
||||
|
||||
val encKey = generalSettings.mainDeviceEncryptionKey.value
|
||||
val encKey = generalSettings.mainDeviceEncryptionKey.value?.takeIf { it.isNotEmpty() }
|
||||
if (encKey == null) return@run null
|
||||
|
||||
val encrypted = proximityMessage.data.takeLast(16).toUByteArray().toByteArray()
|
||||
|
||||
+6
-2
@@ -55,7 +55,9 @@ class GeneralSettingsFragment : PreferenceFragment3() {
|
||||
AirPodKeyInputDialog(requireContext()).create(
|
||||
mode = AirPodKeyInputDialog.Mode.IRK,
|
||||
current = generalSettings.mainDeviceIdentityKey.value?.toHex() ?: "",
|
||||
onKey = { generalSettings.mainDeviceIdentityKey.value = it.fromHex() },
|
||||
onKey = { raw ->
|
||||
generalSettings.mainDeviceIdentityKey.value = raw.fromHex().takeIf { it.isNotEmpty() }
|
||||
},
|
||||
onGuide = { webpageTool.open("https://github.com/d4rken-org/capod/wiki/airpod-Keys") }
|
||||
).show()
|
||||
true
|
||||
@@ -64,7 +66,9 @@ class GeneralSettingsFragment : PreferenceFragment3() {
|
||||
AirPodKeyInputDialog(requireContext()).create(
|
||||
mode = AirPodKeyInputDialog.Mode.ENC,
|
||||
current = generalSettings.mainDeviceEncryptionKey.value?.toHex() ?: "",
|
||||
onKey = { generalSettings.mainDeviceEncryptionKey.value = it.fromHex() },
|
||||
onKey = { raw ->
|
||||
generalSettings.mainDeviceEncryptionKey.value = raw.fromHex().takeIf { it.isNotEmpty() }
|
||||
},
|
||||
onGuide = { webpageTool.open("https://github.com/d4rken-org/capod/wiki/airpod-Keys") }
|
||||
).show()
|
||||
true
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
🐛 Bug fixes, 🚀 performance boosts, maybe even ✨ new features.
|
||||
|
||||
Changelog: https://capod.darken.eu/changelog
|
||||
|
||||
FYI: It’s just me here — thanks for understanding if replies take a bit. ¯\_(ツ)_/¯
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
### Updated by release.sh ###
|
||||
project.versioning.major=2
|
||||
project.versioning.minor=17
|
||||
project.versioning.patch=4
|
||||
project.versioning.patch=5
|
||||
project.versioning.build=0
|
||||
#############################
|
||||
|
||||
Reference in New Issue
Block a user