summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiNative.java
diff options
context:
space:
mode:
Diffstat (limited to 'service/java/com/android/server/wifi/WifiNative.java')
-rw-r--r--service/java/com/android/server/wifi/WifiNative.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 7bdd17c3e..84c659dcc 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -1317,6 +1317,18 @@ public class WifiNative {
doBooleanCommand("DRIVER MIRACAST " + mode);
}
+ public boolean getModeCapability(String mode) {
+ String ret = doStringCommand("GET_CAPABILITY modes");
+ if (!TextUtils.isEmpty(ret)) {
+ String[] tokens = ret.split(" ");
+ for (String t : tokens) {
+ if (t.compareTo(mode) == 0)
+ return true;
+ }
+ }
+ return false;
+ }
+
public boolean fetchAnqp(String bssid, String subtypes) {
return doBooleanCommand("ANQP_GET " + bssid + " " + subtypes);
}
@@ -1344,6 +1356,8 @@ public class WifiNative {
return doBooleanCommand("NFC_REPORT_HANDOVER RESP P2P " + requestMessage + " 00");
}
+ public native static boolean setMode(int mode);
+
/* WIFI HAL support */
private static final String TAG = "WifiNative-HAL";
@@ -2042,6 +2056,15 @@ public class WifiNative {
}
}
+ public boolean disable5GHzFrequencies(boolean disable) {
+ if (disable) {
+ return doBooleanCommand("P2P_SET disallow_freq 2485-6000");
+ } else {
+ //Empty set means,it will enable all frequences
+ return doBooleanCommand("P2P_SET disallow_freq \"\"");
+ }
+ }
+
private static native boolean setDfsFlagNative(int iface, boolean dfsOn);
synchronized public static boolean setDfsFlag(boolean dfsOn) {
synchronized (mLock) {
@@ -2229,11 +2252,12 @@ public class WifiNative {
Log.e(TAG,"Can not reset handler Before set any handler");
return false;
}
- sWifiLoggerEventHandler = null;
if (resetLogHandlerNative(sWlan0Index, sLogCmdId)) {
sLogCmdId = -1;
+ sWifiLoggerEventHandler = null;
return true;
} else {
+ sWifiLoggerEventHandler = null;
return false;
}
} else {