Add UI for WPS
The WPS available option is shown
for networks in scan results. Upon
selecting a network, the user has
the option of manually entering passwords
or choosing WPS for connection
Bug: 2277571
Change-Id: Ia12eb1742f1bf17128d51fa09e56dc4c3f067fa5
diff --git a/res/layout/wifi_config_preference.xml b/res/layout/wifi_config_preference.xml
index b7f183f..095b94f 100644
--- a/res/layout/wifi_config_preference.xml
+++ b/res/layout/wifi_config_preference.xml
@@ -23,6 +23,47 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
+
+ <LinearLayout android:id="@+id/setup_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/wifi_network_setup" />
+
+ <Spinner android:id="@+id/network_setup"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:prompt="@string/wifi_network_setup"
+ android:entries="@array/wifi_network_setup" />
+
+ </LinearLayout>
+
+ <LinearLayout android:id="@+id/wps_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/wifi_wps_pin" />
+
+ <EditText android:id="@+id/wps_pin"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:inputType="textPassword" />
+
+ </LinearLayout>
+
+
+
<LinearLayout android:id="@+id/type"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
@@ -50,7 +91,7 @@
android:entries="@array/wifi_security" />
</LinearLayout> <!-- android:id="@+id/type" -->
- <LinearLayout android:id="@+id/fields"
+ <LinearLayout android:id="@+id/security_fields"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -141,9 +182,9 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_show_password" />
- </LinearLayout> <!-- android:id="@+id/fields" -->
+ </LinearLayout> <!-- android:id="@+id/security_fields" -->
- <LinearLayout android:id="@+id/ipfields"
+ <LinearLayout android:id="@+id/ip_fields"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -154,7 +195,7 @@
android:layout_height="wrap_content"
android:text="@string/wifi_ip_settings" />
- <Spinner android:id="@+id/ipsettings"
+ <Spinner android:id="@+id/ip_settings"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_ip_settings"