Log persistent groups

This commit is contained in:
Mygod
2019-01-14 19:35:03 +08:00
parent 65e2b8fe45
commit c1e948dbbf

View File

@@ -192,6 +192,7 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
val device = binder.thisDevice ?: return val device = binder.thisDevice ?: return
try { try {
p2pManager.requestPersistentGroupInfo(channel) { p2pManager.requestPersistentGroupInfo(channel) {
DebugHelper.setString("$TAG.p2pPersistentGroups", it.toString())
val ownedGroups = it.filter { it.isGroupOwner && it.owner.deviceAddress == device.deviceAddress } val ownedGroups = it.filter { it.isGroupOwner && it.owner.deviceAddress == device.deviceAddress }
val main = ownedGroups.minBy { it.netId } val main = ownedGroups.minBy { it.netId }
// do not replace current group if it's better // do not replace current group if it's better