diff options
| author | Irfan Sheriff <isheriff@google.com> | 2010-02-08 10:46:30 -0800 |
|---|---|---|
| committer | Irfan Sheriff <isheriff@google.com> | 2010-03-04 14:34:52 -0800 |
| commit | 65cff177222560f43b7da367c45ec425e86e9eec (patch) | |
| tree | 8462db17fd2b2cf5619fb7ae9f263bba98f9f8dd /res | |
| parent | e688885673cfdf407379e8a7482299d3ad68a839 (diff) | |
| download | packages_apps_Settings-65cff177222560f43b7da367c45ec425e86e9eec.zip packages_apps_Settings-65cff177222560f43b7da367c45ec425e86e9eec.tar.gz packages_apps_Settings-65cff177222560f43b7da367c45ec425e86e9eec.tar.bz2 | |
Add AP support for tethering
First phase of the AP support in
UI and framework
Bug: 2421638
Change-Id: I0b6c31be5fe79bd4d33c292464d271b054754e8d
Diffstat (limited to 'res')
| -rw-r--r-- | res/layout/wifi_ap_dialog.xml | 91 | ||||
| -rw-r--r-- | res/values/arrays.xml | 9 | ||||
| -rw-r--r-- | res/values/strings.xml | 23 | ||||
| -rw-r--r-- | res/xml/tether_prefs.xml | 45 | ||||
| -rw-r--r-- | res/xml/wifi_ap_settings.xml | 38 |
5 files changed, 198 insertions, 8 deletions
diff --git a/res/layout/wifi_ap_dialog.xml b/res/layout/wifi_ap_dialog.xml new file mode 100644 index 0000000..f9c35b1 --- /dev/null +++ b/res/layout/wifi_ap_dialog.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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:id="@+id/info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> + + <LinearLayout android:id="@+id/type" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="gone"> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/wifi_ssid" /> + + <EditText android:id="@+id/ssid" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:singleLine="true" + android:inputType="textNoSuggestions" /> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/wifi_security" /> + + <Spinner android:id="@+id/security" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:prompt="@string/wifi_security" + android:entries="@array/wifi_ap_security" /> + </LinearLayout> + + <LinearLayout android:id="@+id/fields" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:visibility="gone"> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="4dip" + android:text="@string/wifi_password" /> + + <EditText android:id="@+id/password" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:singleLine="true" + android:password="true" /> + + <CheckBox android:id="@+id/show_password" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/wifi_show_password" /> + </LinearLayout> + </LinearLayout> +</ScrollView> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 0aa604d..12eeb68 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -227,6 +227,15 @@ <item>802.1x EAP</item> </string-array> + <!-- Wi-Fi AP settings. The type of security a Wi-Fi AP supports. --> + <string-array name="wifi_ap_security" translatable="false"> + <item>Open</item> + <!-- Do not translate. --> + <item>WEP</item> + <!-- Do not translate. --> + <item>WPA/WPA2 PSK</item> + </string-array> + <!-- Match this with the constants in WifiDialog. --> <skip /> <!-- Wi-Fi settings. The type of EAP method a Wi-Fi network has. --> <string-array name="wifi_eap_method"> diff --git a/res/values/strings.xml b/res/values/strings.xml index 2c42797..ceb33f0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -846,6 +846,28 @@ <string name="wifi_gateway">Gateway</string> <!-- Label for the netmask of the network --> <string name="wifi_netmask">Netmask</string> + <!-- Alert message to indicate Wi-Fi AP will be disabled to enable station mode operation--> + <string name="wifi_ap_disable_message">Wi-fi Access Point for tethering is currently enabled. Turning Wi-fi on will disable Access Point operation.</string> + + <!-- Wifi AP settings--> + <!-- Title for Wifi AP tether settings--> + <string name="wifi_ap_title">Wi-Fi</string> + <!-- Label for checkbox. Toggles Access Point on/off --> + <string name="wifi_ap">Wi-Fi AP</string> + <!-- Summary for the AP toggle checkbox. --> + <string name="wifi_ap_summary">Set as Access Point</string> + <!-- Title of the Wi-fi settings screen and label for the settings preference--> + <string name="wifi_ap_settings">Wi-Fi AP settings</string> + <!-- Summary for the settings preference. --> + <string name="wifi_ap_settings_summary">Set up & manage Access Point</string> + <!-- Used to open the ssid and security dialog for Wifi Access Point--> + <string name="wifi_ap_ssid_and_security">SSID and Security</string> + <!-- Action message to configure Access Point ssid and security--> + <string name="wifi_ap_configure_network">Configure AP</string> + <!-- Used to open the channel selection dialog --> + <string name="wifi_ap_channel">Channel </string> + <!-- The Toast message shown to user when tethering is enabled with Wifi on--> + <string name="wifi_ap_tether_message">Enabling Wi-fi Access Point for tethering. This will reset any existing Wi-fi connection and stop Wi-fi station mode operation.</string> <!-- Do not translate. Used for diagnostic screens, precise translation is not necessary Wi-Fi Testing on the diagnostic screen--> @@ -1353,6 +1375,7 @@ <string name="tether_screen_title">Tethering settings</string> <!-- USB Tethering options --> + <string name="usb_title">USB</string> <string name="usb_tethering_button_text">USB tethering</string> <!-- USB available subtext - shown when USB is connected but not currently being tethered --> <string name="usb_tethering_available_subtext">USB connected, select to tether</string> diff --git a/res/xml/tether_prefs.xml b/res/xml/tether_prefs.xml index b903eaf..d15003c 100644 --- a/res/xml/tether_prefs.xml +++ b/res/xml/tether_prefs.xml @@ -17,14 +17,43 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/tether_screen_title"> - <PreferenceScreen - android:key="usb_tether_settings" - android:title="@string/usb_tethering_button_text" - android:widgetLayout="@*android:layout/preference_dialog" > - <intent - android:action="android.intent.action.MAIN" - android:targetPackage="android" - android:targetClass="com.android.internal.app.TetherActivity" /> + <PreferenceCategory + android:key="usb_category" + android:title="@string/usb_title"> + + <PreferenceScreen + android:key="usb_tether_settings" + android:title="@string/usb_tethering_button_text" + android:widgetLayout="@*android:layout/preference_dialog" > + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="android" + android:targetClass="com.android.internal.app.TetherActivity" /> </PreferenceScreen> + </PreferenceCategory> + + <PreferenceCategory + android:key="wifi_category" + android:title="@string/wifi_ap_title"> + + <CheckBoxPreference + android:key="enable_wifi_ap" + android:title="@string/wifi_ap" + android:summary="@string/wifi_ap_summary" + android:persistent="false" /> + + <PreferenceScreen + android:key="wifi_ap_settings" + android:dependency="enable_wifi_ap" + android:title="@string/wifi_ap_settings" + android:summary="@string/wifi_ap_settings_summary" > + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.wifi.WifiApSettings" /> + </PreferenceScreen> + + </PreferenceCategory> + </PreferenceScreen> diff --git a/res/xml/wifi_ap_settings.xml b/res/xml/wifi_ap_settings.xml new file mode 100644 index 0000000..2a403d8 --- /dev/null +++ b/res/xml/wifi_ap_settings.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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" + android:title="@string/wifi_settings_category"> + + <CheckBoxPreference + android:key="enable_wifi_ap" + android:title="@string/wifi_ap" + android:summary="@string/wifi_ap_summary" + android:persistent="false" /> + + <Preference + android:key="wifi_ap_ssid_and_security" + android:dependency="enable_wifi_ap" + android:title="@string/wifi_ap_ssid_and_security" + android:persistent="false" /> + + <ListPreference + android:key="wifi_ap_channel" + android:dependency="enable_wifi_ap" + android:title="@string/wifi_ap_channel" + android:persistent="false" /> + +</PreferenceScreen> |
