summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-19 12:03:47 -0700
committerIrfan Sheriff <isheriff@google.com>2012-10-19 12:30:47 -0700
commit61e42262000549b78843f0959043fec8367ed189 (patch)
treec6dddb018ad95c5a7e186fcba658f22b419c8d42 /wifi
parent398a6713c355cf59af071e944268aec7c0096b5a (diff)
downloadframeworks_base-61e42262000549b78843f0959043fec8367ed189.zip
frameworks_base-61e42262000549b78843f0959043fec8367ed189.tar.gz
frameworks_base-61e42262000549b78843f0959043fec8367ed189.tar.bz2
Fix group join CTS test
Bug: 7379336 Change-Id: I20ead7e8c0d855be523bdfd8d9cb9eaa4b8fcac1
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 7f32431..f0aef92 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -1465,6 +1465,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
@@ -1479,7 +1485,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();