summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorxinhe <xinhe@google.com>2015-07-09 16:26:28 -0700
committerxinhe <xinhe@google.com>2015-07-15 10:40:55 -0700
commite8de06d2feb6680df15c1473fb72efb214ced744 (patch)
tree389e454217cde4b54d83003431423e65626d6eaa /wifi
parentd4c1861a536d022b00505c75c30529c50688f26a (diff)
downloadframeworks_base-e8de06d2feb6680df15c1473fb72efb214ced744.zip
frameworks_base-e8de06d2feb6680df15c1473fb72efb214ced744.tar.gz
frameworks_base-e8de06d2feb6680df15c1473fb72efb214ced744.tar.bz2
Add API to turn OFF "best network selection" feature
b/14990268 Change-Id: I0231a9f0fae2baee50138e1cfa5416612ff41d6d
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl9
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java55
2 files changed, 19 insertions, 45 deletions
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index b2af044..0d95b38 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -158,15 +158,12 @@ interface IWifiManager
void setAllowScansWithTraffic(int enabled);
int getAllowScansWithTraffic();
- void setAllowScansWhileAssociated(int enabled);
- int getAllowScansWhileAssociated();
-
- void setAllowNetworkSwitchingWhileAssociated(int enabled);
- int getAllowNetworkSwitchingWhileAssociated();
-
void setHalBasedAutojoinOffload(int enabled);
int getHalBasedAutojoinOffload();
+ boolean enableAutoJoinWhenAssociated(boolean enabled);
+ boolean getEnableAutoJoinWhenAssociated();
+
WifiConnectionStatistics getConnectionStatistics();
void disableEphemeralNetwork(String SSID);
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index f91e0e2..f390075 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -2807,30 +2807,6 @@ public class WifiManager {
}
/**
- * Set setting for allowing Scans when infrastructure is associated
- * @hide
- */
- public void setAllowScansWhileAssociated(int enabled) {
- try {
- mService.setAllowScansWhileAssociated(enabled);
- } catch (RemoteException e) {
-
- }
- }
-
- /**
- * Get setting for allowing Scans when infrastructure is associated
- * @hide
- */
- public int getAllowScansWhileAssociated() {
- try {
- return mService.getAllowScansWhileAssociated();
- } catch (RemoteException e) {
- }
- return 0;
- }
-
- /**
* Resets all wifi manager settings back to factory defaults.
*
* @hide
@@ -2856,48 +2832,49 @@ public class WifiManager {
}
/**
- * Set setting for enabling autojoin Offload thru Wifi HAL layer
+ * Framework layer autojoin enable/disable when device is associated
+ * this will enable/disable autojoin scan and switch network when connected
+ * @return true -- if set successful false -- if set failed
* @hide
*/
- public void setHalBasedAutojoinOffload(int enabled) {
+ public boolean enableAutoJoinWhenAssociated(boolean enabled) {
try {
- mService.setHalBasedAutojoinOffload(enabled);
+ return mService.enableAutoJoinWhenAssociated(enabled);
} catch (RemoteException e) {
-
+ return false;
}
}
/**
- * Get setting for enabling autojoin Offload thru Wifi HAL layer
+ * Get setting for Framework layer autojoin enable status
* @hide
*/
- public int getHalBasedAutojoinOffload() {
+ public boolean getEnableAutoJoinWhenAssociated() {
try {
- return mService.getHalBasedAutojoinOffload();
+ return mService.getEnableAutoJoinWhenAssociated();
} catch (RemoteException e) {
+ return false;
}
- return 0;
}
-
/**
- * Set setting for enabling network switching while wifi is associated
+ * Set setting for enabling autojoin Offload thru Wifi HAL layer
* @hide
*/
- public void setAllowNetworkSwitchingWhileAssociated(int enabled) {
+ public void setHalBasedAutojoinOffload(int enabled) {
try {
- mService.setAllowNetworkSwitchingWhileAssociated(enabled);
+ mService.setHalBasedAutojoinOffload(enabled);
} catch (RemoteException e) {
}
}
/**
- * Get setting for enabling network switching while wifi is associated
+ * Get setting for enabling autojoin Offload thru Wifi HAL layer
* @hide
*/
- public int getAllowNetworkSwitchingWhileAssociated() {
+ public int getHalBasedAutojoinOffload() {
try {
- return mService.getAllowNetworkSwitchingWhileAssociated();
+ return mService.getHalBasedAutojoinOffload();
} catch (RemoteException e) {
}
return 0;