summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/BatchedScanSettings.java10
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl2
-rw-r--r--wifi/java/android/net/wifi/ScanResult.java3
-rw-r--r--wifi/java/android/net/wifi/WifiInfo.java5
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java15
-rw-r--r--wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl28
-rw-r--r--wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java48
7 files changed, 101 insertions, 10 deletions
diff --git a/wifi/java/android/net/wifi/BatchedScanSettings.java b/wifi/java/android/net/wifi/BatchedScanSettings.java
index f7ebc17..54801ad 100644
--- a/wifi/java/android/net/wifi/BatchedScanSettings.java
+++ b/wifi/java/android/net/wifi/BatchedScanSettings.java
@@ -34,17 +34,17 @@ public class BatchedScanSettings implements Parcelable {
/** Used to indicate no preference for an int value */
public final static int UNSPECIFIED = Integer.MAX_VALUE;
- // TODO - make MIN/mAX dynamic and gservices adjustable.
+ // TODO - make MIN/mAX as standard for wifi batch capability requirement.
public final static int MIN_SCANS_PER_BATCH = 2;
- public final static int MAX_SCANS_PER_BATCH = 255;
+ public final static int MAX_SCANS_PER_BATCH = 20;
public final static int DEFAULT_SCANS_PER_BATCH = MAX_SCANS_PER_BATCH;
public final static int MIN_AP_PER_SCAN = 2;
- public final static int MAX_AP_PER_SCAN = 255;
+ public final static int MAX_AP_PER_SCAN = 16;
public final static int DEFAULT_AP_PER_SCAN = 16;
- public final static int MIN_INTERVAL_SEC = 0;
- public final static int MAX_INTERVAL_SEC = 3600;
+ public final static int MIN_INTERVAL_SEC = 10;
+ public final static int MAX_INTERVAL_SEC = 500;
public final static int DEFAULT_INTERVAL_SEC = 30;
public final static int MIN_AP_FOR_DISTANCE = 0;
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 84e933d..0535fe0 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -128,5 +128,7 @@ interface IWifiManager
boolean isBatchedScanSupported();
void pollBatchedScan();
+
+ String getWpsNfcConfigurationToken(int netId);
}
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index 12729d2..d7ecaff 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -40,8 +40,7 @@ public class ScanResult implements Parcelable {
*/
public String capabilities;
/**
- * The detected signal level in dBm. At least those are the units used by
- * the TI driver.
+ * The detected signal level in dBm.
*/
public int level;
/**
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
index 4a6821c..f44cb0a 100644
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ b/wifi/java/android/net/wifi/WifiInfo.java
@@ -157,9 +157,8 @@ public class WifiInfo implements Parcelable {
/**
* Returns the received signal strength indicator of the current 802.11
- * network.
- * <p><strong>This is not normalized, but should be!</strong></p>
- * @return the RSSI, in the range ??? to ???
+ * network, in dBm.
+ * @return the RSSI, in the range -110 to 10
*/
public int getRssi() {
return mRssi;
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 0862b7e..5af1e4e 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -930,6 +930,21 @@ public class WifiManager {
}
/**
+ * Creates a configuration token describing the network referenced by {@code netId}
+ * of MIME type application/vnd.wfa.wsc. Can be used to configure WiFi networks via NFC.
+ *
+ * @return hex-string encoded configuration token
+ * @hide
+ */
+ public String getWpsNfcConfigurationToken(int netId) {
+ try {
+ return mService.getWpsNfcConfigurationToken(netId);
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+ /**
* Return dynamic information about the current Wi-Fi connection, if any is active.
* @return the Wi-Fi information, contained in {@link WifiInfo}.
*/
diff --git a/wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl b/wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl
new file mode 100644
index 0000000..2b1601b
--- /dev/null
+++ b/wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2014, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.wifi.hotspot;
+
+/**
+ * Interface that allows controlling and querying Hotspot connectivity.
+ *
+ * {@hide}
+ */
+interface IWifiHotspotManager
+{
+ void test();
+}
+
diff --git a/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java b/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java
new file mode 100644
index 0000000..ac15017
--- /dev/null
+++ b/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.wifi.hotspot;
+
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Log;
+
+/**
+ * TODO: doc
+ */
+public class WifiHotspotManager {
+
+ private static final String TAG = "WifiHotspotManager";
+
+ private Context mContext;
+ IWifiHotspotManager mService;
+
+ public WifiHotspotManager(Context context, IWifiHotspotManager service) {
+ mContext = context;
+ mService = service;
+ }
+
+ public void test() {
+ try{
+ Log.d(TAG, "test()");
+ mService.test();
+ }
+ catch (RemoteException e) {
+ Log.e(TAG, "test() exception");
+ e.printStackTrace();
+ }
+ }
+}