summaryrefslogtreecommitdiffstats
path: root/wifi/java/android
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-03-10 16:53:33 -0800
committerIrfan Sheriff <isheriff@google.com>2011-03-10 16:57:10 -0800
commit4aeca7c5908387bc7efb0785830aea1053264062 (patch)
tree1f8a718c28c4fd65c506fbe3968d2ceda36db140 /wifi/java/android
parentb22bb1dae1213fe9383020a53eeb89de40e7bbd0 (diff)
downloadframeworks_base-4aeca7c5908387bc7efb0785830aea1053264062.zip
frameworks_base-4aeca7c5908387bc7efb0785830aea1053264062.tar.gz
frameworks_base-4aeca7c5908387bc7efb0785830aea1053264062.tar.bz2
Backup and restore IP and proxy settings
Bug: 4081954 Change-Id: I27266637c6ade0c5c8242792176d1edae0983446
Diffstat (limited to 'wifi/java/android')
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl2
-rw-r--r--wifi/java/android/net/wifi/WifiConfigStore.java4
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java12
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java7
4 files changed, 25 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 1d115b1..16a61db 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -104,5 +104,7 @@ interface IWifiManager
void clearBlacklist();
Messenger getMessenger();
+
+ String getConfigFile();
}
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java
index e6decc8..6455d84 100644
--- a/wifi/java/android/net/wifi/WifiConfigStore.java
+++ b/wifi/java/android/net/wifi/WifiConfigStore.java
@@ -1347,4 +1347,8 @@ class WifiConfigStore {
}
return sb.toString();
}
+
+ public static String getConfigFile() {
+ return ipConfigFile;
+ }
}
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 5238899..2e49a77 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1176,6 +1176,18 @@ public class WifiManager {
}
/**
+ * Returns the file in which IP and proxy configuration data is stored
+ * @hide
+ */
+ public String getConfigFile() {
+ try {
+ return mService.getConfigFile();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+ /**
* Allows an application to keep the Wi-Fi radio awake.
* Normally the Wi-Fi radio may turn off when the user has not used the device in a while.
* Acquiring a WifiLock will keep the radio on until the lock is released. Multiple
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 717dcf0..4346b327 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -887,6 +887,13 @@ public class WifiStateMachine extends HierarchicalStateMachine {
}
/**
+ * Returns the wifi configuration file
+ */
+ public String getConfigFile() {
+ return WifiConfigStore.getConfigFile();
+ }
+
+ /**
* Send a message indicating bluetooth adapter connection state changed
*/
public void sendBluetoothAdapterStateChange(int state) {