summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-06-25 19:49:58 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-06-25 19:49:58 -0700
commit9005e7f4297a3f04263e81cb61ba2703d5667b0a (patch)
tree2bb30c671289d492ac7e1bc1ed38f6fb1c856fd8 /services
parent41debbc613ec57aa892f604229df376402942687 (diff)
parent17b232b5b59ab91ab543b87e849583678a000f9b (diff)
downloadframeworks_base-9005e7f4297a3f04263e81cb61ba2703d5667b0a.zip
frameworks_base-9005e7f4297a3f04263e81cb61ba2703d5667b0a.tar.gz
frameworks_base-9005e7f4297a3f04263e81cb61ba2703d5667b0a.tar.bz2
Merge "Add setWifiApConfiguration interface" into gingerbread
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/WifiService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 46a68ac..509c789 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -631,6 +631,7 @@ public class WifiService extends IWifiManager.Stub {
}
public WifiConfiguration getWifiApConfiguration() {
+ enforceAccessPermission();
final ContentResolver cr = mContext.getContentResolver();
WifiConfiguration wifiConfig = new WifiConfiguration();
int authType;
@@ -648,7 +649,8 @@ public class WifiService extends IWifiManager.Stub {
}
}
- private void persistApConfiguration(WifiConfiguration wifiConfig) {
+ public void setWifiApConfiguration(WifiConfiguration wifiConfig) {
+ enforceChangePermission();
final ContentResolver cr = mContext.getContentResolver();
boolean isWpa;
if (wifiConfig == null)
@@ -681,7 +683,7 @@ public class WifiService extends IWifiManager.Stub {
try {
nwService.setAccessPoint(wifiConfig, mWifiStateTracker.getInterfaceName(),
SOFTAP_IFACE);
- persistApConfiguration(wifiConfig);
+ setWifiApConfiguration(wifiConfig);
return true;
} catch(Exception e) {
Slog.e(TAG, "Exception in nwService during AP restart");
@@ -733,7 +735,7 @@ public class WifiService extends IWifiManager.Stub {
return false;
}
- persistApConfiguration(wifiConfig);
+ setWifiApConfiguration(wifiConfig);
} else {