From 070f3560d5d5154e058fa83cd4d433b632304080 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Tue, 5 Nov 2013 11:54:48 -0500 Subject: [PATCH] Add PAC UI to Wi-Fi Settings Now when a PAC URL is set it shows it in settings rather than the proxy spinner set to None. This should only be visible in EDU users as only EDU has PAC. Bug: 11528608 Change-Id: Ie4bad8ea935f0a8f1bb7877eb2be146e06d71c2d --- res/layout/wifi_dialog.xml | 6 ++++++ res/values/strings.xml | 3 +++ src/com/android/settings/wifi/WifiConfigController.java | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml index cd968b13e16..7275c73038b 100644 --- a/res/layout/wifi_dialog.xml +++ b/res/layout/wifi_dialog.xml @@ -196,6 +196,12 @@ style="@style/wifi_item_content" android:prompt="@string/proxy_settings_title" android:entries="@array/wifi_proxy_settings" /> + + The HTTP proxy is used by the browser but may not be used by the other apps. + + "PAC URL: " + Location: diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java index 90aef863788..55dc0337566 100644 --- a/src/com/android/settings/wifi/WifiConfigController.java +++ b/src/com/android/settings/wifi/WifiConfigController.java @@ -239,6 +239,13 @@ public class WifiConfigController implements TextWatcher, if (config.proxySettings == ProxySettings.STATIC) { mProxySettingsSpinner.setSelection(PROXY_STATIC); showAdvancedFields = true; + } else if (config.proxySettings == ProxySettings.PAC) { + mProxySettingsSpinner.setVisibility(View.GONE); + TextView textView = (TextView)mView.findViewById(R.id.proxy_pac_info); + textView.setVisibility(View.VISIBLE); + textView.setText(context.getString(R.string.proxy_url) + + config.linkProperties.getHttpProxy().getPacFileUrl()); + showAdvancedFields = true; } else { mProxySettingsSpinner.setSelection(PROXY_NONE); }