diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-09-06 14:19:30 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-09-06 17:36:59 -0700 |
commit | 0a66763744db9c9215567ed70051add7f55d53c7 (patch) | |
tree | 5fd33b0f3619d008fe85a2d9baf6bdefe41dbe31 /wifi | |
parent | ab4cd45133ccea6a66fb081f9b2a8d14eb3e4f1d (diff) | |
download | frameworks_base-0a66763744db9c9215567ed70051add7f55d53c7.zip frameworks_base-0a66763744db9c9215567ed70051add7f55d53c7.tar.gz frameworks_base-0a66763744db9c9215567ed70051add7f55d53c7.tar.bz2 |
Add connection broadcast on group creation failure
Change-Id: I8075a53997d968e6926e5ca78c9aadc60d8fcb2a
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index acb7e52..a6770bd 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1497,7 +1497,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { public void exit() { mSavedProvDiscDevice = null; updateThisDevice(WifiP2pDevice.AVAILABLE); - setWifiP2pInfoOnGroupTermination(); + resetWifiP2pInfo(); mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null); sendP2pConnectionChangedBroadcast(); } @@ -1976,7 +1976,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mWifiP2pInfo.groupOwnerAddress = NetworkUtils.numericToInetAddress(serverAddress); } - private void setWifiP2pInfoOnGroupTermination() { + private void resetWifiP2pInfo() { mWifiP2pInfo.groupFormed = false; mWifiP2pInfo.isGroupOwner = false; mWifiP2pInfo.groupOwnerAddress = null; @@ -2092,6 +2092,9 @@ public class WifiP2pService extends IWifiP2pManager.Stub { } private void handleGroupCreationFailure() { + resetWifiP2pInfo(); + mNetworkInfo.setDetailedState(NetworkInfo.DetailedState.FAILED, null, null); + sendP2pConnectionChangedBroadcast(); mSavedPeerConfig = null; /* After cancelling group formation, new connections on existing peers can fail * at supplicant. Flush and restart discovery */ |