summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2017-04-21 22:04:52 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-21 22:04:52 +0000
commit5f701750d61cf71c98a3dc9099e32be5f1b8066c (patch)
treee375f3d01990cf8c2381ac32c5aecbdc1468c563
parentc99fc3b102491df3a11d867a0b5661aa8d2dd8d0 (diff)
parent9bc7bf37ea60a183a490da992d1fffe0f3a424b6 (diff)
Merge "Revert "Abort ongoing STA scan to prioritize P2P scan"" am: 440ef98fc5
am: 9bc7bf37ea Change-Id: I98e8b91f83c03b08259883b43160ff064cde8504
-rw-r--r--service/java/com/android/server/wifi/WifiInjector.java2
-rw-r--r--service/java/com/android/server/wifi/WificondControl.java18
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pNative.java17
3 files changed, 2 insertions, 35 deletions
diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java
index edf396994..817385340 100644
--- a/service/java/com/android/server/wifi/WifiInjector.java
+++ b/service/java/com/android/server/wifi/WifiInjector.java
@@ -161,7 +161,7 @@ public class WifiInjector {
mWifiP2pMonitor = new WifiP2pMonitor(this);
mSupplicantP2pIfaceHal = new SupplicantP2pIfaceHal(mWifiP2pMonitor);
mWifiP2pNative = new WifiP2pNative(SystemProperties.get("wifi.direct.interface", "p2p0"),
- mSupplicantP2pIfaceHal, mWificondControl);
+ mSupplicantP2pIfaceHal);
// Now get instances of all the objects that depend on the HandlerThreads
mTrafficPoller = new WifiTrafficPoller(mContext, mWifiServiceHandlerThread.getLooper(),
diff --git a/service/java/com/android/server/wifi/WificondControl.java b/service/java/com/android/server/wifi/WificondControl.java
index 8be747828..fdd0faffe 100644
--- a/service/java/com/android/server/wifi/WificondControl.java
+++ b/service/java/com/android/server/wifi/WificondControl.java
@@ -465,22 +465,4 @@ public class WificondControl {
return false;
}
- /**
- * Abort ongoing single scan triggered by wificond.
- * @return Returns true on success.
- */
- public boolean abortScan() {
- if (mWificondScanner == null) {
- Log.e(TAG, "No valid wificond scanner interface handler");
- return false;
- }
-
- try {
- return mWificondScanner.abortScan();
- } catch (RemoteException e1) {
- Log.e(TAG, "Failed to request abortScan due to remote exception");
- }
- return false;
- }
-
}
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pNative.java b/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
index 5de6585f4..bae3faa62 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
@@ -21,8 +21,6 @@ import android.net.wifi.p2p.WifiP2pGroup;
import android.net.wifi.p2p.WifiP2pGroupList;
import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import com.android.server.wifi.WificondControl;
-
/**
* Native calls for bring up/shut down of the supplicant daemon and for
* sending requests to the supplicant daemon
@@ -33,14 +31,11 @@ public class WifiP2pNative {
private final String mTAG;
private final String mInterfaceName;
private final SupplicantP2pIfaceHal mSupplicantP2pIfaceHal;
- private final WificondControl mWificondControl;
- public WifiP2pNative(String interfaceName, SupplicantP2pIfaceHal p2pIfaceHal,
- WificondControl wificondcontrol) {
+ public WifiP2pNative(String interfaceName, SupplicantP2pIfaceHal p2pIfaceHal) {
mTAG = "WifiP2pNative-" + interfaceName;
mInterfaceName = interfaceName;
mSupplicantP2pIfaceHal = p2pIfaceHal;
- mWificondControl = wificondcontrol;
}
public String getInterfaceName() {
@@ -252,7 +247,6 @@ public class WifiP2pNative {
* @return boolean value indicating whether operation was successful.
*/
public boolean p2pFind(int timeout) {
- abortScan();
return mSupplicantP2pIfaceHal.find(timeout);
}
@@ -603,13 +597,4 @@ public class WifiP2pNative {
public boolean saveConfig() {
return mSupplicantP2pIfaceHal.saveConfig();
}
-
- /**
- * Abort ongoing single scan triggered by wificond.
- *
- * @return true on success, false otherwise.
- */
- private boolean abortScan() {
- return mWificondControl.abortScan();
- }
}