diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/wifi_p2p_dialog.xml | 88 | ||||
-rw-r--r-- | res/values/arrays.xml | 22 | ||||
-rw-r--r-- | res/values/strings.xml | 17 | ||||
-rw-r--r-- | res/xml/wifi_p2p_settings.xml | 19 | ||||
-rw-r--r-- | res/xml/wireless_settings.xml | 6 |
5 files changed, 152 insertions, 0 deletions
diff --git a/res/layout/wifi_p2p_dialog.xml b/res/layout/wifi_p2p_dialog.xml new file mode 100644 index 0000000..7a86c1e --- /dev/null +++ b/res/layout/wifi_p2p_dialog.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <TextView + style="?android:attr/textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/wifi_p2p_device_info" /> + + <TextView android:id="@+id/device_name" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" /> + + <TextView android:id="@+id/device_address" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" /> + + <TextView + style="?android:attr/textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/wifi_p2p_wps_setup" /> + + <Spinner android:id="@+id/wps_setup" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:prompt="@string/wifi_p2p_wps_setup" + android:entries="@array/wifi_p2p_wps_setup" /> + + <LinearLayout android:id="@+id/wps_pin_entry" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="gone"> + + <TextView + style="@style/wifi_item_label" + android:text="@string/wifi_p2p_wps_pin" /> + + <EditText android:id="@+id/wps_pin" + style="@style/wifi_item_content" + android:singleLine="true" + android:inputType="textPassword" /> + </LinearLayout> + + + <CheckBox android:id="@+id/persist_network" + style="?android:attr/textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/wifi_p2p_persist_network" /> + + </LinearLayout> +</ScrollView> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index f2b939d..ed4ebbb 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -324,6 +324,28 @@ <item>TTLS</item> </string-array> + <!-- Wi-Fi WPS setup for p2p connections. --> + <!-- Note that adding/removing/moving the items will need wifi settings code change. --> + <string-array name="wifi_p2p_wps_setup"> + <!-- Push button based configuration involves pushing a button on two connecting devices [CHAR LIMIT=30]--> + <item>Push button</item> + <!-- This involves entering a pin obtained from a peer device [CHAR LIMIT=30] --> + <item>Pin from peer device</item> + <!-- This involves generating a pin from this device [CHAR LIMIT=20] --> + <item>Pin from this device</item> + </string-array> + + <!-- Match this with the order of WifiP2pDevice.Status --> + <!-- Wi-Fi p2p settings device status message --> + <string-array name="wifi_p2p_status"> + <item>Connected</item> + <item>Invited</item> + <item>Failed</item> + <item>Available</item> + <item>Out of range</item> + </string-array> + + <!-- Bluetooth Settings --> <!-- Discoverable mode timeout options --> diff --git a/res/values/strings.xml b/res/values/strings.xml index 72db3d0..2ecc056 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1272,6 +1272,23 @@ <!-- Hint text for network prefix length --> <string name="wifi_network_prefix_length_hint" translatable="false">24</string> + + <!-- Wi-Fi p2p / Wi-Fi Direct settings --> + <!-- Used in the 1st-level settings screen to launch Wi-fi Direct settings [CHAR LIMIT=25] --> + <string name="wifi_p2p_settings_title">Wi-Fi Direct</string> + <!-- Summary for Wi-fi Direct settings item in the 1st-level settings screen [CHAR LIMIT=50]--> + <string name="wifi_p2p_settings_summary">Setup peer-to-peer connectivity</string> + <string name="wifi_p2p_device_info">Device Information</string> + <string name="wifi_p2p_wps_setup">Wi-Fi Protected Setup</string> + <string name="wifi_p2p_wps_pin">Enter pin</string> + <string name="wifi_p2p_persist_network">Remember this connection</string> + <!-- Menu option to discover peers--> + <string name="wifi_p2p_menu_search">Search</string> + <!-- Menu option to create a group--> + <string name="wifi_p2p_menu_create_group">Create group</string> + <!-- Menu option to Wi-Fi p2p advanced settings --> + <string name="wifi_p2p_menu_advanced">Advanced</string> + <!-- Wifi AP settings--> <!-- Label for wifi tether checkbox. Toggles Access Point on/off --> <string name="wifi_tether_checkbox_text">Portable Wi-Fi hotspot</string> diff --git a/res/xml/wifi_p2p_settings.xml b/res/xml/wifi_p2p_settings.xml new file mode 100644 index 0000000..2b19ee9 --- /dev/null +++ b/res/xml/wifi_p2p_settings.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 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. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> + +</PreferenceScreen> diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml index c0e4a5a..1f72a93 100644 --- a/res/xml/wireless_settings.xml +++ b/res/xml/wireless_settings.xml @@ -45,6 +45,12 @@ android:summary="@string/zeroclick_settings_summary" > </PreferenceScreen> + <PreferenceScreen + android:fragment="com.android.settings.WifiP2pSettings" + android:key="wifi_p2p_settings" + android:title="@string/wifi_p2p_settings_title" + android:summary="@string/wifi_p2p_settings_summary"> + </PreferenceScreen> <PreferenceScreen android:key="mobile_network_settings" |