Refine logging persistent group

This commit is contained in:
Mygod
2019-01-15 01:54:02 +08:00
parent c1e948dbbf
commit dfbb534461

View File

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