diff options
| author | 2012-10-24 15:26:41 -0700 | |
|---|---|---|
| committer | 2012-10-24 15:26:41 -0700 | |
| commit | 9253f56163a7b88a09bc4347ba6fe631dd7a08d8 (patch) | |
| tree | 5ead0aca5822e9ce04cbfa353c07c35f8c8101ba | |
| parent | 2ca85c20517037a86fd59eba7946267dd49b4c61 (diff) | |
| parent | 4e7f2ffe1791807636ac542f73016773c30daa92 (diff) | |
am 4e7f2ffe: Merge "Handle group tear down only at group removed event" into jb-mr1-dev
* commit '4e7f2ffe1791807636ac542f73016773c30daa92':
Handle group tear down only at group removed event
| -rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 03a0434d9546..039319dca4d5 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1566,9 +1566,17 @@ public class WifiP2pService extends IWifiP2pManager.Stub { WifiP2pManager.ERROR); } break; - /* The supplicant misses the group removed event at times and just - * sends a network disconnect event */ - case WifiMonitor.NETWORK_DISCONNECTION_EVENT: + /* We do not listen to NETWORK_DISCONNECTION_EVENT for group removal + * handling since supplicant actually tries to reconnect after a temporary + * disconnect until group idle time out. Eventually, a group removal event + * will come when group has been removed. + * + * When there are connectivity issues during temporary disconnect, the application + * will also just remove the group. + * + * Treating network disconnection as group removal causes race conditions since + * supplicant would still maintain the group at that stage. + */ case WifiMonitor.P2P_GROUP_REMOVED_EVENT: if (DBG) logd(getName() + " group removed"); handleGroupRemoved(); |