Skip to content

Commit 4e7f2ff

Browse files
isheriffAndroid (Google) Code Review
authored andcommitted
Merge "Handle group tear down only at group removed event" into jb-mr1-dev
2 parents 900e0ba + 2bc0c5f commit 4e7f2ff

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

wifi/java/android/net/wifi/p2p/WifiP2pService.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,9 +1566,17 @@ public boolean processMessage(Message message) {
15661566
WifiP2pManager.ERROR);
15671567
}
15681568
break;
1569-
/* The supplicant misses the group removed event at times and just
1570-
* sends a network disconnect event */
1571-
case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
1569+
/* We do not listen to NETWORK_DISCONNECTION_EVENT for group removal
1570+
* handling since supplicant actually tries to reconnect after a temporary
1571+
* disconnect until group idle time out. Eventually, a group removal event
1572+
* will come when group has been removed.
1573+
*
1574+
* When there are connectivity issues during temporary disconnect, the application
1575+
* will also just remove the group.
1576+
*
1577+
* Treating network disconnection as group removal causes race conditions since
1578+
* supplicant would still maintain the group at that stage.
1579+
*/
15721580
case WifiMonitor.P2P_GROUP_REMOVED_EVENT:
15731581
if (DBG) logd(getName() + " group removed");
15741582
handleGroupRemoved();

0 commit comments

Comments
 (0)