summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-09-18 12:05:31 -0700
committerIrfan Sheriff <isheriff@google.com>2012-09-18 12:20:37 -0700
commite0c28d5f1358fc2d4c464f910bd04fed4b283fef (patch)
tree9976222bbf17529eeb385245991846083eacbb1e /wifi
parent61e8180b09a6d64fdb93c867217a97f8084753f1 (diff)
downloadframeworks_base-e0c28d5f1358fc2d4c464f910bd04fed4b283fef.zip
frameworks_base-e0c28d5f1358fc2d4c464f910bd04fed4b283fef.tar.gz
frameworks_base-e0c28d5f1358fc2d4c464f910bd04fed4b283fef.tar.bz2
WFD fixes
- Specificy max GO intent for WFD - Increase GO idle time out to 20s and use it for GO and client - Fix connection broadcast Change-Id: Ia0e28bc9eb3e23d2830a6c814c5a537ca0bcd5db
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pConfig.java3
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java9
2 files changed, 6 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
index 100e062..f4440c8 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
@@ -37,6 +37,9 @@ public class WifiP2pConfig implements Parcelable {
*/
public WpsInfo wps;
+ /** @hide */
+ public static final int MAX_GROUP_OWNER_INTENT = 15;
+
/**
* This is an integer value between 0 and 15 where 0 indicates the least
* inclination to be a group owner and 15 indicates the highest inclination
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index edd1dac..58fcc55 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -135,7 +135,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
private static final int DISCOVER_TIMEOUT_S = 120;
/* Idle time after a peer is gone when the group is torn down */
- private static final int GROUP_IDLE_TIME_S = 5;
+ private static final int GROUP_IDLE_TIME_S = 20;
/**
* Delay between restarts upon failure to setup connection with supplicant
@@ -1221,13 +1221,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
mGroup.getNetworkName()));
}
+ mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S);
if (mGroup.isGroupOwner()) {
startDhcpServer(mGroup.getInterface());
} else {
- // Set group idle only for a client on the group interface to speed up
- // disconnect when GO is gone. Setting group idle time for a group owner
- // causes connectivity issues for new clients
- mWifiNative.setP2pGroupIdle(mGroup.getInterface(), GROUP_IDLE_TIME_S);
mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine(mContext,
P2pStateMachine.this, mGroup.getInterface());
mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP);
@@ -1292,7 +1289,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
//DHCP server has already been started if I am a group owner
if (mGroup.isGroupOwner()) {
setWifiP2pInfoOnGroupFormation(SERVER_ADDRESS);
- sendP2pConnectionChangedBroadcast();
}
}
@@ -1315,6 +1311,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
} else {
loge("Connect on null device address, ignore");
}
+ sendP2pConnectionChangedBroadcast();
break;
case WifiMonitor.AP_STA_DISCONNECTED_EVENT:
device = (WifiP2pDevice) message.obj;