diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-10-24 13:34:31 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-10-24 15:05:56 -0700 |
commit | 2bc0c5fef25fe6d64b976133a3434233f3515d78 (patch) | |
tree | 6de1bac2445808d43158dad8c36c7bd6b4041a9a /wifi | |
parent | cd668554417f089aa0ae013a29ab81864b4b4685 (diff) | |
download | frameworks_base-2bc0c5fef25fe6d64b976133a3434233f3515d78.zip frameworks_base-2bc0c5fef25fe6d64b976133a3434233f3515d78.tar.gz frameworks_base-2bc0c5fef25fe6d64b976133a3434233f3515d78.tar.bz2 |
Handle group tear down only at group removed event
Handling group removal at disconnect causes issues where supplicant keeps
the group and then the next invocation fails
Bug: 7403755
Change-Id: Iea7e5ec98486607f8e2c4a55be3743e0545a9da7
Diffstat (limited to 'wifi')
-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 03a0434..039319d 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(); |