summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/DevicePolicyManagerService.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2010-11-19 10:34:17 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-19 10:34:17 -0800
commit44138f15cef6cfc84686f39227cf61062eb7817e (patch)
tree4764509ba959e1c3109463ad1be75f1cc556b463 /services/java/com/android/server/DevicePolicyManagerService.java
parent978ba938421f4e0e73d7c608d6ecbafa4368eb1d (diff)
parent434203a277cd2f237a71508a3d5a7d1602126cd5 (diff)
downloadframeworks_base-44138f15cef6cfc84686f39227cf61062eb7817e.zip
frameworks_base-44138f15cef6cfc84686f39227cf61062eb7817e.tar.gz
frameworks_base-44138f15cef6cfc84686f39227cf61062eb7817e.tar.bz2
Merge "Notify all VMs when proxy changes."
Diffstat (limited to 'services/java/com/android/server/DevicePolicyManagerService.java')
-rw-r--r--services/java/com/android/server/DevicePolicyManagerService.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 3dcad38..2b43b01 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -1757,10 +1757,19 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
// Remove white spaces
proxySpec = proxySpec.trim();
+ String data[] = proxySpec.split(":");
+ int proxyPort = 8080;
+ if (data.length > 1) {
+ try {
+ proxyPort = Integer.parseInt(data[1]);
+ } catch (NumberFormatException e) {}
+ }
exclusionList = exclusionList.trim();
ContentResolver res = mContext.getContentResolver();
- Settings.Secure.putString(res, Settings.Secure.HTTP_PROXY, proxySpec);
- Settings.Secure.putString(res, Settings.Secure.HTTP_PROXY_EXCLUSION_LIST, exclusionList);
+ Settings.Secure.putString(res, Settings.Secure.GLOBAL_HTTP_PROXY_HOST, data[0]);
+ Settings.Secure.putInt(res, Settings.Secure.GLOBAL_HTTP_PROXY_PORT, proxyPort);
+ Settings.Secure.putString(res, Settings.Secure.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
+ exclusionList);
}
@Override