diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2013-04-11 14:16:28 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-11 14:16:28 -0700 |
commit | 63582a790e891780f391a1f8c6ee30837455421f (patch) | |
tree | 43da3ec1a454b7a889b18586c024b20b433792d2 /services/java | |
parent | c5931edb4c8d95e90ac739ec88d8fca2610a57f1 (diff) | |
parent | ccbe7e6ff16fe1afc08f0b8601d83481ba5aee3a (diff) | |
download | frameworks_base-63582a790e891780f391a1f8c6ee30837455421f.zip frameworks_base-63582a790e891780f391a1f8c6ee30837455421f.tar.gz frameworks_base-63582a790e891780f391a1f8c6ee30837455421f.tar.bz2 |
am ccbe7e6f: Merge "Use CONNECTIVITY_INTERNAL for global proxy" into jb-mr2-dev
* commit 'ccbe7e6ff16fe1afc08f0b8601d83481ba5aee3a':
Use CONNECTIVITY_INTERNAL for global proxy
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index ffc3672..9adf945 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -3045,7 +3045,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } public void setGlobalProxy(ProxyProperties proxyProperties) { - enforceChangePermission(); + enforceConnectivityInternalPermission(); synchronized (mProxyLock) { if (proxyProperties == mGlobalProxy) return; if (proxyProperties != null && proxyProperties.equals(mGlobalProxy)) return; @@ -3063,10 +3063,15 @@ public class ConnectivityService extends IConnectivityManager.Stub { mGlobalProxy = null; } ContentResolver res = mContext.getContentResolver(); - Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host); - Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port); - Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST, - exclList); + final long token = Binder.clearCallingIdentity(); + try { + Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_HOST, host); + Settings.Global.putInt(res, Settings.Global.GLOBAL_HTTP_PROXY_PORT, port); + Settings.Global.putString(res, Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST, + exclList); + } finally { + Binder.restoreCallingIdentity(token); + } } if (mGlobalProxy == null) { |