Re-enable wifi proxy UI
- Add text to warn users about support - Move proxy above IP settings based on UI recommendations Bug: 3328410 Change-Id: I3b5aafd32b16adfcd2fadb572ebb2694afdeccbb
This commit is contained in:
@@ -184,6 +184,77 @@
|
||||
android:text="@string/wifi_show_password" />
|
||||
</LinearLayout> <!-- android:id="@+id/security_fields" -->
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_warning_limited_support"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- Dummy to enable right-justification of warning -->
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_warning_limited_support" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/ip_fields"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -261,60 +332,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -322,6 +322,78 @@
|
||||
android:text="@string/wifi_show_password" /> -->
|
||||
</LinearLayout> <!-- android:id="@+id/security_fields" -->
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:id="@+id/proxy_settings_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_warning_limited_support"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- Dummy to enable right-justification of warning -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_warning_limited_support" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/ip_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -400,61 +472,6 @@
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:id="@+id/proxy_settings_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -189,6 +189,67 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
style="@style/wifi_item"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:id="@+id/proxy_settings_title"
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
style="@style/wifi_item_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_warning_limited_support"
|
||||
style="@style/wifi_item"
|
||||
android:visibility="gone">
|
||||
<!-- Dummy to enable right-justification of warning -->
|
||||
<TextView
|
||||
style="@style/wifi_item_label" />
|
||||
|
||||
<TextView
|
||||
style="@style/wifi_item_content"
|
||||
android:text="@string/proxy_warning_limited_support" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
style="@style/wifi_section"
|
||||
android:visibility="gone">
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/ip_fields"
|
||||
style="@style/wifi_item"
|
||||
android:visibility="gone">
|
||||
@@ -267,54 +328,5 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_settings_fields"
|
||||
style="@style/wifi_item"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView android:id="@+id/proxy_settings_title"
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_settings_title" />
|
||||
|
||||
<Spinner android:id="@+id/proxy_settings"
|
||||
style="@style/wifi_item_content"
|
||||
android:prompt="@string/proxy_settings_title"
|
||||
android:entries="@array/wifi_proxy_settings" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/proxy_fields"
|
||||
style="@style/wifi_section"
|
||||
android:visibility="gone">
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_hostname_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_hostname"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_port_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_port"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
<LinearLayout style="@style/wifi_item">
|
||||
<TextView
|
||||
style="@style/wifi_item_label"
|
||||
android:text="@string/proxy_exclusionlist_label" />
|
||||
|
||||
<EditText android:id="@+id/proxy_exclusionlist"
|
||||
style="@style/wifi_item_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textNoSuggestions" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@@ -414,8 +414,8 @@
|
||||
<string-array name="wifi_proxy_settings">
|
||||
<!-- No HTTP proxy is used for the current wifi network [CHAR LIMIT=25] -->
|
||||
<item>None</item>
|
||||
<!-- Static HTTP proxy settings are used for the current wifi network [CHAR LIMIT=25] -->
|
||||
<item>Static</item>
|
||||
<!-- Manual HTTP proxy settings are used for the current wifi network [CHAR LIMIT=25] -->
|
||||
<item>Manual</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Sound settings for emergency tone. -->
|
||||
|
@@ -312,7 +312,7 @@
|
||||
<!-- HTTP proxy settings. Button to clear the proxy box. -->
|
||||
<string name="proxy_clear_text">Clear</string>
|
||||
<!-- HTTP proxy settings. The port number label. -->
|
||||
<string name="proxy_port_label">Port</string>
|
||||
<string name="proxy_port_label">Proxy port</string>
|
||||
<!-- HTTP proxy settings. The exclusion list label. -->
|
||||
<string name="proxy_exclusionlist_label">No Proxy for</string>
|
||||
<!-- HTTP proxy settings. The button to restore the defaults. -->
|
||||
@@ -320,7 +320,7 @@
|
||||
<!-- HTTP proxy settings. The button to save. -->
|
||||
<string name="proxy_action_text">Done</string>
|
||||
<!-- HTTP proxy settings. The text field for the hostname -->
|
||||
<string name="proxy_hostname_label">Hostname</string>
|
||||
<string name="proxy_hostname_label">Proxy hostname</string>
|
||||
<!-- HTTP proxy settings. Title if there is an error-->
|
||||
<string name="proxy_error">Attention</string>
|
||||
<!-- HTTP proxy settings. Button to get rid of error box-->
|
||||
@@ -335,6 +335,8 @@
|
||||
<string name="proxy_error_empty_host_set_port">The port field must be empty if the host field is empty.</string>
|
||||
<!-- HTTP proxy settings. Error msg -->
|
||||
<string name="proxy_error_invalid_port">The port you typed is not valid.</string>
|
||||
<!-- HTTP proxy settings. Warning message about limited application support [CHAR LIMIT=100]-->
|
||||
<string name="proxy_warning_limited_support">The HTTP proxy is used by the browser but may not be used by the other applications</string>
|
||||
|
||||
<!-- Radio Info screen. Label for a status item. Used for diagnostic info screens, precise translation isn't needed -->
|
||||
<string name="radio_info_signal_location_label">Location:</string>
|
||||
|
@@ -173,9 +173,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
mIpSettingsSpinner = (Spinner) mView.findViewById(R.id.ip_settings);
|
||||
mIpSettingsSpinner.setOnItemSelectedListener(this);
|
||||
mProxySettingsSpinner = (Spinner) mView.findViewById(R.id.proxy_settings);
|
||||
// disable proxy UI until we have better app support
|
||||
mProxySettingsSpinner.setVisibility(View.GONE);
|
||||
mView.findViewById(R.id.proxy_settings_title).setVisibility(View.GONE);
|
||||
mProxySettingsSpinner.setOnItemSelectedListener(this);
|
||||
|
||||
ViewGroup group = (ViewGroup) mView.findViewById(R.id.info);
|
||||
@@ -621,6 +618,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
}
|
||||
|
||||
if (mProxySettingsSpinner.getSelectedItemPosition() == PROXY_STATIC) {
|
||||
mView.findViewById(R.id.proxy_warning_limited_support).setVisibility(View.VISIBLE);
|
||||
mView.findViewById(R.id.proxy_fields).setVisibility(View.VISIBLE);
|
||||
if (mProxyHostView == null) {
|
||||
mProxyHostView = (TextView) mView.findViewById(R.id.proxy_hostname);
|
||||
@@ -636,6 +634,7 @@ public class WifiConfigController implements TextWatcher,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mView.findViewById(R.id.proxy_warning_limited_support).setVisibility(View.GONE);
|
||||
mView.findViewById(R.id.proxy_fields).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user