diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-02-27 16:20:29 -0800 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-03-02 14:25:00 -0800 |
commit | 90380120e72a9bebd2fd198372c423afc9b0eeec (patch) | |
tree | 744859adbc4ec5632afd442b3087ea19c2e60330 /res | |
parent | 6c9c305b28a33a7272ded543650223638ea5836d (diff) | |
download | packages_apps_settings-90380120e72a9bebd2fd198372c423afc9b0eeec.zip packages_apps_settings-90380120e72a9bebd2fd198372c423afc9b0eeec.tar.gz packages_apps_settings-90380120e72a9bebd2fd198372c423afc9b0eeec.tar.bz2 |
Enhance and fix WPS UI
- Fixes WPS usage for open network
- Exposes WPS on UI for easy access to push button and pin based techniques
- Adds support for cancelling WPS
- Adds a dialog that reports a progress since WPS can take quite a bit of time
to complete
The WpsDialog code is enhanced from contribution by yoshihiko.ikenaga@jp.sony.com
on partner source.
Change-Id: Ib0103507e0192e8195e7bfeb1c8e8855c20e23ca
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/wifi_dialog.xml | 29 | ||||
-rw-r--r-- | res/layout/wifi_wps_dialog.xml | 59 | ||||
-rw-r--r-- | res/values/arrays.xml | 13 | ||||
-rw-r--r-- | res/values/strings.xml | 46 |
4 files changed, 88 insertions, 59 deletions
diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml index f06c332..0e6d63a 100644 --- a/res/layout/wifi_dialog.xml +++ b/res/layout/wifi_dialog.xml @@ -179,35 +179,6 @@ android:layout_height="wrap_content" android:orientation="vertical" android:visibility="gone"> - <LinearLayout android:id="@+id/setup_fields" - style="@style/wifi_item" - android:visibility="gone"> - - <TextView - style="@style/wifi_item_label" - android:text="@string/wifi_network_setup" /> - - <Spinner android:id="@+id/network_setup" - style="@style/wifi_item_content" - android:prompt="@string/wifi_network_setup" - android:entries="@array/wifi_network_setup" /> - - </LinearLayout> - - <LinearLayout android:id="@+id/wps_fields" - style="@style/wifi_item" - android:visibility="gone"> - - <TextView - style="@style/wifi_item_label" - android:text="@string/wifi_wps_pin" /> - - <EditText android:id="@+id/wps_pin" - style="@style/wifi_item_content" - android:singleLine="true" - android:inputType="textPassword" /> - - </LinearLayout> <LinearLayout android:id="@+id/proxy_settings_fields" style="@style/wifi_item" diff --git a/res/layout/wifi_wps_dialog.xml b/res/layout/wifi_wps_dialog.xml new file mode 100644 index 0000000..3594436 --- /dev/null +++ b/res/layout/wifi_wps_dialog.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="300sp" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="8dip" + android:orientation="vertical"> + + <TextView + android:id="@+id/wps_dialog_txt" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" /> + + <ProgressBar + android:id="@+id/wps_timeout_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + style="?android:attr/progressBarStyleHorizontal" /> + + <ProgressBar + android:id="@+id/wps_progress_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + style="?android:attr/progressBarStyle" /> + + <RelativeLayout + android:gravity="center" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <Button + android:id="@+id/wps_dialog_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/cancel" /> + </RelativeLayout> + </LinearLayout> +</ScrollView> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index e89c00c..c9bbd04 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -438,19 +438,6 @@ <item>GTC</item> </string-array> - <!-- Wi-Fi set up options --> - <!-- Note that adding/removing/moving items will need wifi settings code change. --> - <string-array name="wifi_network_setup"> - <!-- Manual wifi configuration [CHAR LIMIT=25]--> - <item>Off</item> - <!-- WPS is a new standard that allowes secure connection establishment to a home wireless network using a simplified process. WPS push button based configuration involves pushing a button on the router and the device [CHAR LIMIT=25]--> - <item>Push button</item> - <!-- WPS pin method based configuration. This requires entering a pin obtained from the access point [CHAR LIMIT=25] --> - <item>PIN from access point</item> - <!-- WPS pin method based configuration. This requires generating a pin from this device [CHAR LIMIT=25] --> - <item>PIN from this device</item> - </string-array> - <!-- Wi-Fi IP settings. --> <!-- Note that adding/removing/moving the items will need wifi settings code change. --> <string-array name="wifi_ip_settings"> diff --git a/res/values/strings.xml b/res/values/strings.xml index b65339f..544ecf8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1191,6 +1191,10 @@ <string name="wifi_add_network">Add network</string> <!-- Header for the list of wifi networks--> <string name="wifi_access_points">Wi-Fi networks</string> + <!-- Menu option to do WPS Push Button [CHAR LIMIT=20]--> + <string name="wifi_menu_wps_pbc">WPS Push Button</string> + <!-- Menu option to do WPS Pin Entry [CHAR LIMIT=20]--> + <string name="wifi_menu_wps_pin">WPS Pin Entry</string> <!-- Menu option to scan Wi-Fi networks --> <string name="wifi_menu_scan">Scan</string> <!-- Menu option to Wi-Fi advanced settings --> @@ -1207,18 +1211,30 @@ <!-- Dialog for Access Points --> <skip /> <!-- Label to show/hide advanced options --> <string name="wifi_show_advanced">Show advanced options</string> - <!-- Label for network setup [CHAR LIMIT=50] --> - <string name="wifi_network_setup">WPS</string> - <!-- Label for the text view for WPS pin input [CHAR LIMIT=50] --> - <string name="wifi_wps_pin">Type PIN from access point</string> <!-- Title for the WPS setup dialog [CHAR LIMIT=50] --> - <string name="wifi_wps_setup_title">WPS setup</string> - <!-- Text displayed in the WPS pin display dialog [CHAR LIMIT=75] --> - <string name="wifi_wps_pin_output">Type the PIN <xliff:g id="wps_pin">%1$s</xliff:g> on the access point</string> - <!-- Text displayed when WPS setup is in progress [CHAR LIMIT=75] --> - <string name="wifi_wps_in_progress">WPS is already in progress and can take tens of seconds to complete</string> - <!-- Text displayed when WPS fails to start [CHAR LIMIT=75] --> - <string name="wifi_wps_failed">Couldn\'t start WPS. Try again.</string> + <string name="wifi_wps_setup_title">Wi-Fi Protected Setup</string> + <!-- Message in WPS dialog at start up [CHAR LIMIT=150] --> + <string name="wifi_wps_setup_msg">Starting WPS\u2026</string> + <!-- Message in WPS dialog for PBC after start up [CHAR LIMIT=150] --> + <string name="wifi_wps_onstart_pbc">Push the WPS button on your Wi-Fi router. The setup can take upto two minutes to complete.</string> + <!-- Message in WPS dialog for PIN after start up [CHAR LIMIT=150] --> + <string name="wifi_wps_onstart_pin">Enter pin <xliff:g id="pin">%1$s</xliff:g> on your Wi-Fi router. The setup can take upto two minutes to complete.</string> + <!-- Text displayed when WPS succeeds [CHAR LIMIT=150] --> + <string name="wifi_wps_complete">WPS succeeded. Connecting to the network\u2026</string> + <!-- Text displayed when Wi-Fi is connected through WPS [CHAR LIMIT=150] --> + <string name="wifi_wps_connected">Connected to Wi-Fi network <xliff:g id="network_name">%s</xliff:g></string> + <!-- Text displayed when WPS setup is in progress [CHAR LIMIT=150] --> + <string name="wifi_wps_in_progress">WPS is already in progress and can take upto two minutes to complete</string> + <!-- Text displayed when WPS fails to start [CHAR LIMIT=150] --> + <string name="wifi_wps_failed_generic">WPS failed. Please try again in a few minutes.</string> + <!-- Text displayed when WPS fails due to WEP [CHAR LIMIT=150] --> + <string name="wifi_wps_failed_wep">The wireless router security setting (WEP) is not supported</string> + <!-- Text displayed when WPS fails to TKIP [CHAR LIMIT=150] --> + <string name="wifi_wps_failed_tkip">The wireless router security setting (TKIP) is not supported</string> + <!-- Text displayed when WPS fails due to authentication issues [CHAR LIMIT=150] --> + <string name="wifi_wps_failed_auth">Authentication failure. Please try again.</string> + <!-- Text displayed when WPS fails due to another session [CHAR LIMIT=150] --> + <string name="wifi_wps_failed_overlap">Another WPS session was detected. Please try again in a few minutes.</string> <!-- Label for the SSID of the network --> <string name="wifi_ssid">Network SSID</string> <!-- Label for the security of the connection --> @@ -1271,8 +1287,8 @@ <!-- Summary for the remembered network but currently not in range. --> <string name="wifi_not_in_range">Not in range</string> <!-- Substring of status line when Wi-Fi Protected Setup (WPS) is available and - string is listed first --> - <string name="wifi_wps_available_first_item">Protected network available</string> + string is listed first [CHAR LIMIT=20]--> + <string name="wifi_wps_available_first_item">WPS available</string> <!-- Substring of wifi status when Wi-Fi Protected Setup (WPS) is available and string is listed after a wifi_secured_* string--> <string name="wifi_wps_available_second_item">\u0020(protected network available)</string> @@ -1328,10 +1344,6 @@ <!-- Button label to dismiss the dialog --> <string name="wifi_cancel">Cancel</string> - <!-- Errors reported on wifi settings page --> - <!-- Toast message indicating WPS overlap detection [CHAR LIMIT=75] --> - <string name="wifi_wps_overlap_error">Another Wi-Fi protected session was detected. Try again in a few minutes.</string> - <!-- Wi-Fi Advanced Settings --> <skip /> <!-- Wi-Fi settings screen, advanced, settings section. This is a header shown above advanced wifi settings. --> <string name="wifi_advanced_titlebar">Advanced Wi-Fi</string> |