summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-23 09:39:42 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-23 09:39:42 -0700
commit5e7fcf372e3559e4f2cacdf892f268b0e5ee1d6c (patch)
tree5e8823ffabbf4d255645609d1855b18eadbf93f8 /wifi
parentc47156781c1b348df7c6b40d0af8d173c08293a2 (diff)
parentbf310d1f6ef4ac167f66a4e31724c7766981bd84 (diff)
downloadframeworks_base-5e7fcf372e3559e4f2cacdf892f268b0e5ee1d6c.zip
frameworks_base-5e7fcf372e3559e4f2cacdf892f268b0e5ee1d6c.tar.gz
frameworks_base-5e7fcf372e3559e4f2cacdf892f268b0e5ee1d6c.tar.bz2
am bf310d1f: Merge "Fix issues shown on CTS tests" into jb-mr1-dev
* commit 'bf310d1f6ef4ac167f66a4e31724c7766981bd84': Fix issues shown on CTS tests
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index ba8ffec..4ac487d 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -1081,7 +1081,21 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
// remain at this state.
}
break;
- default:
+ case WifiMonitor.P2P_GROUP_STARTED_EVENT:
+ mGroup = (WifiP2pGroup) message.obj;
+ if (DBG) logd(getName() + " group started");
+
+ // We hit this scenario when a persistent group is reinvoked
+ if (mGroup.getNetworkId() == WifiP2pGroup.PERSISTENT_NET_ID) {
+ mAutonomousGroup = false;
+ deferMessage(message);
+ transitionTo(mGroupNegotiationState);
+ } else {
+ loge("Unexpected group creation, remove " + mGroup);
+ mWifiNative.p2pGroupRemove(mGroup.getInterface());
+ }
+ break;
+ default:
return NOT_HANDLED;
}
return HANDLED;
@@ -2360,6 +2374,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
}
NetworkUtils.resetConnections(mGroup.getInterface(), NetworkUtils.RESET_ALL_ADDRESSES);
+ // Clear any timeout that was set. This is essential for devices
+ // that reuse the main p2p interface for a created group.
+ mWifiNative.setP2pGroupIdle(mGroup.getInterface(), 0);
+
mGroup = null;
mWifiNative.p2pFlush();
if (mPeers.remove(mPeersLostDuringConnection)) sendP2pPeersChangedBroadcast();
@@ -2371,7 +2389,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
mWifiChannel.sendMessage(WifiP2pService.DISCONNECT_WIFI_REQUEST, 0);
mTempoarilyDisconnectedWifi = false;
}
- }
+ }
//State machine initiated requests can have replyTo set to null indicating
//there are no recipients, we ignore those reply actions