summaryrefslogtreecommitdiffstats
path: root/wifi/java/android/net/wifi/p2p
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@android.com>2012-11-27 11:27:25 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-27 11:27:25 -0800
commitb637322fd0dbf9402d84bedee891b813728656c0 (patch)
tree40b39959d40f4e0c2afd0f5359d09e2a53e534d4 /wifi/java/android/net/wifi/p2p
parentf6e7b2089dcde81b92617102fa78b4104df29433 (diff)
parenta80b9954a4e68700030e0c1718a82f3433074037 (diff)
downloadframeworks_base-b637322fd0dbf9402d84bedee891b813728656c0.zip
frameworks_base-b637322fd0dbf9402d84bedee891b813728656c0.tar.gz
frameworks_base-b637322fd0dbf9402d84bedee891b813728656c0.tar.bz2
am a80b9954: am 10c29234: am 13fd8919: Merge "Fixed typo and space."
* commit 'a80b9954a4e68700030e0c1718a82f3433074037': Fixed typo and space.
Diffstat (limited to 'wifi/java/android/net/wifi/p2p')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java80
1 files changed, 40 insertions, 40 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index fdb21ad..594a26f 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -166,11 +166,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
/* Commands to the WifiStateMachine */
public static final int P2P_CONNECTION_CHANGED = BASE + 11;
- /* These commands are used to tempoarily disconnect wifi when we detect
+ /* These commands are used to temporarily disconnect wifi when we detect
* a frequency conflict which would make it impossible to have with p2p
* and wifi active at the same time.
*
- * If the user chooses to disable wifi tempoarily, we keep wifi disconnected
+ * If the user chooses to disable wifi temporarily, we keep wifi disconnected
* until the p2p connection is done and terminated at which point we will
* bring back wifi up
*
@@ -390,7 +390,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
* not get latest updates about the device without being in discovery state.
*
* From the framework perspective, the device is still there since we are connecting or
- * connected to it. so we keep these devices in a seperate list, so that they are removed
+ * connected to it. so we keep these devices in a separate list, so that they are removed
* when connection is cancelled or lost
*/
private final WifiP2pDeviceList mPeersLostDuringConnection = new WifiP2pDeviceList();
@@ -1056,48 +1056,48 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
//and wait instead for the GO_NEGOTIATION_REQUEST_EVENT.
//Handling provision discovery and issuing a p2p_connect before
//group negotiation comes through causes issues
- break;
+ break;
case WifiP2pManager.CREATE_GROUP:
- mAutonomousGroup = true;
- int netId = message.arg1;
- boolean ret = false;
- if (netId == WifiP2pGroup.PERSISTENT_NET_ID) {
- // check if the go persistent group is present.
- netId = mGroups.getNetworkId(mThisDevice.deviceAddress);
- if (netId != -1) {
- ret = mWifiNative.p2pGroupAdd(netId);
- } else {
- ret = mWifiNative.p2pGroupAdd(true);
- }
- } else {
- ret = mWifiNative.p2pGroupAdd(false);
- }
-
- if (ret) {
- replyToMessage(message, WifiP2pManager.CREATE_GROUP_SUCCEEDED);
- transitionTo(mGroupNegotiationState);
- } else {
- replyToMessage(message, WifiP2pManager.CREATE_GROUP_FAILED,
- WifiP2pManager.ERROR);
- // remain at this state.
- }
- break;
+ mAutonomousGroup = true;
+ int netId = message.arg1;
+ boolean ret = false;
+ if (netId == WifiP2pGroup.PERSISTENT_NET_ID) {
+ // check if the go persistent group is present.
+ netId = mGroups.getNetworkId(mThisDevice.deviceAddress);
+ if (netId != -1) {
+ ret = mWifiNative.p2pGroupAdd(netId);
+ } else {
+ ret = mWifiNative.p2pGroupAdd(true);
+ }
+ } else {
+ ret = mWifiNative.p2pGroupAdd(false);
+ }
+
+ if (ret) {
+ replyToMessage(message, WifiP2pManager.CREATE_GROUP_SUCCEEDED);
+ transitionTo(mGroupNegotiationState);
+ } else {
+ replyToMessage(message, WifiP2pManager.CREATE_GROUP_FAILED,
+ WifiP2pManager.ERROR);
+ // remain at this state.
+ }
+ break;
case WifiMonitor.P2P_GROUP_STARTED_EVENT:
- mGroup = (WifiP2pGroup) message.obj;
- if (DBG) logd(getName() + " group started");
+ 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;
+ 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 NOT_HANDLED;
}
return HANDLED;
}