Add comment
This commit is contained in:
@@ -206,12 +206,16 @@ class RepeaterService : Service(), WifiP2pManager.ChannelListener, SharedPrefere
|
|||||||
*/
|
*/
|
||||||
private fun onP2pConnectionChanged(info: WifiP2pInfo, net: NetworkInfo?, group: WifiP2pGroup) {
|
private fun onP2pConnectionChanged(info: WifiP2pInfo, net: NetworkInfo?, group: WifiP2pGroup) {
|
||||||
debugLog(TAG, "P2P connection changed: $info\n$net\n$group")
|
debugLog(TAG, "P2P connection changed: $info\n$net\n$group")
|
||||||
if (!info.groupFormed || !info.isGroupOwner || !group.isGroupOwner) {
|
when {
|
||||||
if (routingManager != null) clean() // P2P shutdown
|
!info.groupFormed || !info.isGroupOwner || !group.isGroupOwner -> {
|
||||||
} else if (routingManager != null) {
|
if (routingManager != null) clean() // P2P shutdown, else other groups changing before start, ignore
|
||||||
|
}
|
||||||
|
routingManager != null -> {
|
||||||
this.group = group
|
this.group = group
|
||||||
showNotification(group)
|
showNotification(group)
|
||||||
} else doStart(group)
|
}
|
||||||
|
else -> doStart(group)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* startService Step 3
|
* startService Step 3
|
||||||
|
|||||||
Reference in New Issue
Block a user