summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-19 12:40:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-19 12:40:40 -0700
commitcacc47920795ad0421f056004c03984a8e114b8b (patch)
tree7023c3bdb074df31ca7c802edbfe7ae0c89c6054 /wifi
parentaf26ac3130c0e956e28443d6e42212b02d4da611 (diff)
parent61e42262000549b78843f0959043fec8367ed189 (diff)
downloadframeworks_base-cacc47920795ad0421f056004c03984a8e114b8b.zip
frameworks_base-cacc47920795ad0421f056004c03984a8e114b8b.tar.gz
frameworks_base-cacc47920795ad0421f056004c03984a8e114b8b.tar.bz2
am 61e42262: Fix group join CTS test
* commit '61e42262000549b78843f0959043fec8367ed189': Fix group join CTS test
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index 5f1e6bb..ba8ffec 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -1467,6 +1467,12 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
if (mGroup.isGroupOwner()) {
setWifiP2pInfoOnGroupFormation(SERVER_ADDRESS);
}
+
+ // In case of a negotiation group, connection changed is sent
+ // after a client joins. For autonomous, send now
+ if (mAutonomousGroup) {
+ sendP2pConnectionChangedBroadcast();
+ }
}
@Override
@@ -1481,7 +1487,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
deviceAddress.equals(mSavedProvDiscDevice.deviceAddress)) {
mSavedProvDiscDevice = null;
}
- mGroup.addClient(mPeers.get(deviceAddress));
+ if (mPeers.get(deviceAddress) != null) {
+ mGroup.addClient(mPeers.get(deviceAddress));
+ } else {
+ mGroup.addClient(deviceAddress);
+ }
mPeers.updateStatus(deviceAddress, WifiP2pDevice.CONNECTED);
if (DBG) logd(getName() + " ap sta connected");
sendP2pPeersChangedBroadcast();