diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | de2d9f5f109265873196f1615e1f3546b114aaa7 (patch) | |
tree | cd79c0fdeba9e5564571422a549b9a84e4ac43bb | |
download | packages_apps_settings-de2d9f5f109265873196f1615e1f3546b114aaa7.zip packages_apps_settings-de2d9f5f109265873196f1615e1f3546b114aaa7.tar.gz packages_apps_settings-de2d9f5f109265873196f1615e1f3546b114aaa7.tar.bz2 |
Initial Contribution
215 files changed, 26261 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..dedda01 --- /dev/null +++ b/Android.mk @@ -0,0 +1,14 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := user + +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := Settings +LOCAL_CERTIFICATE := platform + +include $(BUILD_PACKAGE) + +# Use the folloing include to make our test apk. +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..7dece18 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,429 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.settings" + android:sharedUserId="android.uid.system"> + + <uses-permission android:name="com.google.android.providers.gmail.permission.WRITE_GMAIL" /> + <uses-permission android:name="com.google.android.providers.gmail.permission.READ_GMAIL" /> + <uses-permission android:name="android.permission.WRITE_SETTINGS" /> + <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" /> + <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> + <uses-permission android:name="android.permission.HARDWARE_TEST" /> + <uses-permission android:name="android.permission.CALL_PHONE" /> + <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> + <uses-permission android:name="android.permission.MASTER_CLEAR" /> + <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" /> + <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER" /> + <uses-permission android:name="android.permission.READ_CONTACTS" /> + <uses-permission android:name="android.permission.WRITE_CONTACTS" /> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> + <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" /> + <uses-permission android:name="android.permission.READ_PHONE_STATE" /> + <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> + <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> + <uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/> + <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES"/> + + <application android:label="@string/settings_label" android:icon="@drawable/ic_launcher_settings"> + + <!-- Settings --> + + <activity android:name="Settings" android:label="@string/settings_label" + android:theme="@android:style/Theme.NoTitleBar" + android:clearTaskOnLaunch="true" + android:launchMode="singleTop"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + <!-- Wireless Controls --> + + <activity android:name="WirelessSettings" + android:label="@string/radio_controls_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.WIRELESS_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + + <!-- Top-level settings --> + + <activity android:name=".wifi.WifiSettings" android:label="@string/wifi_settings" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.WIFI_SETTINGS" /> + <action android:name="android.net.wifi.PICK_WIFI_NETWORK" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name=".wifi.IpSettings" android:label="@string/wifi_ip_settings_titlebar" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name="ApnSettings" android:label="@string/apn_settings" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.APN_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="BluetoothSettings" + android:label="@string/bluetooth_settings_title" + android:configChanges="keyboardHidden|orientation" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.BLUETOOTH_SETTINGS" /> + </intent-filter> + </activity> + + <activity android:name="DateTimeSettings" android:label="@string/date_and_time" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.DATE_SETTINGS" /> + </intent-filter> + </activity> + + <activity android:name="DateTimeSettingsSetupWizard" android:label="@string/date_and_time"> + android:screenOrientation="portrait" + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name="LocalePicker" android:label="@string/language_picker_title"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.LOCALE_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="LocalePickerInSetupWizard" android:label="@string/language_picker_title"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name="LanguageSettings" android:label="@string/language_picker_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="SoundAndDisplaySettings" android:label="@string/sound_and_display_settings" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="com.android.settings.SOUND_SETTINGS" /> + <action android:name="com.android.settings.DISPLAY_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="DeviceInfoSettings" android:label="@string/device_info_settings" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="SettingsLicenseActivity" + android:label="@string/settings_license_activity_title" + android:theme="@*android:style/Theme.Dialog.Alert"> + <intent-filter> + <action android:name="android.settings.LICENSE" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ApplicationSettings" android:label="@string/applications_settings_header" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.APPLICATION_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ManageApplications" android:label="@string/manageapplications_settings_title"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.intent.action.MANAGE_PACKAGE_STORAGE" /> + <category android:name="android.intent.category.DEFAULT" /> + <category android:name="android.intent.category.MONKEY" /> + </intent-filter> + </activity> + + <activity android:name="InstalledAppDetails" android:label="@string/application_info_label"> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="SecuritySettings" android:label="@string/lockpattern_settings_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <action android:name="android.settings.SECURITY_SETTINGS" /> + <action android:name="android.settings.LOCATION_SOURCE_SETTINGS" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="SimLockSettings" android:label="@string/sim_lock_settings" + android:process="com.android.phone" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + + + + <!-- Second and third-level settings --> + + <activity android:name="ConfirmLockPattern"/> + + <activity android:name="ChooseLockPattern" android:label="@string/lockpattern_change_lock_pattern_label"> + <intent-filter> + <action android:name="android.intent.action.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ChooseLockPatternTutorial" + android:label="@string/lockpattern_change_lock_pattern_label" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ChooseLockPatternExample" + android:label="@string/lockpattern_change_lock_pattern_label" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ZoneList" android:label="@string/choose_timezone" /> + + <activity android:name=".deviceinfo.Status" android:label="@string/device_status" + android:process="com.android.phone" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name=".deviceinfo.Memory" android:label="@string/storage_settings_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="ApnEditor" android:label="@string/apn_edit"> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <action android:name="android.intent.action.EDIT" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:mimeType="vnd.android.cursor.item/telephony-carrier" /> + </intent-filter> + + <intent-filter> + <action android:name="android.intent.action.INSERT" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:mimeType="vnd.android.cursor.dir/telephony-carrier" /> + </intent-filter> + </activity> + + <activity android:name="MasterClear" android:label="@string/master_clear_title"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name=".quicklaunch.QuickLaunchSettings" android:label="@string/quick_launch_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name=".quicklaunch.BookmarkPicker" android:label="@string/quick_launch_title"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name="DevelopmentSettings" android:icon="@drawable/app_settings" + android:label="@string/development_settings_title" + android:theme="@android:style/Theme.NoTitleBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + + + + <!-- System-triggered settings --> + + <receiver android:name="SdCardErrorReceiver"> + <intent-filter> + <action android:name="android.intent.action.MEDIA_BAD_REMOVAL" /> + <data android:scheme="file" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.MEDIA_UNMOUNTABLE" /> + <data android:scheme="file" /> + </intent-filter> + </receiver> + + <activity android:name="BluetoothPINEntry" + android:label="@string/bluetooth_pin_entry" + android:theme="@android:style/Theme.Dialog"> + <!--intent-filter> + <action android:name="android.bluetooth.intent.action.PAIRING_REQUEST" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter--> + </activity> + + <!-- Ignore Bluetooth Pairing Requests when not in BluetoothSettings + <receiver android:name="BluetoothPinRequest"> + <intent-filter> + <action android:name="android.bluetooth.intent.action.PAIRING_REQUEST" /> + </intent-filter> + </receiver> + --> + + <activity android:name="ActivityPicker" android:label="@string/activity_picker_label"> + <intent-filter> + <action android:name="android.intent.action.PICK_ACTIVITY" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + + + + + <!-- Development settings --> + + <activity android:name="DebugIntentSender" android:label="@string/debug_intent_sender_label"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <activity android:name="DeviceInfo" android:label="@string/device_info_label"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <!-- DeviceInfo adds the user's requested build to stats upload. --> + <receiver android:name=".DeviceInfo$StatsReportReceiver"> + <intent-filter> + <action android:name="android.intent.action.STATISTICS_REPORT" /> + </intent-filter> + </receiver> + + <activity android:name="BatteryInfo" android:label="@string/battery_info_label"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <activity android:name="Display" android:label="@string/display_label" + android:configChanges="fontScale"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <activity android:name="RadioInfo" android:label="@string/phone_info_label" + android:process="com.android.phone"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <activity android:name="SdCardSettings" android:label="@string/sd_card_settings_label"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <activity android:name="ProxySelector" android:label="@string/proxy_settings_label" + android:theme="@android:style/Theme.Dialog"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEVELOPMENT_PREFERENCE" /> + </intent-filter> + </activity> + + <!-- TODO: Is this needed? --> + <activity android:name="BandMode" + android:theme="@android:style/Theme.Dialog" + android:process="com.android.phone"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="TestingSettings" android:label="@string/testing" + android:theme="@android:style/Theme.NoTitleBar">> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <receiver android:name="TestingSettingsBroadcastReceiver"> + <intent-filter> + <action android:name="android.provider.Telephony.SECRET_CODE" /> + <data android:scheme="android_secret_code" android:host="4636" /> + </intent-filter> + </receiver> + + + </application> + +</manifest> + diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_APACHE2 @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2008, 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. + + 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. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/res/drawable/app_settings.png b/res/drawable/app_settings.png Binary files differnew file mode 100644 index 0000000..ed23bbf --- /dev/null +++ b/res/drawable/app_settings.png diff --git a/res/drawable/backpanel_bottom_white_pad.9.png b/res/drawable/backpanel_bottom_white_pad.9.png Binary files differnew file mode 100644 index 0000000..88b33f4 --- /dev/null +++ b/res/drawable/backpanel_bottom_white_pad.9.png diff --git a/res/drawable/dotted_line_480px.png b/res/drawable/dotted_line_480px.png Binary files differnew file mode 100755 index 0000000..a52ca43 --- /dev/null +++ b/res/drawable/dotted_line_480px.png diff --git a/res/drawable/ic_bluetooth_connected.png b/res/drawable/ic_bluetooth_connected.png Binary files differnew file mode 100644 index 0000000..0db03e1 --- /dev/null +++ b/res/drawable/ic_bluetooth_connected.png diff --git a/res/drawable/ic_bluetooth_discovered.png b/res/drawable/ic_bluetooth_discovered.png Binary files differnew file mode 100644 index 0000000..f24addc --- /dev/null +++ b/res/drawable/ic_bluetooth_discovered.png diff --git a/res/drawable/ic_bluetooth_paired.png b/res/drawable/ic_bluetooth_paired.png Binary files differnew file mode 100644 index 0000000..7b5911b --- /dev/null +++ b/res/drawable/ic_bluetooth_paired.png diff --git a/res/drawable/ic_bluetooth_paired_not_nearby.png b/res/drawable/ic_bluetooth_paired_not_nearby.png Binary files differnew file mode 100644 index 0000000..8fb916a --- /dev/null +++ b/res/drawable/ic_bluetooth_paired_not_nearby.png diff --git a/res/drawable/ic_btn_finish.png b/res/drawable/ic_btn_finish.png Binary files differnew file mode 100644 index 0000000..18a4d23 --- /dev/null +++ b/res/drawable/ic_btn_finish.png diff --git a/res/drawable/ic_btn_next.png b/res/drawable/ic_btn_next.png Binary files differnew file mode 100644 index 0000000..c6cf436 --- /dev/null +++ b/res/drawable/ic_btn_next.png diff --git a/res/drawable/ic_dialog_alert.png b/res/drawable/ic_dialog_alert.png Binary files differnew file mode 100644 index 0000000..0a7de04 --- /dev/null +++ b/res/drawable/ic_dialog_alert.png diff --git a/res/drawable/ic_launcher_settings.png b/res/drawable/ic_launcher_settings.png Binary files differnew file mode 100755 index 0000000..16db056 --- /dev/null +++ b/res/drawable/ic_launcher_settings.png diff --git a/res/drawable/ic_menu_3d_globe.png b/res/drawable/ic_menu_3d_globe.png Binary files differnew file mode 100644 index 0000000..638e7fd --- /dev/null +++ b/res/drawable/ic_menu_3d_globe.png diff --git a/res/drawable/ic_menu_archive.png b/res/drawable/ic_menu_archive.png Binary files differnew file mode 100644 index 0000000..a4599e3 --- /dev/null +++ b/res/drawable/ic_menu_archive.png diff --git a/res/drawable/ic_menu_goto.png b/res/drawable/ic_menu_goto.png Binary files differnew file mode 100644 index 0000000..40183eb --- /dev/null +++ b/res/drawable/ic_menu_goto.png diff --git a/res/drawable/ic_menu_manage.png b/res/drawable/ic_menu_manage.png Binary files differnew file mode 100644 index 0000000..f155bbc --- /dev/null +++ b/res/drawable/ic_menu_manage.png diff --git a/res/drawable/ic_menu_refresh.png b/res/drawable/ic_menu_refresh.png Binary files differnew file mode 100644 index 0000000..77d70dd --- /dev/null +++ b/res/drawable/ic_menu_refresh.png diff --git a/res/drawable/ic_menu_scan_bluetooth.png b/res/drawable/ic_menu_scan_bluetooth.png Binary files differnew file mode 100644 index 0000000..c1184ad --- /dev/null +++ b/res/drawable/ic_menu_scan_bluetooth.png diff --git a/res/drawable/ic_menu_scan_network.png b/res/drawable/ic_menu_scan_network.png Binary files differnew file mode 100644 index 0000000..eed82a2 --- /dev/null +++ b/res/drawable/ic_menu_scan_network.png diff --git a/res/drawable/ic_menu_sort_alphabetically.png b/res/drawable/ic_menu_sort_alphabetically.png Binary files differnew file mode 100644 index 0000000..2583eb8 --- /dev/null +++ b/res/drawable/ic_menu_sort_alphabetically.png diff --git a/res/drawable/ic_network_signal_0.png b/res/drawable/ic_network_signal_0.png Binary files differnew file mode 100755 index 0000000..150e345 --- /dev/null +++ b/res/drawable/ic_network_signal_0.png diff --git a/res/drawable/ic_network_signal_1.png b/res/drawable/ic_network_signal_1.png Binary files differnew file mode 100755 index 0000000..bc99c0f --- /dev/null +++ b/res/drawable/ic_network_signal_1.png diff --git a/res/drawable/ic_network_signal_2.png b/res/drawable/ic_network_signal_2.png Binary files differnew file mode 100755 index 0000000..9d5d611 --- /dev/null +++ b/res/drawable/ic_network_signal_2.png diff --git a/res/drawable/ic_network_signal_3.png b/res/drawable/ic_network_signal_3.png Binary files differnew file mode 100755 index 0000000..259ba2d --- /dev/null +++ b/res/drawable/ic_network_signal_3.png diff --git a/res/drawable/ic_network_signal_4.png b/res/drawable/ic_network_signal_4.png Binary files differnew file mode 100755 index 0000000..605b144 --- /dev/null +++ b/res/drawable/ic_network_signal_4.png diff --git a/res/drawable/ic_popup_brightness.png b/res/drawable/ic_popup_brightness.png Binary files differnew file mode 100755 index 0000000..e9172a6 --- /dev/null +++ b/res/drawable/ic_popup_brightness.png diff --git a/res/drawable/ic_wifi_lock_signal_0.png b/res/drawable/ic_wifi_lock_signal_0.png Binary files differnew file mode 100755 index 0000000..19ca926 --- /dev/null +++ b/res/drawable/ic_wifi_lock_signal_0.png diff --git a/res/drawable/ic_wifi_lock_signal_1.png b/res/drawable/ic_wifi_lock_signal_1.png Binary files differnew file mode 100755 index 0000000..af78e05 --- /dev/null +++ b/res/drawable/ic_wifi_lock_signal_1.png diff --git a/res/drawable/ic_wifi_lock_signal_2.png b/res/drawable/ic_wifi_lock_signal_2.png Binary files differnew file mode 100755 index 0000000..b5b373e --- /dev/null +++ b/res/drawable/ic_wifi_lock_signal_2.png diff --git a/res/drawable/ic_wifi_lock_signal_3.png b/res/drawable/ic_wifi_lock_signal_3.png Binary files differnew file mode 100755 index 0000000..49ac417 --- /dev/null +++ b/res/drawable/ic_wifi_lock_signal_3.png diff --git a/res/drawable/ic_wifi_lock_signal_4.png b/res/drawable/ic_wifi_lock_signal_4.png Binary files differnew file mode 100644 index 0000000..cd86ca0 --- /dev/null +++ b/res/drawable/ic_wifi_lock_signal_4.png diff --git a/res/drawable/ic_wifi_signal_0.png b/res/drawable/ic_wifi_signal_0.png Binary files differnew file mode 100755 index 0000000..4063b7b --- /dev/null +++ b/res/drawable/ic_wifi_signal_0.png diff --git a/res/drawable/ic_wifi_signal_1.png b/res/drawable/ic_wifi_signal_1.png Binary files differnew file mode 100755 index 0000000..7a524e3 --- /dev/null +++ b/res/drawable/ic_wifi_signal_1.png diff --git a/res/drawable/ic_wifi_signal_2.png b/res/drawable/ic_wifi_signal_2.png Binary files differnew file mode 100755 index 0000000..efe4b5f --- /dev/null +++ b/res/drawable/ic_wifi_signal_2.png diff --git a/res/drawable/ic_wifi_signal_3.png b/res/drawable/ic_wifi_signal_3.png Binary files differnew file mode 100755 index 0000000..a720bb0 --- /dev/null +++ b/res/drawable/ic_wifi_signal_3.png diff --git a/res/drawable/ic_wifi_signal_4.png b/res/drawable/ic_wifi_signal_4.png Binary files differnew file mode 100644 index 0000000..d45028e --- /dev/null +++ b/res/drawable/ic_wifi_signal_4.png diff --git a/res/drawable/lock_anim.xml b/res/drawable/lock_anim.xml new file mode 100644 index 0000000..8ec31a6 --- /dev/null +++ b/res/drawable/lock_anim.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2008, 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. +*/ +--> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="false"> + <item android:drawable="@drawable/lock_anim_0" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_1" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_2" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_3" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_4" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_5" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_6" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_7" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_8" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_9" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_10" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_11" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_12" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_13" android:duration="200" /> + <item android:drawable="@drawable/lock_anim_14" android:duration="200" /> +</animation-list> diff --git a/res/drawable/lock_anim_0.png b/res/drawable/lock_anim_0.png Binary files differnew file mode 100644 index 0000000..a8bec3a --- /dev/null +++ b/res/drawable/lock_anim_0.png diff --git a/res/drawable/lock_anim_1.png b/res/drawable/lock_anim_1.png Binary files differnew file mode 100644 index 0000000..c2421a2 --- /dev/null +++ b/res/drawable/lock_anim_1.png diff --git a/res/drawable/lock_anim_10.png b/res/drawable/lock_anim_10.png Binary files differnew file mode 100644 index 0000000..da90eca --- /dev/null +++ b/res/drawable/lock_anim_10.png diff --git a/res/drawable/lock_anim_11.png b/res/drawable/lock_anim_11.png Binary files differnew file mode 100644 index 0000000..14fd097 --- /dev/null +++ b/res/drawable/lock_anim_11.png diff --git a/res/drawable/lock_anim_12.png b/res/drawable/lock_anim_12.png Binary files differnew file mode 100644 index 0000000..4a2b88f --- /dev/null +++ b/res/drawable/lock_anim_12.png diff --git a/res/drawable/lock_anim_13.png b/res/drawable/lock_anim_13.png Binary files differnew file mode 100644 index 0000000..88d57d1 --- /dev/null +++ b/res/drawable/lock_anim_13.png diff --git a/res/drawable/lock_anim_14.png b/res/drawable/lock_anim_14.png Binary files differnew file mode 100644 index 0000000..9ab015f --- /dev/null +++ b/res/drawable/lock_anim_14.png diff --git a/res/drawable/lock_anim_2.png b/res/drawable/lock_anim_2.png Binary files differnew file mode 100644 index 0000000..bdefce7 --- /dev/null +++ b/res/drawable/lock_anim_2.png diff --git a/res/drawable/lock_anim_3.png b/res/drawable/lock_anim_3.png Binary files differnew file mode 100644 index 0000000..a424f81 --- /dev/null +++ b/res/drawable/lock_anim_3.png diff --git a/res/drawable/lock_anim_4.png b/res/drawable/lock_anim_4.png Binary files differnew file mode 100644 index 0000000..ae3ac4e --- /dev/null +++ b/res/drawable/lock_anim_4.png diff --git a/res/drawable/lock_anim_5.png b/res/drawable/lock_anim_5.png Binary files differnew file mode 100644 index 0000000..1615504 --- /dev/null +++ b/res/drawable/lock_anim_5.png diff --git a/res/drawable/lock_anim_6.png b/res/drawable/lock_anim_6.png Binary files differnew file mode 100644 index 0000000..d386f0e --- /dev/null +++ b/res/drawable/lock_anim_6.png diff --git a/res/drawable/lock_anim_7.png b/res/drawable/lock_anim_7.png Binary files differnew file mode 100644 index 0000000..2ff4458 --- /dev/null +++ b/res/drawable/lock_anim_7.png diff --git a/res/drawable/lock_anim_8.png b/res/drawable/lock_anim_8.png Binary files differnew file mode 100644 index 0000000..615bbc7 --- /dev/null +++ b/res/drawable/lock_anim_8.png diff --git a/res/drawable/lock_anim_9.png b/res/drawable/lock_anim_9.png Binary files differnew file mode 100644 index 0000000..b58bcf0 --- /dev/null +++ b/res/drawable/lock_anim_9.png diff --git a/res/drawable/quick_launch_shortcut_background.9.png b/res/drawable/quick_launch_shortcut_background.9.png Binary files differnew file mode 100644 index 0000000..ce5dad2 --- /dev/null +++ b/res/drawable/quick_launch_shortcut_background.9.png diff --git a/res/drawable/signal.xml b/res/drawable/signal.xml new file mode 100644 index 0000000..f315600 --- /dev/null +++ b/res/drawable/signal.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<level-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:maxLevel="0" android:drawable="@drawable/ic_network_signal_0" /> + <item android:maxLevel="1" android:drawable="@drawable/ic_network_signal_1" /> + <item android:maxLevel="2" android:drawable="@drawable/ic_network_signal_2" /> + <item android:maxLevel="3" android:drawable="@drawable/ic_network_signal_3" /> + <item android:maxLevel="4" android:drawable="@drawable/ic_network_signal_4" /> +</level-list> + diff --git a/res/drawable/wifi_signal.xml b/res/drawable/wifi_signal.xml new file mode 100644 index 0000000..86c1ab0 --- /dev/null +++ b/res/drawable/wifi_signal.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + <item settings:state_encrypted="true" android:drawable="@drawable/wifi_signal_lock" /> + <item settings:state_encrypted="false" android:drawable="@drawable/wifi_signal_open" /> +</selector> + diff --git a/res/drawable/wifi_signal_lock.xml b/res/drawable/wifi_signal_lock.xml new file mode 100644 index 0000000..2ad6d91 --- /dev/null +++ b/res/drawable/wifi_signal_lock.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<level-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:maxLevel="0" android:drawable="@drawable/ic_wifi_lock_signal_1" /> + <item android:maxLevel="1" android:drawable="@drawable/ic_wifi_lock_signal_2" /> + <item android:maxLevel="2" android:drawable="@drawable/ic_wifi_lock_signal_3" /> + <item android:maxLevel="3" android:drawable="@drawable/ic_wifi_lock_signal_4" /> +</level-list> + diff --git a/res/drawable/wifi_signal_open.xml b/res/drawable/wifi_signal_open.xml new file mode 100644 index 0000000..b506dd3 --- /dev/null +++ b/res/drawable/wifi_signal_open.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<level-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:maxLevel="0" android:drawable="@drawable/ic_wifi_signal_1" /> + <item android:maxLevel="1" android:drawable="@drawable/ic_wifi_signal_2" /> + <item android:maxLevel="2" android:drawable="@drawable/ic_wifi_signal_3" /> + <item android:maxLevel="3" android:drawable="@drawable/ic_wifi_signal_4" /> +</level-list> + diff --git a/res/layout-land/choose_lock_pattern.xml b/res/layout-land/choose_lock_pattern.xml new file mode 100644 index 0000000..1502301 --- /dev/null +++ b/res/layout-land/choose_lock_pattern.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/topLayout" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/black"> + + <!-- left side: instructions and messages --> + <LinearLayout + android:orientation="vertical" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1.0" + > + + <!-- header message --> + <TextView android:id="@+id/headerText" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:textSize="18sp"/> + + <!-- footer can show a message, or confirm / restart buttons --> + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0"> + + <!-- left button: skip, or re-try --> + <Button android:id="@+id/footerLeftButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" + android:text="@string/lockpattern_restart_button_text"/> + + <!-- right button: confirm or ok --> + <Button android:id="@+id/footerRightButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignParentBottom="true" + android:drawableRight="@drawable/ic_btn_next" + android:drawablePadding="3dip" + android:text="@string/lockpattern_confirm_button_text"/> + + <!-- message above buttons --> + <TextView android:id="@+id/footerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/footerRightButton" + android:layout_centerHorizontal="true" + android:layout_marginBottom="4dip" + android:textSize="14sp"/> + </RelativeLayout> + </LinearLayout> + + <View + android:background="@*android:drawable/code_lock_left" + android:layout_width="2dip" + android:layout_height="fill_parent" /> + <!-- right side: lock pattern --> + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> + diff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml new file mode 100644 index 0000000..6decb14 --- /dev/null +++ b/res/layout-land/confirm_lock_pattern.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/topLayout" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/black"> + + <!-- left side: instructions and messages --> + <LinearLayout + android:orientation="vertical" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1.0" + > + + <!-- header message --> + <TextView android:id="@+id/headerText" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:textSize="18sp"/> + + <!-- fill space between header and button below --> + <View + android:layout_weight="1.0" + android:layout_width="fill_parent" + android:layout_height="0dip" + /> + + <!-- footer message --> + <TextView android:id="@+id/footerText" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:textSize="14sp"/> + </LinearLayout> + + <View + android:background="@*android:drawable/code_lock_left" + android:layout_width="2dip" + android:layout_height="fill_parent" /> + <!-- right side: lock pattern --> + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> + diff --git a/res/layout/app_launcher.xml b/res/layout/app_launcher.xml new file mode 100644 index 0000000..04d3fce --- /dev/null +++ b/res/layout/app_launcher.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/app_launcher.xml +** +** Copyright 2007, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + <LinearLayout style="@style/entry_layout" + android:orientation="vertical"> + + <CheckBox android:id="@+id/newView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/app_launcher_newView_text" /> + + </LinearLayout> +</LinearLayout> diff --git a/res/layout/band_mode.xml b/res/layout/band_mode.xml new file mode 100644 index 0000000..e920af0 --- /dev/null +++ b/res/layout/band_mode.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:padding="4dip" + android:gravity="center_horizontal" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <ListView android:id="@+id/band" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:textSize="7sp"> + </ListView> + +</LinearLayout> diff --git a/res/layout/battery_info.xml b/res/layout/battery_info.xml new file mode 100644 index 0000000..3889827 --- /dev/null +++ b/res/layout/battery_info.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/battery_info.xml +** +** Copyright 2006, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + + <!-- Battery Status --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_status_label" style="@style/info_label" /> + <TextView android:id="@+id/status" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Level --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_level_label" style="@style/info_label" /> + <TextView android:id="@+id/level" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Scale --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_scale_label" style="@style/info_label" /> + <TextView android:id="@+id/scale" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Health --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_health_label" style="@style/info_label" /> + <TextView android:id="@+id/health" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Voltage --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_voltage_label" style="@style/info_label" /> + <TextView android:id="@+id/voltage" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Temperature --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_temperature_label" style="@style/info_label" /> + <TextView android:id="@+id/temperature" style="@style/info_value" /> + </LinearLayout> + + <!-- Battery Technology --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_technology_label" style="@style/info_label" /> + <TextView android:id="@+id/technology" style="@style/info_value" /> + </LinearLayout> + + <!-- Uptime --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_uptime" style="@style/info_label" /> + <TextView android:id="@+id/uptime" style="@style/info_value" /> + </LinearLayout> + + <!-- Awaketime Battery --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_awake_battery" style="@style/info_label" /> + <TextView android:id="@+id/awakeBattery" style="@style/info_value" /> + </LinearLayout> + + <!-- Awaketime Plugged In --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_awake_plugged" style="@style/info_label" /> + <TextView android:id="@+id/awakePlugged" style="@style/info_value" /> + </LinearLayout> + + <!-- Screen On Time --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/battery_info_screen_on" style="@style/info_label" /> + <TextView android:id="@+id/screenOn" style="@style/info_value" /> + </LinearLayout> +</LinearLayout> + diff --git a/res/layout/bluetooth.xml b/res/layout/bluetooth.xml new file mode 100644 index 0000000..530cbbe --- /dev/null +++ b/res/layout/bluetooth.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/layout/bluetooth.xml +** +** Copyright 2006, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:paddingLeft="2dip" + android:paddingRight="2dip"> + + <Button android:id="@+id/enable" + android:textStyle="bold" + android:text="@string/bluetooth_enable_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <Button android:id="@+id/scan" + android:textStyle="bold" + android:text="@string/bluetooth_scan_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <Button android:id="@+id/settings" + android:textStyle="bold" + android:text="@string/bluetooth_settings_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <ListView android:id="@android:id/list" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:drawSelectorOnTop="false"> + </ListView> + +</LinearLayout> diff --git a/res/layout/bluetooth_data_entry.xml b/res/layout/bluetooth_data_entry.xml new file mode 100644 index 0000000..1900b6e --- /dev/null +++ b/res/layout/bluetooth_data_entry.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/layout/bluetooth_pairing_panel.xml +** +** Copyright 2006, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView android:id="@+id/dataLabel" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_new_data" /> + + <EditText android:id="@+id/dataEntry" + android:layout_marginTop="2dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:autoText="false" + android:capitalize="none" + android:singleLine="true" + android:password="true" + android:maxLines="1" /> + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <Button android:id="@+id/confirmButton" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:text="@string/bluetooth_new_data_confirm" /> + + <Button android:id="@+id/cancelButton" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:text="@string/bluetooth_new_data_cancel" /> + + </LinearLayout> +</LinearLayout> + diff --git a/res/layout/bluetooth_device_info.xml b/res/layout/bluetooth_device_info.xml new file mode 100644 index 0000000..e589103 --- /dev/null +++ b/res/layout/bluetooth_device_info.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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:id="@+id/scroll_content" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_alias" /> + + <TextView android:id="@+id/deviceAlias" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_no_alias" /> + + <Button android:id="@+id/connectButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_connectButton_text" /> + + <Button android:id="@+id/deleteButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_delete" /> + + <Button android:id="@+id/querySDP" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_sdp" /> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info" /> + + <TextView android:id="@+id/deviceInfo" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_device_info_deviceInfo_text" /> + </LinearLayout> +</ScrollView> + diff --git a/res/layout/bluetooth_device_list_item.xml b/res/layout/bluetooth_device_list_item.xml new file mode 100644 index 0000000..3b80261 --- /dev/null +++ b/res/layout/bluetooth_device_list_item.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/bluetooth_device_list_item.xml +** +** Copyright 2006, 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. +*/ +--> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="3dip" + android:paddingLeft="6dip" + android:paddingRight="6dip"> + + <ImageView android:id="@+id/icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/sym_contact_card"/> + + <TextView android:id="@+id/name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="6dip" + android:layout_toRightOf="@id/icon" + android:textColor="#FFFFFFFF" + android:textSize="18sp" + android:textStyle="bold"/> + +</RelativeLayout> diff --git a/res/layout/bluetooth_discoverability_panel.xml b/res/layout/bluetooth_discoverability_panel.xml new file mode 100644 index 0000000..ca50aa8 --- /dev/null +++ b/res/layout/bluetooth_discoverability_panel.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/layout/bluetooth_pairing_panel.xml +** +** Copyright 2006, 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. +*/ +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="2dip" + android:paddingRight="2dip"> + + <LinearLayout + android:text="@string/bluetooth_discoverability_panel_title" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="20dip" + android:paddingRight="20dip"> + + <Button android:id="@+id/discoverable" + android:visibility="visible" + android:text="@string/bluetooth_discoverable" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <Button android:id="@+id/connectable" + android:visibility="visible" + android:text="@string/bluetooth_connectable" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <Button android:id="@+id/neither" + android:visibility="visible" + android:text="@string/bluetooth_neither" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + </LinearLayout> +</FrameLayout> diff --git a/res/layout/bluetooth_discovery_screen.xml b/res/layout/bluetooth_discovery_screen.xml new file mode 100644 index 0000000..d3a7f79 --- /dev/null +++ b/res/layout/bluetooth_discovery_screen.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/bluetooth_discovery_screen.xml +** +** Copyright 2007, 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. +*/ +--> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:paddingLeft="2dip" + android:paddingRight="2dip"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:paddingLeft="3dip" + android:paddingRight="3dip"> + + <TextView android:id="@+id/label" + android:textStyle="bold" + android:text="@string/bluetooth_scan_for_new_devices" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + + <ListView android:id="@android:id/list" + android:layout_marginTop="5dip" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:drawSelectorOnTop="false"> + </ListView> + </LinearLayout> +</FrameLayout> diff --git a/res/layout/bluetooth_pairing_panel.xml b/res/layout/bluetooth_pairing_panel.xml new file mode 100644 index 0000000..550bd38 --- /dev/null +++ b/res/layout/bluetooth_pairing_panel.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/layout/bluetooth_pairing_panel.xml +** +** Copyright 2006, 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. +*/ +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="2dip" + android:paddingRight="2dip"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="20dip" + android:paddingRight="20dip"> + + <TextView android:id="@+id/status" + android:visibility="visible" + android:text="@string/bluetooth_pairing_msg" + android:layout_width="fill_parent" + android:layout_height="wrap_content"/> + </LinearLayout> +</FrameLayout> diff --git a/res/layout/bluetooth_pin_entry.xml b/res/layout/bluetooth_pin_entry.xml new file mode 100644 index 0000000..6969cb7 --- /dev/null +++ b/res/layout/bluetooth_pin_entry.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2008, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:layout_width="fill_parent"> + <EditText android:id="@+id/text" + android:layout_height="wrap_content" + android:layout_width="fill_parent" + android:layout_marginLeft="20dip" + android:layout_marginRight="20dip" /> +</LinearLayout> diff --git a/res/layout/bluetooth_sdp_query.xml b/res/layout/bluetooth_sdp_query.xml new file mode 100644 index 0000000..907de72 --- /dev/null +++ b/res/layout/bluetooth_sdp_query.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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:id="@+id/scroll_content" android:layout_width="fill_parent" android:layout_height="fill_parent"> + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView android:id="@+id/services" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/bluetooth_sdp_query_services_text" /> + </LinearLayout> +</ScrollView> + diff --git a/res/layout/bookmark_picker_item.xml b/res/layout/bookmark_picker_item.xml new file mode 100644 index 0000000..fd764ea --- /dev/null +++ b/res/layout/bookmark_picker_item.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2008, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:paddingLeft="2dip" + android:gravity="center_vertical"> + + <ImageView android:id="@+id/icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:scaleType="fitCenter" /> + + <TextView android:id="@+id/title" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge" + android:paddingLeft="6dip" /> + +</LinearLayout> + diff --git a/res/layout/choose_lock_pattern.xml b/res/layout/choose_lock_pattern.xml new file mode 100644 index 0000000..67a5257 --- /dev/null +++ b/res/layout/choose_lock_pattern.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> +<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/topLayout" + android:orientation="vertical" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:background="@color/black"> + + <TextView android:id="@+id/headerText" + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0" + android:gravity="center" + android:textSize="18sp"/> + + <View + android:background="@*android:drawable/code_lock_top" + android:layout_width="fill_parent" + android:layout_height="2dip" /> + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + <View + android:background="@*android:drawable/code_lock_bottom" + android:layout_width="fill_parent" + android:layout_height="8dip" /> + + <!-- footer can show a message, or confirm / restart buttons --> + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0"> + + <!-- message --> + <TextView android:id="@+id/footerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" + android:textSize="14sp"/> + + <!-- left button: skip, or retry --> + <Button android:id="@+id/footerLeftButton" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentBottom="true" + android:text="@string/lockpattern_restart_button_text"/> + + <!-- right button: confirm or ok --> + <Button android:id="@+id/footerRightButton" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignParentBottom="true" + android:drawableRight="@drawable/ic_btn_next" + android:drawablePadding="3dip" + android:text="@string/lockpattern_confirm_button_text"/> + + </RelativeLayout> + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> + diff --git a/res/layout/choose_lock_pattern_example.xml b/res/layout/choose_lock_pattern_example.xml new file mode 100644 index 0000000..0a58f17 --- /dev/null +++ b/res/layout/choose_lock_pattern_example.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_height="fill_parent" + android:layout_width="fill_parent"> + + <ScrollView + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_weight="1"> + + <LinearLayout + android:orientation="vertical" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:padding="5dip"> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/lock_example_title" + android:gravity="center_horizontal" + android:layout_marginTop="5dip" + style="?android:attr/textAppearanceLarge" + /> + + <ImageView android:id="@+id/lock_anim" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="11dip" + android:layout_gravity="center_horizontal" + android:focusable="false" + android:clickable="false" + /> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dip" + android:text="@string/lock_example_message" + android:layout_gravity="left" + style="?android:attr/textAppearanceMedium" + /> + + </LinearLayout> + + </ScrollView> + + <RelativeLayout + android:layout_height="wrap_content" + android:layout_width="fill_parent"> + + <Button android:id="@+id/skip_button" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_margin="5dip" + android:layout_alignParentLeft="true" + android:text="@string/skip_button_label" + /> + + <Button android:id="@+id/next_button" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_margin="5dip" + android:drawableRight="@drawable/ic_btn_next" + android:drawablePadding="3dip" + android:layout_alignParentRight="true" + android:text="@string/next_button_label" + /> + + </RelativeLayout> + +</LinearLayout > diff --git a/res/layout/choose_lock_pattern_tutorial.xml b/res/layout/choose_lock_pattern_tutorial.xml new file mode 100644 index 0000000..1c3e90b --- /dev/null +++ b/res/layout/choose_lock_pattern_tutorial.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_height="fill_parent" + android:layout_width="fill_parent"> + + <ScrollView + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="5dip"> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center_horizontal" + android:text="@string/lock_title" + android:paddingBottom="10dip" + android:layout_marginTop="3dip" + style="?android:attr/textAppearanceLarge" + /> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceMedium" + android:layout_marginTop="10dip" + android:text="@string/lock_intro_message" + /> + + </LinearLayout> + + </ScrollView> + + <RelativeLayout + android:layout_height="wrap_content" + android:layout_width="fill_parent"> + + <Button android:id="@+id/skip_button" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_margin="5dip" + android:layout_alignParentLeft="true" + android:text="@string/skip_button_label" + /> + + <Button android:id="@+id/next_button" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_margin="5dip" + android:layout_alignParentRight="true" + android:drawableRight="@drawable/ic_btn_next" + android:drawablePadding="3dip" + android:text="@string/next_button_label" + /> + + </RelativeLayout> + +</LinearLayout > diff --git a/res/layout/compute_sizes.xml b/res/layout/compute_sizes.xml new file mode 100755 index 0000000..c781227 --- /dev/null +++ b/res/layout/compute_sizes.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView + android:id="@+id/center_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:textSize="18sp" + android:textStyle="bold" + android:padding="2dip" + android:text="@string/computing_size"/> + <ListView + android:id="@android:id/list" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + </ListView> +</RelativeLayout> + + diff --git a/res/layout/confirm_lock_pattern.xml b/res/layout/confirm_lock_pattern.xml new file mode 100644 index 0000000..52cf24a --- /dev/null +++ b/res/layout/confirm_lock_pattern.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> +<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/topLayout" + android:orientation="vertical" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:background="@color/black"> + + <TextView android:id="@+id/headerText" + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0" + android:gravity="center" + android:textSize="18sp"/> + + <View + android:background="@*android:drawable/code_lock_top" + android:layout_width="fill_parent" + android:layout_height="2dip" /> + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + <View + android:background="@*android:drawable/code_lock_bottom" + android:layout_width="fill_parent" + android:layout_height="8dip" /> + + <TextView android:id="@+id/footerText" + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1.0" + android:gravity="center" + android:textSize="14sp"/> + + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> diff --git a/res/layout/date_picker_activity.xml b/res/layout/date_picker_activity.xml new file mode 100644 index 0000000..16a4a69 --- /dev/null +++ b/res/layout/date_picker_activity.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2007, 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. +*/ +--> + +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <DatePicker + android:id="@+id/datePicker" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> + +</RelativeLayout> diff --git a/res/layout/date_time.xml b/res/layout/date_time.xml new file mode 100644 index 0000000..fc7e942 --- /dev/null +++ b/res/layout/date_time.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/date_time.xml +** +** Copyright 2006, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/info_layout"> + + <!-- time picker --> + <LinearLayout + android:orientation="horizontal" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <TextView android:id="@+id/timeDisplay" + android:maxLines="1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/date_time_timeDisplay_text"/> + <Button android:id="@+id/changeTime" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/date_time_changeTime_text"/> + </LinearLayout> + + + <!-- date picker --> + <LinearLayout + android:orientation="horizontal" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <TextView android:id="@+id/dateDisplay" + android:maxLines="1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/date_time_dateDisplay_text"/> + <Button android:id="@+id/changeDate" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/date_time_changeDate_text"/> + </LinearLayout> + + <!-- Time Zone --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/date_time_timezone_label" style="@style/info_label" /> + <TextView android:id="@+id/zone" style="@style/info_value" /> + </LinearLayout> + + <Button android:id="@+id/setzone" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/date_time_setzone_text" /> +</LinearLayout> + diff --git a/res/layout/date_time_settings_setupwizard.xml b/res/layout/date_time_settings_setupwizard.xml new file mode 100644 index 0000000..fc6f5e2 --- /dev/null +++ b/res/layout/date_time_settings_setupwizard.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:orientation="vertical"> + + <LinearLayout + android:orientation="vertical" + android:layout_height="0dip" + android:layout_width="fill_parent" + android:layout_weight="1" + android:gravity="left"> + + <ListView android:id="@android:id/list" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:drawSelectorOnTop="false" + android:paddingTop="2dip" + /> + + </LinearLayout> + + <RelativeLayout + android:layout_height="wrap_content" + android:layout_width="fill_parent" + android:background="@android:drawable/bottom_bar"> + + <Button android:id="@+id/next_button" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:layout_margin="5dip" + android:layout_alignParentRight="true" + android:drawableRight="@drawable/ic_btn_next" + android:drawablePadding="10dip" + android:text="@string/next_label" + /> + + </RelativeLayout> + +</LinearLayout> diff --git a/res/layout/device_info_screen.xml b/res/layout/device_info_screen.xml new file mode 100644 index 0000000..7f4af31 --- /dev/null +++ b/res/layout/device_info_screen.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/device_info_screen.xml +** +** Copyright 2007, 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:paddingLeft="6dip" + android:paddingRight="6dip" + android:paddingBottom="3dip" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <requestFocus/> + + <LinearLayout android:id="@+id/list" + android:orientation="vertical" + android:paddingLeft="10dip" + android:paddingTop="10dip" + android:paddingRight="10dip" + android:paddingBottom="10dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <!-- Note: Property values are inserted above these controls. --> + + <TextView android:id="@+id/target_build_label" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textStyle="bold" + android:text="@string/target_build_field_label" /> + + <EditText android:id="@+id/target_build_field" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="3dip" + android:paddingBottom="6dip" /> + + <Button android:id="@+id/checkin_button" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/checkin_button_label" /> + + </LinearLayout> +</ScrollView> diff --git a/res/layout/display.xml b/res/layout/display.xml new file mode 100644 index 0000000..0049025 --- /dev/null +++ b/res/layout/display.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/display.xml +** +** Copyright 2007, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + <LinearLayout style="@style/entry_layout" + android:orientation="vertical"> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/display_font_size_label" /> + + <Spinner android:id="@+id/fontSize" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + </Spinner> + + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/display_preview_label" /> + + <TextView android:id="@+id/preview" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + + <Button android:id="@+id/save" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + </LinearLayout> + +</LinearLayout> diff --git a/res/layout/info_screen.xml b/res/layout/info_screen.xml new file mode 100644 index 0000000..adb9ca5 --- /dev/null +++ b/res/layout/info_screen.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/device_info_screen.xml +** +** Copyright 2007, 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="fill_parent" + android:layout_height="fill_parent"> + <requestFocus/> + + <LinearLayout android:id="@+id/list" + android:orientation="vertical" + android:paddingLeft="10dip" + android:paddingTop="5dip" + android:paddingRight="10dip" + android:paddingBottom="5dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + </LinearLayout> +</ScrollView> + diff --git a/res/layout/info_screen_item.xml b/res/layout/info_screen_item.xml new file mode 100644 index 0000000..1f71016 --- /dev/null +++ b/res/layout/info_screen_item.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- List item layout for a setting --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingBottom="10dip" + android:orientation="vertical"> + + <TextView + android:id="@+id/info_name_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:textStyle="bold" /> + + <TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/info_value_text" + android:paddingLeft="20dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textColor="@color/lighter_gray" /> + +</LinearLayout> diff --git a/res/layout/installed_app_details.xml b/res/layout/installed_app_details.xml new file mode 100644 index 0000000..c9c00a7 --- /dev/null +++ b/res/layout/installed_app_details.xml @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2008, 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="fill_parent" + android:layout_height="fill_parent"> + <LinearLayout + android:id="@+id/all_details" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical"> + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical"> + <TextView android:id="@+id/app_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?android:attr/textColorPrimary" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" + android:paddingTop="6dip" + android:paddingRight="6dip" + android:paddingLeft="6dip" /> + + <TextView android:id="@+id/app_description" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_below="@id/app_name" + android:layout_alignParentLeft="true" + android:paddingTop="6dip" + android:paddingBottom="6dip" + android:paddingRight="6dip" + android:paddingLeft="6dip" /> + <ImageView android:id="@+id/app_icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:layout_alignParentRight="true" + android:paddingTop="6dip" + android:paddingBottom="6dip" + android:paddingRight="6dip" + android:scaleType="fitCenter" /> + </RelativeLayout> + + <TextView + style="?android:attr/listSeparatorTextViewStyle" + android:text="@string/storage_label" + android:background="@*android:drawable/settings_header" + android:textSize="18sp" + android:paddingTop="6dip" + android:paddingLeft="6dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingLeft="6dip" + android:orientation="vertical"> + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:baselineAligned="true" + android:paddingTop="-1dip"> + <TextView + android:id="@+id/total_size_prefix" + android:text="@string/total_size_label" + android:textColor="?android:attr/textColorPrimary" + android:textSize="18sp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" + android:paddingTop="6dip" + android:paddingLeft="6dip"/> + + <ImageView + android:id="@+id/info_size_dots" + android:src="@drawable/dotted_line_480px" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="1px" + android:layout_gravity="bottom" + android:layout_marginLeft="1dip" + android:layout_marginRight="1dip" + android:layout_marginBottom="4dip" + android:scaleType="center" /> + <TextView + android:id="@+id/total_size_text" + android:textSize="18sp" + android:paddingTop="6dip" + android:paddingRight="6dip" + android:textColor="?android:attr/textColorPrimary" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" /> + + </LinearLayout> + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:baselineAligned="true" + android:paddingTop="-1dip"> + <TextView + android:id="@+id/application_size_prefix" + android:text="@string/application_size_label" + android:textColor="?android:attr/textColorPrimary" + android:textSize="18sp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" + android:paddingTop="6dip" + android:paddingLeft="6dip"/> + <ImageView + android:id="@+id/info_size_dots" + android:src="@drawable/dotted_line_480px" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="1px" + android:layout_gravity="bottom" + android:layout_marginLeft="1dip" + android:layout_marginRight="1dip" + android:layout_marginBottom="4dip" + android:scaleType="center" /> + <TextView + android:id="@+id/application_size_text" + android:textSize="18sp" + android:paddingTop="6dip" + android:paddingRight="6dip" + android:textColor="?android:attr/textColorPrimary" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" /> + + </LinearLayout> + <LinearLayout + android:id="@+id/info_size" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:baselineAligned="true" + android:paddingTop="-1dip"> + <TextView + android:id="@+id/data_size_prefix" + android:text="@string/data_size_label" + android:textColor="?android:attr/textColorPrimary" + android:textSize="18sp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" + android:paddingTop="6dip" + android:paddingLeft="6dip"/> + <ImageView + android:id="@+id/info_size_dots" + android:src="@drawable/dotted_line_480px" + android:layout_width="0dip" + android:layout_weight="1" + android:layout_height="1px" + android:layout_gravity="bottom" + android:layout_marginLeft="1dip" + android:layout_marginRight="1dip" + android:layout_marginBottom="4dip" + android:scaleType="center" /> + <TextView + android:id="@+id/data_size_text" + android:textSize="18sp" + android:paddingTop="6dip" + android:paddingRight="6dip" + android:textColor="?android:attr/textColorPrimary" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:maxLines="1" /> + + </LinearLayout> + <!-- Manage space, Clear data/Uninstall buttons --> + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="bottom" + android:orientation="horizontal"> + <Button + android:id="@+id/manage_space_button" + android:text="@string/manage_space_text" + android:visibility="invisible" + android:layout_width="150dip" + android:paddingLeft="6dip" + android:layout_gravity="left" + android:layout_weight="0.4" + android:layout_height="wrap_content"/> + <!-- Spacer --> + <View + android:id="@+id/buttons_spacer_left" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="0.2" + android:visibility="gone" /> + + <Button + android:id="@+id/uninstall_button" + android:layout_width="150dip" + android:paddingRight="6dip" + android:layout_gravity="right" + android:layout_weight="0.4" + android:layout_height="wrap_content"/> + </LinearLayout> + </LinearLayout> + <TextView + style="?android:attr/listSeparatorTextViewStyle" + android:text="@string/auto_launch_label" + android:background="@*android:drawable/settings_header" + android:paddingTop="6dip" + android:paddingLeft="6dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical"> + <TextView android:id="@+id/auto_launch" + android:layout_alignParentLeft="true" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="6dip" + android:paddingRight="6dip" + android:paddingLeft="6dip" /> + <Button android:id="@+id/clear_activities_button" + android:layout_alignParentRight="true" + android:layout_below="@id/auto_launch" + android:layout_centerHorizontal="true" + android:layout_width="150dip" + android:text="@string/clear_activities" + android:layout_height="wrap_content" /> + </RelativeLayout> + <!-- Permissions section --> + <TextView + style="?android:attr/listSeparatorTextViewStyle" + android:text="@string/permissions_label" + android:background="@*android:drawable/settings_header" + android:textSize="18sp" + android:paddingTop="6dip" + android:paddingLeft="6dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + <TextView + android:text="@string/security_settings_desc" + android:textSize="14sp" + android:paddingTop="6dip" + android:paddingLeft="6dip" + android:paddingBottom="6dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + <LinearLayout + android:id="@+id/security_settings_list" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical"/> + </LinearLayout> +</ScrollView> + diff --git a/res/layout/intent_sender.xml b/res/layout/intent_sender.xml new file mode 100644 index 0000000..07fe67d --- /dev/null +++ b/res/layout/intent_sender.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Preferences/assets/res/any/layout/intent_sender.xml +** +** Copyright 2006, 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:paddingLeft="6dip" + android:paddingRight="6dip" + android:paddingBottom="3dip" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_action_label" /> + + <EditText android:id="@+id/intent" + android:singleLine="true" + android:layout_marginTop="2dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false" /> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_data_label" /> + + <EditText android:id="@+id/data" + android:singleLine="true" + android:layout_marginTop="2dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false" /> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_marginTop="4dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_account_label" /> + + <EditText android:id="@+id/account" + android:singleLine="true" + android:layout_marginTop="2dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false" /> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_marginTop="4dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_resource_label" /> + + <EditText android:id="@+id/resource" + android:singleLine="true" + android:layout_marginTop="2dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false" /> + + <Button android:id="@+id/sendbroadcast" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_sendbroadcast_text" /> + + <Button android:id="@+id/startactivity" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/intent_sender_startactivity_text" /> + </LinearLayout> +</ScrollView> + diff --git a/res/layout/keyguard.xml b/res/layout/keyguard.xml new file mode 100644 index 0000000..64a48de --- /dev/null +++ b/res/layout/keyguard.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/keyguard.xml +** +** Copyright 2007, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + <!-- Keyboard Version --> + <LinearLayout style="@style/entry_layout" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/keyguard_label" /> + + <Spinner android:id="@+id/kg_options" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dip"> + </Spinner> + + <Button android:id="@+id/pw_mod" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:text="@string/keyguard_pw_mod_text" + android:gravity="center_horizontal" /> + + </LinearLayout> + + <LinearLayout style="@style/entry_layout" + android:orientation="vertical" + android:layout_marginTop="20dip" + > + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/keyguard_sim_pin_label" /> + + <Button android:id="@+id/pin_enable" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:gravity="center_horizontal" /> + + <Button android:id="@+id/pin_mod" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:text="@string/keyguard_pin_mod_text" + android:gravity="center_horizontal" /> + + </LinearLayout> +</LinearLayout> diff --git a/res/layout/keyguard_password.xml b/res/layout/keyguard_password.xml new file mode 100644 index 0000000..7bf3b15 --- /dev/null +++ b/res/layout/keyguard_password.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/keyguard_password.xml +** +** Copyright 2007, 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="fill_parent" + android:layout_height="fill_parent" + > + + <LinearLayout + style="@style/info_layout" + android:orientation="vertical"> + + <TextView + style="@style/info_label" + android:text="@string/keyguard_password_old_label" + /> + + <EditText android:id="@+id/old_password" + android:singleLine="true" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:autoText="false" + android:capitalize="none" + android:password="true" + android:maxLength="32" + /> + + <TextView android:id="@+id/old_password_error" + style="@style/info_label" + android:visibility="gone" + android:text="@string/keyguard_password_old_password_error_text" + /> + + + <TextView + style="@style/info_label" + android:text="@string/keyguard_password_new_label" + /> + + <EditText android:id="@+id/new_password_1" + android:singleLine="true" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:autoText="false" + android:capitalize="none" + android:password="true" + android:maxLength="32" + /> + + + <TextView + style="@style/info_label" + android:text="@string/keyguard_password_confirm_new_label" + /> + + <EditText android:id="@+id/new_password_2" + android:singleLine="true" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:scrollHorizontally="true" + android:autoText="false" + android:capitalize="none" + android:password="true" + android:maxLength="32" + /> + + + <TextView android:id="@+id/mismatch_error" + style="@style/info_label" + android:visibility="gone" + android:text="@string/keyguard_password_mismatch_error_text" + /> + + + <Button android:id="@+id/button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/keyguard_password_button_text" + /> + </LinearLayout> + +</ScrollView> + diff --git a/res/layout/list_setting_value_spinner.xml b/res/layout/list_setting_value_spinner.xml new file mode 100644 index 0000000..b603cf4 --- /dev/null +++ b/res/layout/list_setting_value_spinner.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- Template for the generic static text in a setting's value --> +<Spinner + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/setting_value_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> diff --git a/res/layout/locale_picker.xml b/res/layout/locale_picker.xml new file mode 100644 index 0000000..476293f --- /dev/null +++ b/res/layout/locale_picker.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <ListView android:id="@android:id/list" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:drawSelectorOnTop="false" + /> + +</LinearLayout> diff --git a/res/layout/locale_picker_in_setupwizard.xml b/res/layout/locale_picker_in_setupwizard.xml new file mode 100644 index 0000000..184250d --- /dev/null +++ b/res/layout/locale_picker_in_setupwizard.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/select_your_language" + android:layout_gravity="center_horizontal" + android:paddingBottom="10dip" + android:textAppearance="?android:attr/textAppearanceLarge" + /> + + <View + android:layout_width="fill_parent" + android:layout_height="1dip" + android:layout_marginTop="8dip" + android:background="@android:drawable/divider_horizontal_dark" + /> + + <ListView android:id="@android:id/list" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:drawSelectorOnTop="false" + /> + +</LinearLayout> diff --git a/res/layout/locale_picker_item.xml b/res/layout/locale_picker_item.xml new file mode 100644 index 0000000..caa6fb5 --- /dev/null +++ b/res/layout/locale_picker_item.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_height="wrap_content" + android:layout_width="fill_parent" + android:gravity="center_vertical" + android:minHeight="?android:attr/listPreferredItemHeight" + android:padding="5dip"> +<!-- + <ImageView android:id="@+id/icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:focusable="false" + android:clickable="false" + android:src="@drawable/place_holder_for_locale" + /> +--> + <TextView android:id="@+id/locale" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge" + /> +</LinearLayout > diff --git a/res/layout/manage_applications_item.xml b/res/layout/manage_applications_item.xml new file mode 100755 index 0000000..fb77d29 --- /dev/null +++ b/res/layout/manage_applications_item.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2008, 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. +*/ +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:minHeight="?android:attr/listPreferredItemHeight"> + + <ImageView android:id="@+id/app_icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:layout_alignParentLeft="true" + android:paddingLeft="6dip" + android:paddingTop="6dip" + android:paddingBottom="6dip" + android:scaleType="fitCenter" /> + + <TextView android:id="@+id/app_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textColor="?android:attr/textColorPrimary" + android:layout_toRightOf="@id/app_icon" + android:paddingLeft="6dip" + android:paddingTop="6dip"/> + + <TextView android:id="@+id/app_description" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_below="@+id/app_name" + android:layout_toRightOf="@id/app_icon" + android:paddingLeft="6dip" + android:paddingBottom="6dip"/> + <TextView android:id="@+id/app_size" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_alignParentRight="true" + android:layout_below="@+id/app_name" + android:paddingRight="6dip" + android:maxLines="1" /> + +</RelativeLayout> + diff --git a/res/layout/master_clear_final.xml b/res/layout/master_clear_final.xml new file mode 100644 index 0000000..8de789a --- /dev/null +++ b/res/layout/master_clear_final.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright (C) 2008 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. +*/ +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/info_layout"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="20sp" + android:text="@string/master_clear_final_desc" /> + + <Button android:id="@+id/execute_master_clear" + android:layout_gravity="center_horizontal" + android:layout_marginTop="40dip" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:text="@string/master_clear_final_button_text" + android:gravity="center" /> + +</LinearLayout> diff --git a/res/layout/master_clear_primary.xml b/res/layout/master_clear_primary.xml new file mode 100644 index 0000000..ffac171 --- /dev/null +++ b/res/layout/master_clear_primary.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright (C) 2008 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. +*/ +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/info_layout"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="18sp" + android:text="@string/master_clear_desc" /> + + <Button android:id="@+id/initiate_master_clear" + android:layout_gravity="center_horizontal" + android:layout_marginTop="40dip" + android:layout_width="150dip" + android:layout_height="wrap_content" + android:text="@string/master_clear_button_text" + android:gravity="center" /> + +</LinearLayout> diff --git a/res/layout/mylocation.xml b/res/layout/mylocation.xml new file mode 100644 index 0000000..97a7b0e --- /dev/null +++ b/res/layout/mylocation.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/keyguard.xml +** +** Copyright 2007, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + <LinearLayout style="@style/entry_layout" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/location_label" /> + + <Spinner android:id="@+id/provider_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dip"> + </Spinner> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/location_status" /> + + <Spinner android:id="@+id/enabled_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dip"> + </Spinner> + </LinearLayout> +</LinearLayout> diff --git a/res/layout/power_management.xml b/res/layout/power_management.xml new file mode 100644 index 0000000..e450404 --- /dev/null +++ b/res/layout/power_management.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2007, 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. +*/ +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/info_layout"> + <!-- Keyboard Version --> + <LinearLayout style="@style/entry_layout" android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/screen_off_timeout_label"> + </TextView> + + <Spinner android:id="@+id/screen_off_timeout" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="5dip"> + </Spinner> + + <!-- Stay on while plugged in --> + <CheckBox android:id="@+id/dim_screen" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dim_screen"> + </CheckBox> + + <!-- Stay on while plugged in --> + <CheckBox android:id="@+id/stay_on" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/stay_on"> + </CheckBox> + + </LinearLayout> +</LinearLayout> diff --git a/res/layout/preference_progress_category.xml b/res/layout/preference_progress_category.xml new file mode 100644 index 0000000..01c7b15 --- /dev/null +++ b/res/layout/preference_progress_category.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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. +--> + +<!-- Layout used for ProgressCategory in bluetooth settings. --> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="27dip" + android:background="@*android:drawable/settings_header"> + + <TextView + android:id="@+android:id/title" + style="?android:attr/listSeparatorTextViewStyle" + /> + + <ProgressBar + android:id="@+id/scanning_progress" + android:text="@string/progress_scanning" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginRight="5sp" + style="?android:attr/progressBarStyleSmallTitle" + /> + + <TextView + android:id="@+id/scanning_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@id/scanning_progress" + android:textSize="18sp" + android:textColor="@android:color/primary_text_light" + android:layout_marginRight="5sp" + android:text="@string/progress_scanning" + /> + +</RelativeLayout> diff --git a/res/layout/preference_widget_btdevice_status.xml b/res/layout/preference_widget_btdevice_status.xml new file mode 100644 index 0000000..9882ed9 --- /dev/null +++ b/res/layout/preference_widget_btdevice_status.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/device_headset" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="4sp" + android:layout_gravity="center_vertical" + android:visibility="gone" + android:src="@android:drawable/stat_sys_headset" /> diff --git a/res/layout/preference_widget_shortcut.xml b/res/layout/preference_widget_shortcut.xml new file mode 100644 index 0000000..bb66f32 --- /dev/null +++ b/res/layout/preference_widget_shortcut.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/shortcut" + android:layout_width="40dip" + android:layout_height="40dip" + android:layout_marginRight="4sp" + android:layout_gravity="center_vertical" + android:background="#55ffffff" + android:gravity="center" + android:textAppearance="?android:attr/textAppearanceLarge" /> diff --git a/res/layout/preference_widget_wifi_signal.xml b/res/layout/preference_widget_wifi_signal.xml new file mode 100644 index 0000000..55dd587 --- /dev/null +++ b/res/layout/preference_widget_wifi_signal.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/signal" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="4sp" + android:layout_gravity="center_vertical" + android:src="@drawable/wifi_signal" /> diff --git a/res/layout/proxy.xml b/res/layout/proxy.xml new file mode 100644 index 0000000..914d0ea --- /dev/null +++ b/res/layout/proxy.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Browser/res/layout/proxy.xml +** +** Copyright 2006, 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. +*/ +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:paddingLeft="6dip" + android:paddingRight="6dip" + android:paddingBottom="3dip" + android:layout_width="fill_parent" android:layout_height="wrap_content"> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="@string/proxy_hostname_label" /> + + <EditText android:id="@+id/hostname" + android:maxLines="1" + android:layout_marginTop="2dip" + android:layout_width="fill_parent" android:layout_height="wrap_content" + android:autoText="false" + android:capitalize="none" + android:scrollHorizontally="true" /> + + <TextView + android:textStyle="bold" + android:maxLines="1" + android:layout_marginTop="4dip" + android:layout_width="wrap_content" android:layout_height="wrap_content" + android:text="@string/proxy_port_label" /> + + <EditText android:id="@+id/port" + android:numeric="integer" + android:maxLines="1" + android:layout_marginTop="2dip" + android:layout_width="fill_parent" android:layout_height="wrap_content" + android:scrollHorizontally="true" /> + + <LinearLayout + android:orientation="horizontal" + android:paddingTop="8dip" + android:layout_width="wrap_content" android:layout_height="wrap_content"> + + <Button android:id="@+id/action" + android:layout_width="wrap_content" android:layout_height="fill_parent" + android:layout_weight="1" + android:text="@string/proxy_action_text" /> + + <Button android:id="@+id/clear" + android:layout_width="wrap_content" android:layout_height="fill_parent" + android:layout_weight="1" + android:text="@string/proxy_clear_text" /> + + <Button android:id="@+id/defaultView" + android:layout_width="wrap_content" android:layout_height="fill_parent" + android:layout_weight="1" + android:text="@string/proxy_defaultView_text" /> + + </LinearLayout> +</LinearLayout> + diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml new file mode 100644 index 0000000..1b20373 --- /dev/null +++ b/res/layout/radio_info.xml @@ -0,0 +1,259 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/radio_info.xml +** +** Copyright 2006, 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="fill_parent" + android:layout_height="fill_parent" > + + <LinearLayout style="@style/info_layout"> + + <!-- IMEI --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_imei_label" style="@style/info_label" /> + <TextView android:id="@+id/imei" style="@style/info_value" /> + </LinearLayout> + + <!-- IMSI --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_imsi_label" style="@style/info_label" /> + <TextView android:id="@+id/imsi" style="@style/info_value" /> + </LinearLayout> + + <!-- Phone Number --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_phone_number_label" style="@style/info_label" /> + <TextView android:id="@+id/number" style="@style/info_value" /> + </LinearLayout> + + <!-- Network Identifier --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_current_network_label" style="@style/info_label" /> + <TextView android:id="@+id/operator" style="@style/info_value" /> + </LinearLayout> + + <!-- Ping stats --> + <Button android:id="@+id/ping_test" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/ping_test_label" + /> + + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_ping_ipaddr" style="@style/info_label" /> + <TextView android:id="@+id/pingIpAddr" style="@style/info_value" /> + </LinearLayout> + + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_ping_hostname" style="@style/info_label" /> + <TextView android:id="@+id/pingHostname" style="@style/info_value" /> + </LinearLayout> + + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_http_client_test" style="@style/info_label" /> + <TextView android:id="@+id/httpClientTest" style="@style/info_value" /> + </LinearLayout> + + <!-- Signal Strength --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_signal_strength_label" style="@style/info_label" /> + <TextView android:id="@+id/dbm" style="@style/info_value" /> + </LinearLayout> + + <!-- Location --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_signal_location_label" style="@style/info_label" /> + <TextView android:id="@+id/location" style="@style/info_value" /> + </LinearLayout> + + <!-- Neighboring Cids --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_neighboring_location_label" + style="@style/info_label" /> + <TextView android:id="@+id/neighboring" style="@style/info_value" /> + </LinearLayout> + + <!-- Roaming --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_roaming_label" style="@style/info_label" /> + <TextView android:id="@+id/roaming" style="@style/info_value" /> + </LinearLayout> + + <!-- GSM Service --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_gsm_service_label" style="@style/info_label" /> + <TextView android:id="@+id/gsm" style="@style/info_value" /> + </LinearLayout> + + <!-- GPRS Service --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_gprs_service_label" style="@style/info_label" /> + <TextView android:id="@+id/gprs" style="@style/info_value" /> + </LinearLayout> + + <!-- Network Type --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_network_type_label" style="@style/info_label" /> + <TextView android:id="@+id/network" style="@style/info_value" /> + </LinearLayout> + + <!-- Message Waiting Indicator --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_message_waiting_label" style="@style/info_label" /> + <TextView android:id="@+id/mwi" style="@style/info_value" /> + </LinearLayout> + + <!-- Call Forwarding Indicator --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_call_redirect_label" style="@style/info_label" /> + <TextView android:id="@+id/cfi" style="@style/info_value" /> + </LinearLayout> + + <!-- Call Status --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_call_status_label" style="@style/info_label" /> + <TextView android:id="@+id/call" style="@style/info_value" /> + </LinearLayout> + + + <!-- Radio Resets --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_radio_resets_label" style="@style/info_label" /> + <TextView android:id="@+id/resets" style="@style/info_value" /> + </LinearLayout> + + <!-- Attempted Data Connections --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_data_attempts_label" + style="@style/info_label" /> + <TextView android:id="@+id/attempts" style="@style/info_value" /> + </LinearLayout> + + <!-- Successful Data Connections --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_data_successes_label" + style="@style/info_label" /> + <TextView android:id="@+id/successes" style="@style/info_value" /> + </LinearLayout> + + <!-- GSM Disconnects --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_gsm_disconnects_label" + style="@style/info_label" /> + <TextView android:id="@+id/disconnects" style="@style/info_value" /> + </LinearLayout> + + <!-- PPP Sent --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_ppp_sent_label" + style="@style/info_label" /> + <TextView android:id="@+id/sent" style="@style/info_value" /> + </LinearLayout> + + <!-- PPP Received --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_ppp_received_label" + style="@style/info_label" /> + <TextView android:id="@+id/received" style="@style/info_value" /> + </LinearLayout> + + <!-- PPP Sent since last received --> + <LinearLayout style="@style/entry_layout"> + <TextView android:text="@string/radio_info_ppp_resets_label" + style="@style/info_label" /> + <TextView android:id="@+id/sentSinceReceived" style="@style/info_value" /> + </LinearLayout> + + <!-- Preferred Network Type --> + <TextView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/radio_info_set_perferred_label" + style="@style/info_label" + /> + + <Spinner android:id="@+id/preferredNetworkType" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + /> + + <!-- Ciphering --> + <LinearLayout style="@style/entry_layout"> + <Button android:id="@+id/ciph_toggle" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/radio_info_toggle_ciph_label" + /> + <TextView android:id="@+id/ciphState" style="@style/info_value" /> + + </LinearLayout> + + <!-- QXDM logging & radio power --> + <LinearLayout style="@style/entry_layout"> + <Button android:id="@+id/qxdm_log" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + /> + + <Button android:id="@+id/radio_power" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + /> + </LinearLayout> + + <!-- SMSC --> + <RelativeLayout android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <TextView android:id="@+id/smsc_label" + android:text="@string/radio_info_smsc_label" + android:layout_alignBaseline="@+id/update_smsc" + style="@style/info_label" /> + <Button android:id="@+id/refresh_smsc" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/radio_info_smsc_refresh_label" + android:layout_alignParentRight="true" + /> + <Button android:id="@+id/update_smsc" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/radio_info_smsc_update_label" + android:layout_toLeftOf="@+id/refresh_smsc" + android:layout_alignBaseline="@+id/refresh_smsc" + /> + <EditText android:id="@+id/smsc" + style="@style/form_value" + android:layout_alignBaseline="@+id/refresh_smsc" + android:layout_toLeftOf="@id/update_smsc" + android:layout_toRightOf="@id/smsc_label" /> + </RelativeLayout> + + </LinearLayout> +</ScrollView> diff --git a/res/layout/ringer_volume_screen.xml b/res/layout/ringer_volume_screen.xml new file mode 100644 index 0000000..aa06fa4 --- /dev/null +++ b/res/layout/ringer_volume_screen.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/ringer_volume_screen.xml +** +** Copyright 2006, 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="fill_parent" + android:layout_height="wrap_content" + android:scrollbars="none"> + + <LinearLayout + android:id="@+id/list" + android:orientation="vertical" + android:paddingLeft="10dip" + android:paddingTop="10dip" + android:paddingRight="10dip" + android:paddingBottom="10dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/ringer_volume_instructions" /> + + <LinearLayout + style="@style/entry_layout" + android:orientation="vertical" + android:layout_marginTop="20dip"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/ringer_volume_ringer_mode_label" /> + + <Spinner + android:id="@+id/ringer_mode" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <requestFocus /> + </Spinner> + + </LinearLayout> + + <LinearLayout + style="@style/entry_layout" + android:orientation="vertical" + android:layout_marginTop="20dip"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/ringer_volume_ringtone_label" /> + + <Spinner + android:id="@+id/file" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + </Spinner> + + </LinearLayout> + + <LinearLayout + style="@style/entry_layout" + android:orientation="vertical" + android:layout_marginTop="20dip"> + + <CheckBox + android:id="@+id/increasing" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/ringer_volume_screen_increasing_text" /> + + + + </LinearLayout> + + </LinearLayout> + +</ScrollView> diff --git a/res/layout/sdcard_settings_screen.xml b/res/layout/sdcard_settings_screen.xml new file mode 100644 index 0000000..52ef2fc --- /dev/null +++ b/res/layout/sdcard_settings_screen.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/res/layout/sdcard_settings_screen.xml +** +** Copyright 2007, 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:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + + <LinearLayout android:id="@+id/list" + android:orientation="vertical" + android:padding="10dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout android:id="@+id/usb" + android:orientation="vertical" + android:paddingBottom="10dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <CheckBox android:id="@+id/mass_storage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/sdcard_settings_screen_mass_storage_text"> + <requestFocus/> + </CheckBox> + + <TextView android:text="@string/sdcard_changes_instructions" style="@style/info_small" /> + </LinearLayout> + + <!-- divider line --> + <View android:background="#FF000000" + android:layout_width="fill_parent" + android:layout_height="1dip" /> + + <LinearLayout android:id="@+id/mounted" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="10dip"> + + <TextView android:id="@+id/read_only" + android:text="@string/sdcard_settings_read_only_status" + style="@style/info_label" /> + + <Button android:id="@+id/sdcard_unmount" + android:text="@string/sdcard_unmount" + android:textSize="14sp" + android:layout_marginTop="8dip" + android:layout_width="wrap_content" android:layout_height="wrap_content" /> + + <TableLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="10dip"> + <TableRow> + <TextView android:text="@string/sdcard_settings_total_bytes_label" style="@style/info_label" /> + <TextView android:id="@+id/total" style="@style/info_value" /> + </TableRow> + <TableRow> + <TextView android:text="@string/sdcard_settings_used_bytes_label" style="@style/info_label" /> + <TextView android:id="@+id/used" style="@style/info_value" /> + </TableRow> + <TableRow> + <TextView android:text="@string/sdcard_settings_available_bytes_label" style="@style/info_label" /> + <TextView android:id="@+id/available" style="@style/info_value" /> + </TableRow> + </TableLayout> + + </LinearLayout> + + <LinearLayout style="@style/entry_layout" + android:id="@+id/scanning" + android:paddingTop="10dip"> + <TextView android:text="@string/sdcard_settings_scanning_status" style="@style/info_label" /> + </LinearLayout> + + <LinearLayout style="@style/entry_layout" + android:id="@+id/removed" + android:paddingTop="10dip"> + <TextView android:text="@string/sdcard_settings_not_present_status" style="@style/info_label" /> + </LinearLayout> + + <LinearLayout android:id="@+id/shared" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="10dip"> + + <LinearLayout style="@style/entry_layout" > + <TextView android:text="@string/sdcard_settings_mass_storage_status" style="@style/info_label" /> + </LinearLayout> + + </LinearLayout> + + <LinearLayout style="@style/entry_layout" + android:id="@+id/unmounted" + android:paddingTop="10dip"> + <TextView android:text="@string/sdcard_settings_unmounted_status" style="@style/info_label" /> + </LinearLayout> + + <LinearLayout style="@style/entry_layout" + android:id="@+id/bad_removal" + android:paddingTop="10dip"> + <TextView android:text="@string/sdcard_settings_bad_removal_status" style="@style/info_label" /> + </LinearLayout> + + </LinearLayout> +</ScrollView> + diff --git a/res/layout/settings_chooser.xml b/res/layout/settings_chooser.xml new file mode 100644 index 0000000..ad79485 --- /dev/null +++ b/res/layout/settings_chooser.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- TODO: Remove file 881807 --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:text="@string/settings_chooser_pick_string" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:textStyle="bold" /> + + <Spinner + android:id="@+id/settings_app_spinner" + android:layout_marginLeft="20dip" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + +</LinearLayout> diff --git a/res/layout/systemsettings.xml b/res/layout/systemsettings.xml new file mode 100644 index 0000000..54bf896 --- /dev/null +++ b/res/layout/systemsettings.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- Layout for system settings that require an expandable list --> +<ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/system_settings" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> +</ExpandableListView> diff --git a/res/layout/systemsettings_flat.xml b/res/layout/systemsettings_flat.xml new file mode 100644 index 0000000..0d0126b --- /dev/null +++ b/res/layout/systemsettings_flat.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<!-- Layout for system settings that require a flat list --> +<ListView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/system_settings" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> +</ListView> diff --git a/res/layout/telephony_editor.xml b/res/layout/telephony_editor.xml new file mode 100644 index 0000000..1721478 --- /dev/null +++ b/res/layout/telephony_editor.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/radio_info.xml +** +** Copyright 2006, 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="fill_parent" + android:layout_height="fill_parent"> + + <LinearLayout style="@style/form_layout"> + <TextView android:text="@string/telephony_name_label" style="@style/form_label" /> + <EditText android:id="@+id/name" style="@style/form_value" /> + + <TextView android:text="@string/telephony_apn_label" style="@style/form_label" /> + <EditText android:id="@+id/apn" style="@style/form_value" /> + + <TextView android:text="@string/telephony_proxy_label" style="@style/form_label" /> + <EditText android:id="@+id/proxy" style="@style/form_value" /> + + <TextView android:text="@string/telephony_port_label" style="@style/form_label" /> + <EditText android:id="@+id/port" style="@style/form_value" /> + + <TextView android:text="@string/telephony_user_label" style="@style/form_label" /> + <EditText android:id="@+id/user" style="@style/form_value" /> + + <TextView android:text="@string/telephony_server_label" style="@style/form_label" /> + <EditText android:id="@+id/server" style="@style/form_value" /> + + <TextView android:text="@string/telephony_password_label" style="@style/form_label" /> + <EditText android:id="@+id/password" style="@style/form_value" /> + + <TextView android:text="@string/telephony_mmsproxy_label" style="@style/form_label" /> + <EditText android:id="@+id/mmsproxy" style="@style/form_value" /> + + <TextView android:text="@string/telephony_mmsport_label" style="@style/form_label" /> + <EditText android:id="@+id/mmsport" style="@style/form_value" /> + + <TextView android:text="@string/telephony_mmsc_label" style="@style/form_label" /> + <EditText android:id="@+id/mmsc" style="@style/form_value" /> + + <TextView android:text="@string/telephony_mcc_label" style="@style/form_label" /> + <EditText android:id="@+id/mcc" style="@style/form_value" /> + + <TextView android:text="@string/telephony_mnc_label" style="@style/form_label" /> + <EditText android:id="@+id/mnc" style="@style/form_value" /> + </LinearLayout> +</ScrollView> + + diff --git a/res/layout/time_picker_activity.xml b/res/layout/time_picker_activity.xml new file mode 100644 index 0000000..6e758a1 --- /dev/null +++ b/res/layout/time_picker_activity.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2007, 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. +*/ +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <TimePicker android:id="@+id/timePicker" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> +</RelativeLayout> diff --git a/res/layout/wallpaper_picker.xml b/res/layout/wallpaper_picker.xml new file mode 100644 index 0000000..f95043f --- /dev/null +++ b/res/layout/wallpaper_picker.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/grid" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:padding="10dip" + android:verticalSpacing="10dp" + android:horizontalSpacing="10dp" + android:numColumns="auto_fit" + android:columnWidth="60dp" + android:stretchMode="columnWidth" + android:gravity="top|center_horizontal" + android:fadingEdge="none"/> diff --git a/res/layout/wifi_ap_configure.xml b/res/layout/wifi_ap_configure.xml new file mode 100644 index 0000000..d786cff --- /dev/null +++ b/res/layout/wifi_ap_configure.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:padding="8dip" + android:orientation="vertical"> + + + + <!-- SSID --> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/wifi_type_ssid" /> + + <EditText android:id="@+id/ssid_edit" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:singleLine="true" /> + + + + <!-- Security --> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/wifi_security" /> + + <!-- The entries will be set programmatically --> + <Spinner android:id="@+id/security_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" /> + + + + <!-- Password --> + + <TextView android:id="@+id/password_text" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/please_type_passphrase" /> + + <EditText android:id="@+id/password_edit" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:singleLine="true" + android:password="true" /> + + <CheckBox android:id="@+id/show_password_checkbox" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:text="@string/wifi_show_password" /> + + <Spinner android:id="@+id/wep_type_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:entries="@array/wifi_wep_type" /> + + </LinearLayout> + +</ScrollView> diff --git a/res/layout/wifi_ap_info.xml b/res/layout/wifi_ap_info.xml new file mode 100644 index 0000000..8c430fc --- /dev/null +++ b/res/layout/wifi_ap_info.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:padding="8dip" + android:orientation="vertical"> + + <LinearLayout + android:id="@+id/table" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical"> + + <!-- Info dynamically added here. --> + + </LinearLayout> + + <!-- Password --> + <TextView android:id="@+id/password_text" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/please_type_passphrase" /> + + <EditText android:id="@+id/password_edit" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:singleLine="true" + android:password="true" /> + + <CheckBox android:id="@+id/show_password_checkbox" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:text="@string/wifi_show_password" /> + + </LinearLayout> + +</ScrollView> diff --git a/res/layout/wifi_ap_info_row.xml b/res/layout/wifi_ap_info_row.xml new file mode 100644 index 0000000..79064b0 --- /dev/null +++ b/res/layout/wifi_ap_info_row.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <TextView + android:id="@+id/name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="8dip" + android:textAppearance="?android:attr/textAppearanceSmallInverse" /> + <TextView + android:id="@+id/value" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmallInverse" + android:textStyle="bold" /> +</LinearLayout> diff --git a/res/layout/wifi_ap_retry_password.xml b/res/layout/wifi_ap_retry_password.xml new file mode 100644 index 0000000..14a4eae --- /dev/null +++ b/res/layout/wifi_ap_retry_password.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:padding="8dip" + android:orientation="vertical"> + + <TextView + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/wifi_password_incorrect_error" /> + + <!-- Password --> + <TextView android:id="@+id/password_text" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/please_type_passphrase" /> + + <EditText android:id="@+id/password_edit" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:singleLine="true" + android:password="true" /> + + <CheckBox android:id="@+id/show_password_checkbox" + style="?android:attr/textAppearanceSmallInverse" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dip" + android:text="@string/wifi_show_password" /> + + </LinearLayout> + +</ScrollView> diff --git a/res/layout/wifi_screen.xml b/res/layout/wifi_screen.xml new file mode 100644 index 0000000..a247f85 --- /dev/null +++ b/res/layout/wifi_screen.xml @@ -0,0 +1,228 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Settings/assets/res/any/layout/wifi_screen.xml +** +** Copyright 2007, 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. +*/ +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:paddingLeft="2dip" + android:paddingRight="2dip"> + + <LinearLayout + android:orientation="vertical" + android:paddingLeft="6dip" + android:paddingRight="6dip" + android:paddingBottom="3dip" + android:layout_width="fill_parent" android:layout_height="wrap_content"> + + <TextView android:id="@+id/status" + android:textSize="13sp" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/wifi_screen_status_text" /> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <CheckBox android:id="@+id/dhcp" + android:textSize="13sp" + android:layout_width="100dip" + android:layout_height="wrap_content" + android:text="@string/wifi_screen_dhcp_text" /> + + <CheckBox android:id="@+id/manual" + android:textSize="13sp" + android:layout_width="100dip" + android:layout_height="wrap_content" + android:text="@string/wifi_screen_manual_text" /> + + </LinearLayout> + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <TextView + android:textSize="13sp" + android:textStyle="bold" + android:paddingTop="6dip" + android:maxLines="1" + android:layout_width="60dip" android:layout_height="wrap_content" + android:text="@string/wifi_wlan_id" /> + + <Spinner android:id="@+id/essid" + android:textSize="13sp" + android:maxLines="1" + android:layout_marginLeft="3dip" + android:layout_width="150dip" + android:layout_height="wrap_content"> + <requestFocus/> + </Spinner> + + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <Button android:id="@+id/activate" + android:textSize="13sp" + android:layout_marginTop="2dip" + android:layout_width="100dip" android:layout_height="wrap_content" + android:text="@string/wifi_screen_activate_text" /> + + <Button android:id="@+id/test" + android:textSize="13sp" + android:layout_marginTop="2dip" + android:layout_width="100dip" android:layout_height="wrap_content" + android:text="@string/wifi_screen_test_text" /> + + </LinearLayout> + + <LinearLayout android:id="@+id/manualconfig" + android:orientation="vertical" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingBottom="3dip" + android:layout_width="fill_parent" android:layout_height="wrap_content"> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <TextView + android:textSize="13sp" + android:textStyle="bold" + android:paddingTop="6dip" + android:maxLines="1" + android:layout_width="60dip" android:layout_height="wrap_content" + android:text="@string/wifi_host_ip" /> + + <EditText android:id="@+id/ip" + android:textSize="13sp" + android:maxLines="1" + android:layout_marginLeft="3dip" + android:autoText="false" + android:capitalize="none" + android:layout_width="150dip" android:layout_height="wrap_content" + android:text="@string/wifi_screen_ip_text" /> + + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <TextView + android:textSize="13sp" + android:textStyle="bold" + android:paddingTop="6dip" + android:maxLines="1" + android:layout_width="60dip" android:layout_height="wrap_content" + android:text="@string/wifi_netmask_label" /> + + <EditText android:id="@+id/netmask" + android:textSize="13sp" + android:maxLines="1" + android:layout_marginLeft="3dip" + android:layout_width="150dip" android:layout_height="wrap_content" + android:autoText="false" + android:capitalize="none" + android:text="@string/wifi_screen_netmask_text" /> + + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <TextView + android:textSize="13sp" + android:textStyle="bold" + android:paddingTop="6dip" + android:maxLines="1" + android:layout_width="60dip" android:layout_height="wrap_content" + android:text="@string/wifi_gateway_label" /> + + <EditText android:id="@+id/gateway" + android:textSize="13sp" + android:maxLines="1" + android:layout_marginLeft="3dip" + android:layout_width="150dip" android:layout_height="wrap_content" + android:autoText="false" + android:capitalize="none" + android:text="@string/wifi_screen_gateway_text" /> + + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:paddingLeft="3dip" + android:paddingRight="3dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" + android:layout_height="wrap_content" android:layout_width="fill_parent"> + + <TextView + android:textSize="13sp" + android:textStyle="bold" + android:paddingTop="6dip" + android:maxLines="1" + android:layout_width="60dip" android:layout_height="wrap_content" + android:text="@string/wifi_dns_label" /> + + <EditText android:id="@+id/dns" + android:textSize="13sp" + android:maxLines="1" + android:layout_marginLeft="3dip" + android:layout_width="150dip" android:layout_height="wrap_content" + android:autoText="false" + android:capitalize="none" + android:text="@string/wifi_screen_dns_text" /> + + </LinearLayout> + + </LinearLayout> + + + </LinearLayout> +</FrameLayout> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml new file mode 100644 index 0000000..f68a0ed --- /dev/null +++ b/res/values-cs/strings.xml @@ -0,0 +1,445 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="activity_picker_label">Vybrat činnost</string> + <string name="airplane_mode">Režim Letadlo</string> + <string name="android_id_label">ID Android</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Upravit přístupový bod</string> + <string name="apn_http_port">Port</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">Port MMS</string> + <string name="apn_mms_proxy">Proxy MMS</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Název</string> + <string name="apn_not_set"><Nenastaveno></string> + <string name="apn_password">Heslo</string> + <string name="apn_server">Server</string> + <string name="apn_settings">APN</string> + <string name="apn_user">Uživatelské jméno</string> + <string name="app_launcher_newView_text">Nový panel spouštění aplikací</string> + <string name="band_mode_failed">Neúspěch</string> + <string name="band_mode_loading">Načítá se seznam pásem\u2026</string> + <string name="band_mode_set">Nastavit</string> + <string name="band_mode_succeeded">Úspěch</string> + <string name="band_mode_title">Nastavit pásmo GSM/UMTS</string> + <string name="baseband_version">Verze základního pásma</string> + <string name="basic_settings_title">Základní nastavení</string> + <string name="battery_info_health_dead">Vybitá</string> + <string name="battery_info_health_good">Dobrý</string> + <string name="battery_info_health_label">Stav baterie:</string> + <string name="battery_info_health_over_voltage">Přepětí</string> + <string name="battery_info_health_overheat">Přehřátí</string> + <string name="battery_info_health_unknown">Neznámý</string> + <string name="battery_info_health_unspecified_failure">Nespecifikované selhání</string> + <string name="battery_info_label">Informace o baterii</string> + <string name="battery_info_level_label">Úroveň nabití baterie:</string> + <string name="battery_info_scale_label">Stupnice baterie:</string> + <string name="battery_info_status_charging">Nabíjení</string> + <string name="battery_info_status_charging_ac">(STŘ)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Vybíjení</string> + <string name="battery_info_status_full">Plná</string> + <string name="battery_info_status_label">Stav baterie:</string> + <string name="battery_info_status_not_charging">Bez nabíjení</string> + <string name="battery_info_status_unknown">Neznámý</string> + <string name="battery_info_technology_label">Technologie baterie:</string> + <string name="battery_info_temperature_label">Teplota baterie:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_voltage_label">Napětí baterie:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Vymazat seznam zařízení</string> + <string name="bluetooth_connectable">Pouze připojitelné</string> + <string name="bluetooth_connected">Připojeno</string> + <string name="bluetooth_connecting">Připojování\u2026</string> + <string name="bluetooth_device">handsfree / sluchátko s mikrofonem</string> + <string name="bluetooth_device_info">Informace o zařízení Bluetooth</string> + <string name="bluetooth_device_info_alias">Název zařízení</string> + <string name="bluetooth_device_info_delete">Odebrat zařízení</string> + <string name="bluetooth_device_info_no_alias">Zde zadejte název\u2026</string> + <string name="bluetooth_device_info_sdp">Seznam podporovaných služeb</string> + <string name="bluetooth_device_name">Název zařízení</string> + <string name="bluetooth_devices">Zařízení Bluetooth</string> + <string name="bluetooth_disabled">Připojení Bluetooth je vypnuto</string> + <string name="bluetooth_disconnect_blank">Odpojit %1$s?</string> + <string name="bluetooth_discoverability_panel_title">Zjišťování zařízení\u2026</string> + <string name="bluetooth_discoverable">Zjistitelné a připojitelné</string> + <string name="bluetooth_enable_text">Prázdné tlačítko\u2026</string> + <string name="bluetooth_enabled">Připojení Bluetooth je zapnuto</string> + <string name="bluetooth_enabling">Aktivace připojení Bluetooth\u2026</string> + <string name="bluetooth_enter_pin_msg">Zadejte kód PIN pro </string> + <string name="bluetooth_is_discoverable">Zařízení je zjistitelné</string> + <string name="bluetooth_name_not_set">Název není nastaven, používá se název účtu</string> + <string name="bluetooth_neither">Nezjistitelné a nepřipojitelné</string> + <string name="bluetooth_new_data">Zadejte nová data</string> + <string name="bluetooth_new_data_cancel">Storno</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_not_connected">Nepřipojeno</string> + <string name="bluetooth_not_discoverable">Zařízení není zjistitelné</string> + <string name="bluetooth_paired">Spárováno</string> + <string name="bluetooth_pairing_msg">Párování\u2026</string> + <string name="bluetooth_pin_entry">Zadání kódu PIN Bluetooth</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Vyhledat zařízení Bluetooth</string> + <string name="bluetooth_scan_for_new_devices">Probíhá vyhledávání nových zařízení\u2026</string> + <string name="bluetooth_scan_text">Prázdné tlačítko\u2026</string> + <string name="bluetooth_settings_text">Prázdné tlačítko\u2026</string> + <string name="bluetooth_settings_title">Nastavení Bluetooth</string> + <string name="bluetooth_starting">Spouštění připojení Bluetooth\u2026</string> + <string name="bluetooth_stopping">Ukončování připojení Bluetooth\u2026</string> + <string name="bluetooth_title">Bluetooth</string> + <string name="bluetooth_unknown">Neznámý</string> + <string name="bluetooth_visibility">Viditelnost</string> + <string name="bootloader_version">Verze spouštěcího zavaděče</string> + <string name="brightness">Jas</string> + <string name="build_date_label">Sestavit datum</string> + <string name="build_description_label">Sestavit popis</string> + <string name="build_host_label">Sestavit hostitele</string> + <string name="build_id_label">Sestavit ID</string> + <string name="build_type_label">Sestavit typ</string> + <string name="build_user_label">Sestavit uživatele</string> + <string name="call_settings_title">Nastavení volání</string> + <string name="cancel">Storno</string> + <string name="checkin_button_label">Zjistit aktualizace</string> + <string name="checkin_download_failed_status">Stažení se nezdařilo</string> + <string name="checkin_download_label">Stav stahování</string> + <string name="checkin_download_ongoing_status">Stahování\u2026</string> + <string name="checkin_download_succeeded_status">Stažení bylo úspěšné, ověřování\u2026</string> + <string name="checkin_download_suspended_status">Stahování pozastaveno</string> + <string name="checkin_download_unknown_status">Neznámý stav</string> + <string name="checkin_failures_label">Nezdařené pokusy od posledního úspěchu</string> + <string name="checkin_last_time_label">Poslední úspěšné odbavení</string> + <string name="checkin_status_label">Stav odbavení</string> + <string name="checkin_time_never">(nikdy)</string> + <string name="checkin_upgrade_label">Aktualizace čekající na dokončení</string> + <string name="choose_timezone">Vybrat časové pásmo</string> + <string name="choose_timezone_region">Vybrat oblast</string> + <string name="connect">Připojit</string> + <string name="connect_to_blank">Připojit k %1$s</string> + <string name="date_and_time">Datum a čas</string> + <string name="date_and_time_settings_title">Datum a čas</string> + <string name="date_time_24hour">24hodinový formát</string> + <string name="date_time_auto">Automaticky</string> + <string name="date_time_auto_summaryOff">Použít hodnoty vybrané uživatelem</string> + <string name="date_time_auto_summaryOn">Použít hodnoty zjištěné ze sítě</string> + <string name="date_time_changeDate_text">Změnit datum</string> + <string name="date_time_changeTime_text">Změnit čas</string> + <string name="date_time_dateDisplay_text">3. listopadu 1997</string> + <string name="date_time_date_format">Nastavit formát data</string> + <string name="date_time_set_date">Nastavit datum</string> + <string name="date_time_set_time">Nastavit čas</string> + <string name="date_time_set_timezone">Nastavit časové pásmo</string> + <string name="date_time_setzone_text">Změnit časové pásmo</string> + <string name="date_time_timeDisplay_text">11:45 dop.</string> + <string name="date_time_timezone_label">Časové pásmo:</string> + <string name="debug_intent_sender_label">Debug intent sender</string> + <string name="default_date_format">dd.MM.yyyy</string> + <string name="default_keyboard_device_label">Výchozí zařízení klávesnice</string> + <string name="device_info_asleeptime">Čas přechodu do režimu spánku</string> + <string name="device_info_awaketime">Čas probuzení</string> + <string name="device_info_default">Neznámý</string> + <string name="device_info_label">Informace o zařízení</string> + <string name="device_info_settings">Informace o zařízení</string> + <string name="device_info_uptime">Doba provozu</string> + <string name="device_memory">Paměť</string> + <string name="device_memory_summary">Vnitřní paměť, paměťová karta SD</string> + <string name="device_status">Stav</string> + <string name="device_status_summary">IMEI, telefonní číslo, signál atd.</string> + <string name="dim_screen">Ztlumit obrazovku</string> + <string name="disconnect_ums">Odpojit velkokapacitní paměťové zařízení USB</string> + <string name="display_font_size_label">Velikost písma:</string> + <string name="display_label">Displej</string> + <string name="display_preview_label">Náhled:</string> + <string name="display_settings">Displej</string> + <string name="done">OK</string> + <string name="error_apn_empty">Název přístupového bodu nemůže být prázdný</string> + <string name="error_connecting">Chyba při připojování k síti</string> + <string name="error_mcc_not3">Pole MCC musí obsahovat 3 číslice</string> + <string name="error_mnc_not23">Pole MNC musí obsahovat 2 nebo 3 číslice</string> + <string name="error_name_empty">Název nemůže být prázdný</string> + <string name="error_saving">Chyba při ukládání sítě</string> + <string name="error_scanning">Chyba při vyhledávání sítí</string> + <string name="error_starting">Chyba při spouštění Wi-Fi</string> + <string name="error_stopping">Chyba při ukončování Wi-Fi</string> + <string name="error_title">Neplatná data</string> + <string name="failed_to_connect">Chyba při připojování k\u0020</string> + <string name="favorites_label">Oblíbené položky</string> + <string name="firmware_version">Verze firmwaru</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + <string name="forget_network">Zapomenout</string> + <string name="fragment_status_authenticating">Ověřování u %1$s</string> + <string name="fragment_status_connected">Připojeno k %1$s</string> + <string name="fragment_status_connecting">Připojování k %1$s</string> + <string name="fragment_status_disconnected">Odpojeno</string> + <string name="fragment_status_disconnecting">Odpojování od %1$s</string> + <string name="fragment_status_failed">Neúspěch</string> + <string name="fragment_status_obtaining_ip">Získávání adresy IP od %1$s</string> + <string name="fragment_status_scanning">Vyhledávání</string> + <string name="gsm_version_baseband_label">Verze základního pásma</string> + <string name="gsm_version_ril_impl_label">Verze RIL Impl</string> + <string name="intent_sender_account_label">Účet: </string> + <string name="intent_sender_action_label">Akce:</string> + <string name="intent_sender_data_label">Data:</string> + <string name="intent_sender_resource_label">Prostředek: </string> + <string name="intent_sender_sendbroadcast_text">Odeslat vysílání</string> + <string name="intent_sender_startactivity_text">Zahájit činnost</string> + <string name="ip_address">Adresa IP</string> + <string name="kernel_version_label">Verze jádra Linux</string> + <string name="keyguard_label">Zámek kláves</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Potvrzení nového hesla:</string> + <string name="keyguard_password_mismatch_error_text">Zadaná hesla neodpovídají! Zadejte hesla znovu</string> + <string name="keyguard_password_new_label">Nové heslo:</string> + <string name="keyguard_password_old_label">Původní heslo:</string> + <string name="keyguard_password_old_password_error_text">Zadané původní heslo je nesprávné! Opakujte akci</string> + <string name="keyguard_pin_mod_text">Změnit kód PIN</string> + <string name="keyguard_pw_mod_text">Vybrat vzor pro uzamčení</string> + <string name="keyguard_sim_pin_label">Kód PIN karty SIM</string> + <string name="language_picker_title">Jazyk</string> + <string name="large_font">Velký</string> + <string name="location_gps">Podle GPS</string> + <string name="location_label">Poskytovatel polohy:</string> + <string name="location_neighborhood_level">Přesnost na úroveň okolí</string> + <string name="location_network_based">Podle sítě</string> + <string name="location_source">Přesnost polohy</string> + <string name="location_status">Stav:</string> + <string name="location_street_level">Přesnost na úroveň ulic</string> + <string name="lock_settings_title">Speciální tah pro uzamčení</string> + <string name="lockpattern_change_lock_pattern_label">Změnit vzor pro uzamčení</string> + <string name="lockpattern_confirm_button_text">Potvrdit</string> + <string name="lockpattern_need_to_unlock">Potvrzení uloženého vzoru:</string> + <string name="lockpattern_need_to_unlock_wrong">Nesprávně! Opakujte akci:</string> + <string name="lockpattern_pattern_confirmed_header">Nový vzor pro uzamčení:</string> + <string name="lockpattern_pattern_entered_header">Vybrali jste:</string> + <string name="lockpattern_recording_incorrect_less_than_three">Nesprávně! Musíte táhnout přes nejméně tři body</string> + <string name="lockpattern_recording_inprogress">Po skončení uvolněte prst</string> + <string name="lockpattern_recording_intro_footer">Stisknutím tlačítka Nabídka zobrazíte nápovědu</string> + <string name="lockpattern_recording_intro_header">Nakreslete vzor, který bude použit jako kódový zámek:</string> + <string name="lockpattern_restart_button_text">Restartovat</string> + <string name="lockpattern_settings_change_lock_pattern">Změnit vzor speciálního tahu pro uzamčení</string> + <string name="lockpattern_settings_choose_lock_pattern">Vybrat vzor speciálního tahu pro uzamčení</string> + <string name="lockpattern_settings_enable_summary">K odemčení požadovat speciální tah</string> + <string name="lockpattern_settings_enable_title">Speciální tah pro uzamčení</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Použít viditelný vzor</string> + <string name="lockpattern_settings_help_how_to_record">Jak zaznamenat vzor pro uzamčení</string> + <string name="lockpattern_settings_title">Speciální tah pro uzamčení</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Opakujte akci za <xliff:g id="number">%d</xliff:g> sekund</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Příliš mnoho nesprávných pokusů o potvrzení</string> + <string name="master_clear_button_text">Resetujte zařízení</string> + <string name="master_clear_desc">Resetuje zařízení do původního stavu z výroby, vymaže všechna data a stažené aplikace</string> + <string name="master_clear_failed">Reset nebyl proveden, protože služba Vymazání systému není k dispozici</string> + <string name="master_clear_final_button_text">Vymazat vše</string> + <string name="master_clear_final_desc">Chcete resetovat zařízení a vymazat všechna data a aplikace? Tuto akci nelze vrátit zpět!</string> + <string name="master_clear_gesture_explanation">Reset zařízení je nutné potvrdit nakreslením vzoru pro uzamčení</string> + <string name="master_clear_gesture_prompt">Nakreslete vzor pro uzamčení</string> + <string name="master_clear_title">Hlavní vymazání</string> + <string name="medium_font">Střední</string> + <string name="menu_cancel">Zrušit</string> + <string name="menu_delete">Odstranit APN</string> + <string name="menu_new">Nový APN</string> + <string name="menu_save">Uložit</string> + <string name="mobile_network">Mobilní síť</string> + <string name="network_settings_title">Nastavení sítě</string> + <string name="next_label">Další</string> + <string name="notification_sound_dialog_title">Vybrat vyzváněcí tóny oznámení</string> + <string name="notification_sound_title">Vyzváněcí tóny oznámení</string> + <string name="phone_info_label">Informace o telefonu</string> + <string name="please_type_passphrase">Zadejte heslo bezdrátového připojení</string> + <string name="power_management_label">Řízení spotřeby</string> + <string name="progress_scanning">Vyhledávání</string> + <string name="proxy_action_text">Uložit</string> + <string name="proxy_clear_text">Vymazat</string> + <string name="proxy_defaultView_text">Obnovit výchozí</string> + <string name="proxy_error">Upozornění!</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_empty_host_set_port">Pokud je pole hostitele prázdné, pole portu musí být rovněž prázdné</string> + <string name="proxy_error_empty_port">Je nutné vyplnit pole portu</string> + <string name="proxy_error_invalid_host">Zadaný název hostitele není platný</string> + <string name="proxy_error_invalid_port">Zadaný port není platný</string> + <string name="proxy_hostname_label">Název hostitele</string> + <string name="proxy_port_label">Port</string> + <string name="proxy_settings_label">Nastavení serveru proxy</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Připojeno</string> + <string name="radioInfo_data_connecting">Připojování</string> + <string name="radioInfo_data_disconnected">Odpojeno</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">bajtů</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">paketů</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Zakázat datové připojení</string> + <string name="radioInfo_menu_enableData">Povolit datové připojení</string> + <string name="radioInfo_menu_getPDP">Získání seznamu PDP</string> + <string name="radioInfo_menu_viewADN">Zobrazit adresář karty SIM</string> + <string name="radioInfo_menu_viewFDN">Zobrazit povolená čísla</string> + <string name="radioInfo_menu_viewSDN">Zobrazit čísla servisu</string> + <string name="radioInfo_phone_idle">Nečinný</string> + <string name="radioInfo_phone_offhook">Probíhá hovor</string> + <string name="radioInfo_phone_ringing">Vyzvánění</string> + <string name="radioInfo_roaming_in">Roaming</string> + <string name="radioInfo_roaming_not">Bez roamingu</string> + <string name="radioInfo_service_emergency">Pouze tísňová volání</string> + <string name="radioInfo_service_in">V provozu</string> + <string name="radioInfo_service_off">Rádio vypnuto</string> + <string name="radioInfo_service_out">Mimo provoz</string> + <string name="radioInfo_unknown">neznámý</string> + <string name="radio_info_band_mode_label">Vybrat rádiové pásmo</string> + <string name="radio_info_call_redirect_label">Přesměrování hovoru:</string> + <string name="radio_info_call_status_label">Stav hovoru:</string> + <string name="radio_info_current_network_label">Aktuální síť:</string> + <string name="radio_info_data_attempts_label">Pokusy o přenos dat:</string> + <string name="radio_info_data_successes_label">Úspěšné (data):</string> + <string name="radio_info_gprs_service_label">Služba GPRS:</string> + <string name="radio_info_gsm_disconnects_label">Odpojení sítě GSM:</string> + <string name="radio_info_gsm_service_label">Služba GSM:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">Čekající zpráva:</string> + <string name="radio_info_neighboring_location_label">Sousední CID:</string> + <string name="radio_info_network_type_label">Typ sítě:</string> + <string name="radio_info_phone_number_label">Telefonní číslo:</string> + <string name="radio_info_ppp_received_label">Přijaté PPP:</string> + <string name="radio_info_ppp_resets_label">Počet resetování PPP od spuštění:</string> + <string name="radio_info_ppp_sent_label">Odeslané PPP:</string> + <string name="radio_info_radio_resets_label">Resetování rádia:</string> + <string name="radio_info_roaming_label">Roaming:</string> + <string name="radio_info_set_perferred_label">Nastavte upřednostňovaný typ sítě:</string> + <string name="radio_info_signal_location_label">Umístění:</string> + <string name="radio_info_signal_strength_label">Síla signálu:</string> + <string name="read_only">\u0020(jen pro čtení)</string> + <string name="ring_volume_title">Hlasitost vyzvánění</string> + <string name="ringer_volume_instructions">Hlasitost vyzvánění lze nastavit tlačítky pro hlasitost</string> + <string name="ringer_volume_ringer_mode_label">Režim vyzvánění</string> + <string name="ringer_volume_ringtone_label">Vyzv. tón</string> + <string name="ringer_volume_screen_increasing_text">Zesilující vyzvánění</string> + <string name="ringtone_title">Vyzváněcí tón telefonu</string> + <string name="scan_wifi">Vyhledat</string> + <string name="screen_off_timeout_label">Časový limit pro vypnutí obrazovky</string> + <string name="sd_card_settings_label">Karta SD</string> + <string name="sd_unavailable">Nedostupný</string> + <string name="sdcard_changes_instructions">Změny se projeví po opětovném připojení kabelu USB</string> + <string name="sdcard_removal_alert_ok">OK</string> + <string name="sdcard_removal_alert_scolding">Karta SD byla vyjmuta během používání! + Chcete-li zamezit poškození karty SD, před vyjmutím ji odinstalujte na obrazovce Nastavení karty SD</string> + <string name="sdcard_removal_alert_title">Nesprávné vyjmutí karty SD</string> + <string name="sdcard_setting">Karta SD</string> + <string name="sdcard_settings_available_bytes_label">Bajty k dispozici:</string> + <string name="sdcard_settings_bad_removal_status">Karta SD byla vyjmuta během používání!</string> + <string name="sdcard_settings_mass_storage_status">Karta SD se právě používá jako velkokapacitní paměťové zařízení</string> + <string name="sdcard_settings_not_present_status">Karta SD chybí</string> + <string name="sdcard_settings_read_only_status">Vložená karta SD je pouze pro čtení</string> + <string name="sdcard_settings_scanning_status">Vyhledávání médií na kartě SD\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">Povolit velkokapacitní paměťové zařízení USB</string> + <string name="sdcard_settings_total_bytes_label">Celkem bajtů:</string> + <string name="sdcard_settings_unmounted_status">Nyní můžete kartu SD bezpečně vyjmout ze zařízení</string> + <string name="sdcard_settings_used_bytes_label">Použité bajty:</string> + <string name="sdcard_unmount">Odinstalovat kartu SD</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + <string name="sdcard_unmountable_alert_title">Karta SD je nečitelná</string> + <string name="sdcard_unmountable_message">Kartu SD nelze přečíst. + Pravděpodobně je poškozen systém souborů nebo je karta vadná</string> + <string name="security">Zabezpečení</string> + <string name="security_label">Zabezpečení</string> + <string name="settings_chooser_pick_string"> + Předat dál ikonu nastavení: +</string> + <string name="settings_label">Nastavení</string> + <string name="signal">Síla signálu</string> + <string name="silent_mode_title">Tichý režim</string> + <string name="sim_bad_pin">Upozornění: Nesprávný kód PIN</string> + <string name="sim_change_failed">Změna kódu PIN se nezdařila\nPravděpodobně nesprávný kód PIN</string> + <string name="sim_change_pin">Změnit kód PIN karty SIM</string> + <string name="sim_change_succeeded">Kód PIN karty SIM úspěšně změněn</string> + <string name="sim_disable_sim_lock">Zakázat zámek karty SIM</string> + <string name="sim_enable_sim_lock">Povolit zámek karty SIM</string> + <string name="sim_enter_cancel">Storno</string> + <string name="sim_enter_new">Zadejte nový kód PIN</string> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_old">Zadejte původní kód PIN</string> + <string name="sim_enter_pin">Zadejte kód PIN karty SIM</string> + <string name="sim_lock_failed">Změna stavu zámku karty SIM se nezdařila\nPravděpodobně nesprávný kód PIN</string> + <string name="sim_lock_off">Zámek karty SIM je vypnutý</string> + <string name="sim_lock_on">Zámek karty SIM je zapnutý</string> + <string name="sim_lock_settings">Zámek karty SIM</string> + <string name="sim_lock_settings_title">Nastavení zámku karty SIM</string> + <string name="sim_pin_change">Změnit kód PIN</string> + <string name="sim_pin_toggle">Zámek karty SIM</string> + <string name="sim_pins_dont_match">Upozornění: Kódy PIN neodpovídají</string> + <string name="sim_reenter_new">Zadejte nový kód PIN znovu</string> + <string name="small_font">Malá</string> + <string name="software_version">Verze softwaru</string> + <string name="sound_and_alerts_settings">Zvuk</string> + <string name="status_authenticating">Ověřování</string> + <string name="status_awake_time">Čas probuzení</string> + <string name="status_connected">Připojeno</string> + <string name="status_connecting">Připojování</string> + <string name="status_data_state">Přístup k datům</string> + <string name="status_disconnected">Odpojeno</string> + <string name="status_disconnecting">Odpojování</string> + <string name="status_failed">Neúspěch</string> + <string name="status_imei">IMEI</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Typ sítě</string> + <string name="status_number">Telefonní číslo</string> + <string name="status_obtaining_ip">Získávání adresy IP</string> + <string name="status_operator">Síť</string> + <string name="status_roaming">Roaming</string> + <string name="status_scanning">Vyhledávání</string> + <string name="status_service_state">Stav služby</string> + <string name="status_signal_strength">Síla signálu</string> + <string name="status_up_time">Doba provozu</string> + <string name="stay_on">Během připojení nevypínejte zařízení</string> + <string name="summary_not_in_range">Není v dosahu</string> + <string name="summary_remembered">Zapamatováno</string> + <string name="sync_calendar">Kalendář</string> + <string name="sync_contacts">Kontakty</string> + <string name="sync_disabled">Vypnuto</string> + <string name="sync_enabled">Synchronizace se serverem Google povolena</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_menu_sync_cancel">Zrušit synchronizaci</string> + <string name="sync_menu_sync_now">Synchronizovat</string> + <string name="sync_settings">Synchronizace</string> + <string name="target_build_field_label">Požadované sestavení typu</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">Port MMS:</string> + <string name="telephony_mmsproxy_label">Proxy MMS:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">Jméno:</string> + <string name="telephony_password_label">Heslo:</string> + <string name="telephony_port_label">Port:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">Server:</string> + <string name="telephony_user_label">Uživatel:</string> + <string name="turn_off_qxdm">Zakázat protokol QXDM SD</string> + <string name="turn_off_radio">Vypnout rádio</string> + <string name="turn_on_qxdm">Povolit protokol QXDM SD</string> + <string name="turn_on_radio">Zapnout rádio</string> + <string name="underdeveloped_settings_label">Underdeveloped settings</string> + <string name="wallpaper_label">Tapeta</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Sítě</string> + <string name="wifi_dns_label">dns:</string> + <string name="wifi_gateway_label">brána:</string> + <string name="wifi_host_ip">IP hostitele:</string> + <string name="wifi_netmask_label">maska sítě:</string> + <string name="wifi_prefer_wifi">Upřednostňovat Wi-Fi</string> + <string name="wifi_screen_activate_text">Aktivovat</string> + <string name="wifi_screen_dhcp_text">automaticky</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">ručně</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi je v provozu</string> + <string name="wifi_screen_test_text">Test</string> + <string name="wifi_settings">Nastavení Wi-Fi</string> + <string name="wifi_wlan_id">Id sítě wlan:</string> +</resources> diff --git a/res/values-de-rDE/strings.xml b/res/values-de-rDE/strings.xml new file mode 100644 index 0000000..c6940e9 --- /dev/null +++ b/res/values-de-rDE/strings.xml @@ -0,0 +1,700 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="about_settings">Telefon Info</string> + <string name="about_settings_summary">Rechtliche Hinweise, Telefonstatus und Softwareversion anzeigen</string> + <string name="activity_picker_label">Aktivität auswählen</string> + <string name="airplane_mode">Flugmodus</string> + <string name="airplane_mode_summary">Wählen Sie dies, um alle Drahtlosverbindungen zu deaktivieren</string> + <string name="airplane_mode_turning_off">Drahtlosverbindungen werden aktiviert\u2026</string> + <string name="airplane_mode_turning_on">Drahtlosverbindungen werden deaktiviert\u2026</string> + <string name="android_id_label">Android-ID</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Zugangspunkt bearbeiten</string> + <string name="apn_http_port">Anschluss</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">MMS-Anschluss</string> + <string name="apn_mms_proxy">MMS-Proxy</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Name</string> + <string name="apn_not_set"><Nicht eingestellt></string> + <string name="apn_password">Kennwort</string> + <string name="apn_server">Server</string> + <string name="apn_settings">APNs</string> + <string name="apn_type">APN-Typ</string> + <string name="apn_user">Benutzername</string> + <string name="app_launcher_newView_text">Neuer AppLauncher</string> + <string name="app_not_found_dlg_text"> Die Anwendung wurde nicht +in der Liste installierter Anwendungen gefunden.</string> + <string name="app_not_found_dlg_title">Anwendung nicht gefunden</string> + <string name="application_info_label">Anwendungsinformationen</string> + <string name="application_size_label">Anwendung</string> + <string name="applications_settings">Anwendungen</string> + <string name="applications_settings_header">Anwendungseinstellungen</string> + <string name="applications_settings_summary">Anwendungen verwalten und Startverknüpfungen einrichten</string> + <string name="auto_caps">Automatische Großschreibung</string> + <string name="auto_caps_summary">Ersten Buchstaben in Sätzen großschreiben</string> + <string name="auto_launch_disable_text">Keine Standardwerte eingestellt.</string> + <string name="auto_launch_enable_text">Sie haben ausgewählt, diese Anwendungen für bestimmte Aktionen automatisch zu starten.</string> + <string name="auto_launch_label">Standardmäßig starten</string> + <string name="auto_punctuate">Automatisch interpunktieren</string> + <string name="auto_punctuate_summary">Für Eingabe Leertaste zweimal drücken \u0022.\u0022</string> + <string name="auto_replace">Automatisch ersetzen</string> + <string name="auto_replace_summary">Falsch geschriebene Wörter korrigieren</string> + <string name="autorotate">Automatisch drehen</string> + <string name="autorotate_summary_off">Bei Änderung der Displayausrichtung die Anwendung nicht drehen</string> + <string name="autorotate_summary_on">Bei Änderung der Displayausrichtung die Anwendung drehen</string> + <string name="b_text">B</string> + <string name="band_mode_failed">Nicht erfolgreich</string> + <string name="band_mode_loading">Laden von Bandliste\u2026</string> + <string name="band_mode_set">Einstellen</string> + <string name="band_mode_succeeded">Erfolgreich</string> + <string name="band_mode_title">GSM/UMTS-Band einstellen</string> + <string name="baseband_version">Basisbandversion</string> + <string name="basic_settings_title">Telefongrundlagen</string> + <string name="battery_info_awake_battery">Wachzeit für Akku:</string> + <string name="battery_info_awake_plugged">Wachzeit beim Laden:</string> + <string name="battery_info_health_dead">Nicht aktiv</string> + <string name="battery_info_health_good">Gut</string> + <string name="battery_info_health_label">Akkuzustand:</string> + <string name="battery_info_health_over_voltage">Überspannung</string> + <string name="battery_info_health_overheat">Überhitzung</string> + <string name="battery_info_health_unknown">Unbekannt</string> + <string name="battery_info_health_unspecified_failure">Unbekannter Fehler</string> + <string name="battery_info_label">Akkuinfo</string> + <string name="battery_info_level_label">Akkuladung:</string> + <string name="battery_info_scale_label">Akkuskala:</string> + <string name="battery_info_screen_on">Display-Ein-Zeit:</string> + <string name="battery_info_status_charging">Lädt</string> + <string name="battery_info_status_charging_ac">(Netzstrom)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Entladung</string> + <string name="battery_info_status_full">Voll</string> + <string name="battery_info_status_label">Akkustatus:</string> + <string name="battery_info_status_not_charging">Kein Laden</string> + <string name="battery_info_status_unknown">Unbekannt</string> + <string name="battery_info_technology_label">Akkutechnologie:</string> + <string name="battery_info_temperature_label">Akkutemperatur:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">Zeit seit Start:</string> + <string name="battery_info_voltage_label">Akkuspannung:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_level_title">Akkuladung</string> + <string name="battery_status_title">Akkustatus</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Geräteliste löschen</string> + <string name="bluetooth_connect">Verbinden</string> + <string name="bluetooth_connectable">Nur verbindbar</string> + <string name="bluetooth_connected">Verbunden</string> + <string name="bluetooth_connecting">Verbindet\u2026</string> + <string name="bluetooth_device">Freisprechen/Headset</string> + <string name="bluetooth_device_info">Bluetooth-Geräteinfo</string> + <string name="bluetooth_device_info_alias">Anderer Gerätename</string> + <string name="bluetooth_device_info_delete">Dieses Gerät entfernen</string> + <string name="bluetooth_device_info_no_alias">Anderen Namen hier eingeben\u2026</string> + <string name="bluetooth_device_info_sdp">Unterstützte Dienste auflisten</string> + <string name="bluetooth_device_name">Gerätename</string> + <string name="bluetooth_devices">Bluetooth-Geräte</string> + <string name="bluetooth_disabled">Auswählen, um Bluetooth zu aktivieren</string> + <string name="bluetooth_disconnect">Trennen</string> + <string name="bluetooth_disconnect_blank"><xliff:g id="device_name">%1$s</xliff:g> wird getrennt</string> + <string name="bluetooth_discoverability_panel_title">Folgenden Zustand aktivieren\u2026</string> + <string name="bluetooth_discoverable">Erkennbar für %1$s Sekunden</string> + <string name="bluetooth_enable_text">Leere Taste\u2026</string> + <string name="bluetooth_enabled">Auswählen, um Bluetooth zu aktivieren</string> + <string name="bluetooth_enabling">Bluetooth einschalten\u2026</string> + <string name="bluetooth_enter_pin_msg">PIN-Eingabe für\u0020</string> + <string name="bluetooth_failed_to_enable">Bluetooth kann nicht aktiviert werden</string> + <string name="bluetooth_is_discoverable">Erkennbar für %1$s Sekunden\u2026</string> + <string name="bluetooth_name_not_set">Keine Name eingestellt; Kontoname wird verwendet</string> + <string name="bluetooth_neither">Weder auffindbar noch verbindbar</string> + <string name="bluetooth_new_data">Neue Daten eingeben</string> + <string name="bluetooth_new_data_cancel">Abbrechen</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_not_connected">Mit diesem Gerät koppeln</string> + <string name="bluetooth_not_discoverable">Auswählen, um Gerät erkennbar zu machen</string> + <string name="bluetooth_notif_message">Auswahl zur Kopplung mit\u0020</string> + <string name="bluetooth_notif_ticker">Anfrage für Bluetooth-Kopplung</string> + <string name="bluetooth_notif_title">Anfrage für Bluetooth-Kopplung</string> + <string name="bluetooth_pair">Koppeln</string> + <string name="bluetooth_paired">Gekoppelt</string> + <string name="bluetooth_paired_not_nearby">Gekoppelt</string> + <string name="bluetooth_pairing">Wird gekoppelt\u2026</string> + <string name="bluetooth_pairing_msg">Wird gekoppelt\u2026</string> + <string name="bluetooth_pin_entry">Bluetooth-PIN-Eingabe</string> + <string name="bluetooth_quick_toggle_summary">Auswählen, um Bluetooth zu aktivieren</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Nach Geräten suchen</string> + <string name="bluetooth_scan_for_new_devices">Nach neuen Geräten suchen\u2026</string> + <string name="bluetooth_scan_text">Leere Taste\u2026</string> + <string name="bluetooth_settings">Bluetooth-Einstellungen</string> + <string name="bluetooth_settings_summary">Verbindungen verwalten, Gerätenamen und Erkennbarkeit einstellen</string> + <string name="bluetooth_settings_text">Leere Taste\u2026</string> + <string name="bluetooth_settings_title">Bluetooth-Einstellungen</string> + <string name="bluetooth_starting">Starten von Bluetooth\u2026</string> + <string name="bluetooth_stopping">Stoppen von Bluetooth\u2026</string> + <string name="bluetooth_unknown">Unbekannt</string> + <string name="bluetooth_unpair">Entkoppeln</string> + <string name="bluetooth_visibility">Erkennbar</string> + <string name="bootloader_version">Boot-Loader-Version</string> + <string name="brightness">Helligkeit</string> + <string name="build_date_label">Herstellungsdatum</string> + <string name="build_description_label">Herstellungsbeschreibung</string> + <string name="build_host_label">Herstellungshost</string> + <string name="build_id_label">Herstellungs-ID</string> + <string name="build_number">Herstellungsnummer</string> + <string name="build_type_label">Herstellungstyp</string> + <string name="build_user_label">Herstellungsanwender</string> + <string name="call_settings_summary">Mobilbox, Rufumleitung, Anklopfen, Anrufer-ID einrichten</string> + <string name="call_settings_title">Anrufeinstellungen</string> + <string name="cancel">Abbrechen</string> + <string name="checkin_button_label">Nach Upgrade suchen</string> + <string name="checkin_download_failed">Nicht erfolgreich</string> + <string name="checkin_download_label">Status Herunterladen</string> + <string name="checkin_download_ongoing">Wird heruntergeladen</string> + <string name="checkin_download_pending">Hängend</string> + <string name="checkin_download_succeeded">Abgeschlossen</string> + <string name="checkin_download_suspended">Ausgesetzt</string> + <string name="checkin_download_unknown">Unbekannter Status</string> + <string name="checkin_failures_label">Fehler seit letztem Erfolg</string> + <string name="checkin_last_time_label">Letzter erfolgreicher Check-in</string> + <string name="checkin_started_message">Check-in gestartet\u2026</string> + <string name="checkin_status_label">Check-in-Status</string> + <string name="checkin_time_never">(nie)</string> + <string name="checkin_upgrade_label">Ausstehendes Upgrade</string> + <string name="choose_timezone">Zeitzone auswählen</string> + <string name="choose_timezone_region">Region auswählen</string> + <string name="clear_activities">Standardwerte löschen</string> + <string name="clear_data_dlg_text">Alle Daten, die Sie in dieser Anwendung gespeichert haben, werden dauerhaft gelöscht.</string> + <string name="clear_data_dlg_title">Löschen</string> + <string name="clear_data_failed">Anwendungsdaten können nicht gelöscht werden.</string> + <string name="clear_user_data_text">Daten löschen</string> + <string name="computing_size">Berechung von Anwendungsgrößen\u2026</string> + <string name="connect">Verbinden</string> + <string name="connect_to_blank">Verbinden mit <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="contributors_title">Tragen bei</string> + <string name="copyright_title">Copyright</string> + <string name="data_settings">Dateneinstellungen</string> + <string name="data_settings_summary">SD-Karte und Telefonspeicher, Datensynchronisierung</string> + <string name="data_settings_title">Daten</string> + <string name="data_size_label">Daten</string> + <string name="date_and_time">Datum- & Uhrzeit-Einstellungen</string> + <string name="date_and_time_settings_summary">Datum, Uhrzeit, Zeitzone und Formate einstellen</string> + <string name="date_and_time_settings_title">Datum & Uhrzeit</string> + <string name="date_time_24hour">24-Stunden-Format verwenden</string> + <string name="date_time_auto">Automatisch</string> + <string name="date_time_auto_summaryOff">Vom Netz bereitgestellte Werte verwenden</string> + <string name="date_time_auto_summaryOn">Vom Netz bereitgestellte Werte verwenden</string> + <string name="date_time_changeDate_text">Datum ändern</string> + <string name="date_time_changeTime_text">Uhrzeit ändern</string> + <string name="date_time_dateDisplay_text">3. Nov. 1997</string> + <string name="date_time_date_format">Datumsformat auswählen</string> + <string name="date_time_set_date">Datum einstellen</string> + <string name="date_time_set_time">Uhrzeit einstellen</string> + <string name="date_time_set_timezone">Zeitzone einstellen</string> + <string name="date_time_setzone_text">Zeitzone ändern</string> + <string name="date_time_timeDisplay_text">11 Uhr 45 </string> + <string name="date_time_timezone_label">Zeitzone:</string> + <string name="debug_intent_sender_label">Debug-Intent-Sender</string> + <string name="default_date_format">TT/MM/JJJJ</string> + <string name="default_keyboard_device_label">Standard-Tastatur</string> + <string name="development_settings_summary">Einstellungen für Anwendungsentwicklung</string> + <string name="development_settings_title">Entwicklung</string> + <string name="device_info_asleeptime">Schlafzeit</string> + <string name="device_info_awaketime">Wachzeit</string> + <string name="device_info_default">Unbekannt</string> + <string name="device_info_label">Geräteinfo</string> + <string name="device_info_not_available">Nicht verfügbar</string> + <string name="device_info_settings">Telefonstatus</string> + <string name="device_info_uptime">Auf-Zeit</string> + <string name="device_status">Status</string> + <string name="device_status_summary">IMEI, Telefonnummer, Signal usw.</string> + <string name="dim_screen">Display abdunkeln</string> + <string name="disconnect_ums">USB-Massenspeicher trennen</string> + <string name="display_font_size_label">Schriftgröße:</string> + <string name="display_label">Anzeige</string> + <string name="display_preview_label">Vorschau:</string> + <string name="display_settings">Anzeigeeinstellungen</string> + <string name="dlg_cancel">Abbrechen</string> + <string name="dlg_ok">OK</string> + <string name="done">OK</string> + <string name="dtmf_tone_enable_summary_off">Bei Verwendung der Wähltastatur Töne wiedergeben</string> + <string name="dtmf_tone_enable_summary_on">Bei Verwendung der Wähltastatur Töne wiedergeben</string> + <string name="dtmf_tone_enable_title">Töne beim Touch-Screen-Tippen</string> + <string name="enable_adb">USB-Debugging</string> + <string name="enable_adb_summary">Debug-Modus wenn USB angeschlossen ist</string> + <string name="error_apn_empty">Der APN (Zugangspunkt-Name) darf nicht leer sein.</string> + <string name="error_connecting">Verbindung mit dem Netz nicht möglich</string> + <string name="error_mcc_not3">MCC-Feld muss aus drei Stellen bestehen.</string> + <string name="error_mnc_not23">MNC-Feld muss aus zwei oder drei Stellen bestehen.</string> + <string name="error_name_empty">Das Namensfeld darf nicht leer sein.</string> + <string name="error_saving">Netz kann nicht gespeichert werden</string> + <string name="error_scanning">Suche nach Netzen nicht möglich</string> + <string name="error_starting">Starten von Wi-Fi nicht möglich</string> + <string name="error_stopping">Stoppen von Wi-Fi nicht möglich</string> + <string name="error_title">Achtung</string> + <string name="failed_to_connect">Verbindung zu <xliff:g id="device_name">%1$s</xliff:g> kann nicht hergestellt werden</string> + <string name="failed_to_pair">Kopplung mit <xliff:g id="device_name">%1$s</xliff:g> nicht möglich</string> + <string name="favorites_label">Favoriten</string> + <string name="firmware_version">Firmwareversion</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + <string name="forget_network">Vergessen</string> + <string name="fragment_status_authenticating">Authentifizieren mit <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_connected">Verbunden mit <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_connecting">Verbinden mit <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_disconnected">Getrennt</string> + <string name="fragment_status_disconnecting">Trennen von <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_failed">Nicht erfolgreich</string> + <string name="fragment_status_obtaining_ip">Beziehen von IP-Adresse von <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_scanning">Durchsuchen\u2026</string> + <string name="gsm_version_baseband_label">Basisbandversion</string> + <string name="gsm_version_ril_impl_label">RIL-(Firmware-)Impl-Version</string> + <string name="install_all_warning">Das Telefon und persönliche Daten können leichter von Anwendungen + unbekannter Quellen angegriffen werden. Sie erklären hiermit, dass Sie allein für jegliche + Schäden am Telefon oder Verlust an Daten verantwortlich sind, die auf die Verwendung + dieser Anwendungen zurückgeführt werden können.</string> + <string name="install_applications">Unbekannte Quellen</string> + <string name="install_unknown_applications">Installation von Anwendungen erlauben, die nicht aus dem Markt stammen</string> + <string name="intent_sender_account_label">Konto: </string> + <string name="intent_sender_action_label">Aktion:</string> + <string name="intent_sender_data_label">Daten:</string> + <string name="intent_sender_resource_label">Ressource: </string> + <string name="intent_sender_sendbroadcast_text">Übertragung senden</string> + <string name="intent_sender_startactivity_text">Aktivität starten</string> + <string name="internal_memory">Interner Telefonspeicher</string> + <string name="ip_address">IP-Adresse</string> + <string name="kb_text">KB</string> + <string name="keep_screen_on">Aktiv bleiben</string> + <string name="keep_screen_on_summary">Display während Ladevorgang stets aktiv</string> + <string name="kernel_version">Kernel-Version</string> + <string name="kernel_version_label">Linux-Kernel-Version</string> + <string name="keyguard_label">Keyguard</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Neues Kennwort bestätigen:</string> + <string name="keyguard_password_mismatch_error_text">Die zwei Kennworte stimmen nicht überein. Geben Sie sie erneut ein.</string> + <string name="keyguard_password_new_label">Neues Kennwort:</string> + <string name="keyguard_password_old_label">Altes Kennwort:</string> + <string name="keyguard_password_old_password_error_text">Das eingegebene alte Kennwort ist nicht korrekt. Versuchen Sie es noch einmal.</string> + <string name="keyguard_pin_mod_text">PIN ändern</string> + <string name="keyguard_pw_mod_text">Sperrmuster auswählen</string> + <string name="keyguard_sim_pin_label">SIM PIN</string> + <string name="language_category">Spracheinstellung</string> + <string name="language_picker_title">Ort</string> + <string name="language_settings">Text</string> + <string name="language_settings_summary">Optionen für automatische Textkorrektur auswählen</string> + <string name="large_font">Groß</string> + <string name="legal_information">Rechtliche Hinweise</string> + <string name="legal_information_summary">Bestimmungen und Bedingungen anzeigen</string> + <string name="license_title">Lizenz</string> + <string name="location_gps">GPS-Satelliten aktivieren</string> + <string name="location_gps_disabled">Lokalisierung auf Straßenebene (benötigt zusätzlichen Akkustrom und eine freie Sicht zum Himmel)</string> + <string name="location_label">Sitz des Anbieters:</string> + <string name="location_neighborhood_level">Ort wird über Wi-Fi und/oder Mobilnetze ermittelt</string> + <string name="location_network_based">Drahtlosnetze verwenden</string> + <string name="location_networks_disabled">Ort in Anwendungen (z. B. Karten) mit Hilfe drahtlose Netze ansehen</string> + <string name="location_source">Hier bin ich</string> + <string name="location_source_summary">Quellen für Ortsbestimmung auswählen</string> + <string name="location_status">Status:</string> + <string name="location_street_level">Bei Ortsbestimmung auf Straßenebene genau (Auswahl aufheben, um Akkustrom zu speichern)</string> + <string name="location_title">Quellen für eigenen Ort</string> + <string name="lock_example_message">Verbinden Sie mindestens vier Punkte.\n + \nWählen Sie \u201CWeiter\u201D, wenn Sie zum Zeichnen Ihres eigenen Musters bereit sind. + </string> + <string name="lock_example_title">Beispielmuster</string> + <string name="lock_settings_title">Entsperrmuster für Display</string> + <string name="lock_title">Sicherung Ihre Telefons</string> + <string name="lockpattern_change_lock_pattern_label">Entsperrmuster ändern</string> + <string name="lockpattern_confirm_button_text">Bestätigen</string> + <string name="lockpattern_continue_button_text">Fortfahren</string> + <string name="lockpattern_need_to_confirm">Muster zur Bestätigung neu zeichnen:</string> + <string name="lockpattern_need_to_unlock">Gespeichertes Muster bestätigen:</string> + <string name="lockpattern_need_to_unlock_wrong">Versuchen Sie es bitte erneut:</string> + <string name="lockpattern_pattern_confirmed_header">Neues Entsperrmuster:</string> + <string name="lockpattern_pattern_entered_header">Muster aufgenommen!</string> + <string name="lockpattern_recording_incorrect_too_short">Verbinden Sie mindestens <xliff:g id="number">%d</xliff:g> Punkte. Versuchen Sie es erneut:</string> + <string name="lockpattern_recording_inprogress">Heben Sie den Finger ab, wenn Sie fertig sind.</string> + <string name="lockpattern_recording_intro_footer">Drücken Sie auf Menü für Hilfe.</string> + <string name="lockpattern_recording_intro_header">Zeichnen Sie ein Entsperrmuster:</string> + <string name="lockpattern_restart_button_text">Neu zeichnen</string> + <string name="lockpattern_retry_button_text">Erneut versuchen</string> + <string name="lockpattern_settings_change_lock_pattern">Entsperrmuster ändern</string> + <string name="lockpattern_settings_choose_lock_pattern">Entsperrmuster einrichten</string> + <string name="lockpattern_settings_enable_summary">Muster zeichnen, um Display zu entsperren</string> + <string name="lockpattern_settings_enable_title">Muster erforderlich</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Sichtbares Muster verwenden</string> + <string name="lockpattern_settings_help_how_to_record">Wie man ein Entsperrmuster zeichnet:</string> + <string name="lockpattern_settings_title">Entsperrmuster</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Versuchen Sie es in <xliff:g id="number">%d</xliff:g> Sekunden erneut.</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Zu viele Fehlversuche!</string> + <string name="manage_applications_title">Anwendungen verwalten</string> + <string name="manage_space_text">Speicherplatz verwalten</string> + <string name="manageapplications_settings_title">Anwendungen verwalten</string> + <string name="mass_storage">Für USB-Speicher verwenden</string> + <string name="master_clear_button_text">Telefon zurücksetzen</string> + <string name="master_clear_desc">Diese Aktion setzt das Telefon auf die Werkseinstellungen zurück. Dabei werden alle Daten und heruntergeladenen Anwendungen gelöscht!</string> + <string name="master_clear_failed">Es wurde keine Zurücksetzung durchgeführt, da der System Clear-Dienst nicht verfügbar ist.</string> + <string name="master_clear_final_button_text">Alles löschen</string> + <string name="master_clear_final_desc">Telefon zurücksetzen und alle Daten und Anwendungen löschen? Aktion kann nicht rückgängig gemacht werden!</string> + <string name="master_clear_gesture_explanation">Sie müssen das Entsperrmuster zeichnen, um eine Telefonzurücksetzung zu bestätigen.</string> + <string name="master_clear_gesture_prompt">Zeichnen Sie das Entsperrmuster:</string> + <string name="master_clear_summary">Löscht alle Daten auf dem Telefon</string> + <string name="master_clear_title">Auf Werkseinstellung zurücksetzen</string> + <string name="mb_text">MB</string> + <string name="media_volume_summary">Lautstärke für Musik und Videos einstellen</string> + <string name="media_volume_title">Medienlautstärke</string> + <string name="medium_font">Mittel</string> + <string name="memory_available">Verfügbarer Speicherplatz</string> + <string name="memory_size">Gesamtspeicherplatz</string> + <string name="menu_cancel">Verwerfen</string> + <string name="menu_delete">APN löschen</string> + <string name="menu_new">Neuer APN</string> + <string name="menu_save">Speichern</string> + <string name="model_number">Modellnummer</string> + <string name="network_settings_summary">Optionen für Roaming, Netze, APNs einstellen</string> + <string name="network_settings_title">Mobile Netze</string> + <string name="networks">Betreiberauswahl</string> + <string name="networks_title">Netzeinstellungen</string> + <string name="next_button_label">Weiter</string> + <string name="next_label">Weiter</string> + <string name="notification_sound_dialog_title">Klingelton für Benachrichtigung auswählen</string> + <string name="notification_sound_summary">Standard-Klingelton für Benachrichtigungen einrichten</string> + <string name="notification_sound_title">Klingelton für Benachrichtigungen</string> + <string name="permissions_label">Genehmigungen</string> + <string name="phone_info_label">Telefoninfo</string> + <string name="phone_language">Sprache auswählen</string> + <string name="ping_test_label">Ping-Test durchführen</string> + <string name="please_type_hex_key">WEP-Hex-Schlüssel (0-9, A-F)</string> + <string name="please_type_passphrase">Drahtloskennwort</string> + <string name="product_brand_label">Produktmarke</string> + <string name="product_device_label">Telefontyp</string> + <string name="progress_scanning">Suchen</string> + <string name="proxy_action_text">Speichern</string> + <string name="proxy_clear_text">Löschen</string> + <string name="proxy_defaultView_text">Standardwerte wiederherstellen</string> + <string name="proxy_error">Achtung</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_empty_host_set_port">Das Anschluss-Feld muss leer sein, wenn dass Host-Feld leer ist.</string> + <string name="proxy_error_empty_port">Sie müssen das Anschluss-Feld ausfüllen.</string> + <string name="proxy_error_invalid_host">Sie haben einen ungültigen Hostnamen eingegeben.</string> + <string name="proxy_error_invalid_port">Sie haben einen ungültigen Anschluss eingegeben.</string> + <string name="proxy_hostname_label">Hostname</string> + <string name="proxy_port_label">Anschluss</string> + <string name="proxy_settings_label">Proxy-Einstellungen</string> + <string name="quick_launch_assign_application">Anwendung zuweisen</string> + <string name="quick_launch_clear_cancel_button">Abbrechen</string> + <string name="quick_launch_clear_dialog_message">Ihre Verknüpfung für <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) wird gelöscht.</string> + <string name="quick_launch_clear_dialog_title">Löschen</string> + <string name="quick_launch_clear_ok_button">OK</string> + <string name="quick_launch_display_mode_applications">Anwendungen</string> + <string name="quick_launch_display_mode_shortcuts">Schnellaufruf</string> + <string name="quick_launch_no_shortcut">Kein Schnellaufruf</string> + <string name="quick_launch_shortcut">Suchen + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <string name="quick_launch_summary">Tastaturkürzel für Start von Anwendungen einrichten</string> + <string name="quick_launch_title">Schellstart</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Verbunden</string> + <string name="radioInfo_data_connecting">Verbinden</string> + <string name="radioInfo_data_disconnected">Getrennt</string> + <string name="radioInfo_data_suspended">Ausgesetzt</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">Bytes</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">pkts</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Datenverbindung deaktivieren</string> + <string name="radioInfo_menu_disableDataOnBoot">Daten beim Hochfahren deaktivieren</string> + <string name="radioInfo_menu_enableData">Datenverbindung aktivieren</string> + <string name="radioInfo_menu_enableDataOnBoot">Daten beim Hochfahren aktivieren</string> + <string name="radioInfo_menu_getPDP">PDP-Liste einlesen</string> + <string name="radioInfo_menu_viewADN">SIM-Adressbuch anzeigen</string> + <string name="radioInfo_menu_viewFDN">Feste Rufnummern anzeigen</string> + <string name="radioInfo_menu_viewSDN">Rufnummern für Dienste anzeigen</string> + <string name="radioInfo_phone_idle">Leerlauf</string> + <string name="radioInfo_phone_offhook">Aktiver Anruf</string> + <string name="radioInfo_phone_ringing">Klingeln</string> + <string name="radioInfo_roaming_in">Roaming</string> + <string name="radioInfo_roaming_not">Kein Roaming</string> + <string name="radioInfo_service_emergency">Nur Notrufe</string> + <string name="radioInfo_service_in">Im Dienst</string> + <string name="radioInfo_service_off">Funkempfang aus</string> + <string name="radioInfo_service_out">Kein Dienst</string> + <string name="radioInfo_unknown">unbekannt</string> + <string name="radio_controls_summary">Wi-Fi, Bluetooth, Flugmodus & mobile Netze verwalten</string> + <string name="radio_controls_title">Drahtlos-Bedienelemente</string> + <string name="radio_info_band_mode_label">Funkband auswählen</string> + <string name="radio_info_call_redirect_label">Anruf umleiten:</string> + <string name="radio_info_call_status_label">Anrufstatus:</string> + <string name="radio_info_current_network_label">Aktuelles Netz:</string> + <string name="radio_info_data_attempts_label">Datenversuche:</string> + <string name="radio_info_data_successes_label">Datenerfolge:</string> + <string name="radio_info_gprs_service_label">GPRS-Dienst:</string> + <string name="radio_info_gsm_disconnects_label">GSM wird getrennt:</string> + <string name="radio_info_gsm_service_label">GSM-Dienst:</string> + <string name="radio_info_http_client_test">HTTP-Client-Test:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">Wartende Nachricht:</string> + <string name="radio_info_neighboring_location_label">Benachbarte CID:</string> + <string name="radio_info_network_type_label">Netztyp:</string> + <string name="radio_info_phone_number_label">Telefonnummer:</string> + <string name="radio_info_ping_hostname">Ping-Hostname (www.google.com):</string> + <string name="radio_info_ping_ipaddr">Ping-IpAddr:</string> + <string name="radio_info_ppp_received_label">PPP empfangen:</string> + <string name="radio_info_ppp_resets_label">Anzahl von PPP-Zurücksetzungen seit Booten:</string> + <string name="radio_info_ppp_sent_label">PPP gesendet:</string> + <string name="radio_info_radio_resets_label">Funkzurücksetzungen:</string> + <string name="radio_info_roaming_label">Roaming:</string> + <string name="radio_info_set_perferred_label">Bevorzugten Netztyp einstellen:</string> + <string name="radio_info_signal_location_label">Ort:</string> + <string name="radio_info_signal_strength_label">Signalstärke:</string> + <string name="radio_info_smsc_label">SMSC (SMS-Centre):</string> + <string name="radio_info_smsc_refresh_label">Aktualisieren</string> + <string name="radio_info_smsc_update_label">Aktualisieren</string> + <string name="radio_info_toggle_ciph_label">Verschlüsselung wechseln</string> + <string name="read_only">\u0020(Schreibgeschützt)</string> + <string name="recompute_size">Neuberechnung der Größe\u2026</string> + <string name="ring_volume_summary">Lautstärke für eingehende Anrufe einrichten</string> + <string name="ring_volume_title">Klingellautstärke</string> + <string name="ringer_volume_instructions">Klingellautstärke mit Lautstärkentasten einstellen</string> + <string name="ringer_volume_ringer_mode_label">Klingelmodus</string> + <string name="ringer_volume_ringtone_label">Klingelton</string> + <string name="ringer_volume_screen_increasing_text">Ansteigendes Klingeln</string> + <string name="ringtone_summary">Standard-Klingelton für eingehende Anrufe einrichten</string> + <string name="ringtone_title">Telefonklingelton</string> + <string name="roaming">Datenroaming</string> + <string name="roaming_disable">Verbindung herstellen zu Datendiensten während Roaming</string> + <string name="roaming_enable">Verbindung herstellen zu Datendiensten während Roaming</string> + <string name="roaming_reenable_message">Sie haben die Datenverbindung verloren, da Sie das Heimatnetz mit ausgeschaltetem Datenroaming verlassen haben.</string> + <string name="roaming_reenable_title">Achtung</string> + <string name="roaming_turn_it_on_button">Schalten Sie es ein</string> + <string name="roaming_warning">Datenroaming erlauben? Dabei können erhebliche Gebühren anfallen!</string> + <string name="scan_wifi">Suchen</string> + <string name="screen_off_timeout_label">Niemals Timeout während Ladevorgang</string> + <string name="screen_timeout">Display-Timeout</string> + <string name="sd_card_settings_label">SD-Karte</string> + <string name="sd_eject">SD-Karte entnehmen</string> + <string name="sd_memory">SD-Karte</string> + <string name="sd_unavailable">Nicht verfügbar</string> + <string name="sdcard_changes_instructions">Änderungen werden wirksam, wenn das USB-Kabel wieder angeschlossen wird.</string> + <string name="sdcard_removal_alert_ok">OK</string> + <string name="sdcard_removal_alert_scolding">Die SD-Karte wurde entfernt, während sie noch benutzt wurde! + Um eine Beschädigung der Karte zu vermeiden, deaktivieren Sie die Karte im Fenster SD-Karten-Einstellungen, bevor Sie sie entfernen.</string> + <string name="sdcard_removal_alert_title">Unsicheres Entfernen der SD-Karte!</string> + <string name="sdcard_setting">SD-Karte</string> + <string name="sdcard_settings_available_bytes_label">Verfügbare Bytes:</string> + <string name="sdcard_settings_bad_removal_status">SD-Karte wurde während ihrer Verwendung entfernt!</string> + <string name="sdcard_settings_mass_storage_status">SD-Karte wird als Massenspeicher verwendet</string> + <string name="sdcard_settings_not_present_status">Keine SD-Karte</string> + <string name="sdcard_settings_read_only_status">Eingesetzte SD-Karte ist schreibgeschützt</string> + <string name="sdcard_settings_scanning_status">Suche nach Medien auf SD-Karte\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">USB-Massenspeicher aktivieren</string> + <string name="sdcard_settings_total_bytes_label">Bytes insgesamt:</string> + <string name="sdcard_settings_unmounted_status">Die SD-Karte kann jetzt sicher entfernt werden</string> + <string name="sdcard_settings_used_bytes_label">Genutzte Bytes:</string> + <string name="sdcard_unmount">SD-Karte deaktivieren</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + <string name="sdcard_unmountable_alert_title">SD-Karte nicht lesbar</string> + <string name="sdcard_unmountable_message">Die SD-Karte konnte nicht gelesen werden. + Das Dateisystem ist möglicherweise fehlerhaft oder die Karte ist beschädigt.</string> + <string name="security">Sicherheit</string> + <string name="security_and_data_label">Sicherheit & Daten</string> + <string name="security_passwords_title">Kennwort</string> + <string name="security_settings_desc">Diese Anwendung kann auf Folgendes auf dem Telefon zugreifen:</string> + <string name="security_settings_summary">Eigener Aufenthalt, Display-Entsperrung, SIM-Karten-Sperre</string> + <string name="security_settings_title">Sicherheit & Ort</string> + <string name="select_your_language">Wählen Sie eine Sprache aus</string> + <string name="set_lock_pattern_label">Zeichnen Sie Ihr Entsperrmuster:</string> + <string name="settings_chooser_pick_string"> + Einstellungen-Symbol sollte vorgehen nach: + </string> + <string name="settings_label">Einstellungen</string> + <string name="settings_license_activity_loading">Ladung\u2026</string> + <string name="settings_license_activity_title">Quellenlizenzen öffnen</string> + <string name="settings_license_activity_unavailable">Es gibt ein Problem beim Laden der Lizenzen.</string> + <string name="show_password">Sichtbare Kennworte</string> + <string name="show_password_summary">Kennwort bei Eingabe anzeigen</string> + <string name="signal">Signalstärke</string> + <string name="silent_mode_summary">Alle Töne außer für Medien sind deaktiviert</string> + <string name="silent_mode_title">Lautlosmodus</string> + <string name="sim_bad_pin">Falsche PIN!</string> + <string name="sim_change_failed">PIN kann nicht geändert werden.\nMöglicherweise falsche PIN.</string> + <string name="sim_change_pin">SIM PIN ändern</string> + <string name="sim_change_succeeded">SIM PIN wurde erfolgreich geändert</string> + <string name="sim_disable_sim_lock">SIM-Karten-Sperre deaktivieren</string> + <string name="sim_enable_sim_lock">SIM-Karten-Sperre aktivieren</string> + <string name="sim_enter_cancel">Abbrechen</string> + <string name="sim_enter_new">Neue PIN eingeben</string> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_old">Alte PIN eingeben</string> + <string name="sim_enter_pin">SIM PIN eingeben</string> + <string name="sim_lock_failed">SIM-Karten-Sperrzustand kann nicht geändert werden.\nMöglicherweise falsche PIN.</string> + <string name="sim_lock_off">PIN für Verwendung des Telefons erforderlich</string> + <string name="sim_lock_on">PIN für Verwendung des Telefons erforderlich</string> + <string name="sim_lock_settings">Einstellungen für SIM-Karten-Sperre</string> + <string name="sim_lock_settings_category">SIM-Karten-Sperre einrichten</string> + <string name="sim_lock_settings_title">SIM-Karten-Sperre</string> + <string name="sim_pin_change">PIN-Code ändern</string> + <string name="sim_pin_toggle">SIM-Karte sperren</string> + <string name="sim_pins_dont_match">PINs stimmen nicht überein!</string> + <string name="sim_reenter_new">PIN neu eingeben</string> + <string name="skip_button_label">Abbrechen</string> + <string name="small_font">Klein</string> + <string name="software_version">Softwareversion</string> + <string name="sort_order_alpha">Alphabetisch sortieren</string> + <string name="sort_order_size">Nach Größe sortieren (absteigend)</string> + <string name="sound_and_display_settings">Ton & Display</string> + <string name="sound_and_display_settings_summary">Klingeltöne, Benachrichtigungen, Displayhelligkeit einstellen</string> + <string name="sound_effects_enable_summary_off">Sound bei Auswahl auf Display</string> + <string name="sound_effects_enable_summary_on">Sound bei Auswahl auf Display</string> + <string name="sound_effects_enable_title">Hörbare Auswahl</string> + <string name="sound_settings">Klangeinstellungen</string> + <string name="status_authenticating">Authentifizieren\u2026</string> + <string name="status_awake_time">Wachzeit</string> + <string name="status_bt_address">Bluetooth-Adresse</string> + <string name="status_connected">Verbunden</string> + <string name="status_connecting">Verbindet\u2026</string> + <string name="status_data_state">Datenzugriff</string> + <string name="status_disconnected">Getrennt</string> + <string name="status_disconnecting">Trennt\u2026</string> + <string name="status_failed">Nicht erfolgreich</string> + <string name="status_imei">IMEI</string> + <string name="status_imei_sv">IMEI SV</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Netztyp</string> + <string name="status_number">Telefonnummer</string> + <string name="status_obtaining_ip">Adresse beziehen\u2026</string> + <string name="status_operator">Netz</string> + <string name="status_roaming">Roaming</string> + <string name="status_scanning">Scannen\u2026</string> + <string name="status_service_state">Dienststatus</string> + <string name="status_signal_strength">Signalstärke</string> + <string name="status_unavailable">Nicht verfügbar</string> + <string name="status_up_time">Auf-Zeit</string> + <string name="status_wifi_mac_address">Wi-Fi MAC-Adresse</string> + <string name="stay_on">Display während Ladevorgang immer aktiv</string> + <string name="storage_label">Speicher</string> + <string name="storage_settings_summary">SD-Karte entnehmen, verfügbaren Speicher anzeigen</string> + <string name="storage_settings_title">SD-Karte & Telefonspeicher</string> + <string name="sum_carrier_select">Wählen Sie einen Netzbetreiber aus</string> + <string name="summary_connection_failed">Verbindung fehlgeschlagen; auswählen, um es erneut zu versuchen</string> + <string name="summary_not_in_range">Nicht in Reichweite</string> + <string name="summary_remembered">Erinnert</string> + <string name="sync_automatically">Automatische Synchronisierung</string> + <string name="sync_calendar">Kalender</string> + <string name="sync_contacts">Kontakte</string> + <string name="sync_disabled">Auswählen, um Daten automatisch zu synchronisieren</string> + <string name="sync_do_nothing">Diesmal nichts tun.</string> + <string name="sync_enabled">Daten automatisch synchronisieren</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_is_failing">Bei der Synchronisierung gibt es derzeit Probleme. Wird in Kürze fortgesetzt.</string> + <string name="sync_menu_sync_cancel">Synchr. abbrechen</string> + <string name="sync_menu_sync_now">Jetzt synchronisieren</string> + <string name="sync_really_delete">Diese Elemente löschen.</string> + <string name="sync_settings">Datensynchronisierung</string> + <string name="sync_settings_summary">Auswählen, welche Anwendungen synchronisiert werden</string> + <string name="sync_too_many_deletes">Limit für Löschung überschritten</string> + <string name="sync_too_many_deletes_desc">Es gibt %d gelöschte Elemente für %s, Konto %s. Was möchten Sie tun?</string> + <string name="sync_undo_deletes">Löschungen rückgängig machen.</string> + <string name="target_build_field_label">Geforderter Herstellungstyp</string> + <string name="team_title">Team</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">MMS-Anschluss:</string> + <string name="telephony_mmsproxy_label">MMS-Proxy:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">Name:</string> + <string name="telephony_password_label">Kennwort:</string> + <string name="telephony_port_label">Anschluss:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">Server:</string> + <string name="telephony_user_label">Benutzer:</string> + <string name="terms_title">Bestimmungen und Bedingungen</string> + <string name="testing">Test</string> + <string name="testing_battery_info">Akkuinformationen</string> + <string name="testing_phone_info">Telefoninformationen</string> + <string name="testing_sim_toolkit">SIM-Toolkit</string> + <string name="text_category">Texteinstellungen</string> + <string name="total_size_label">Gesamt</string> + <string name="turn_off_qxdm">QXDM SD-Log deaktivieren</string> + <string name="turn_off_radio">Mobilfunk ausschalten</string> + <string name="turn_on_qxdm">QXDM SD-Log aktivieren</string> + <string name="turn_on_radio">Mobilfunk einschalten</string> + <string name="underdeveloped_settings_label">Nicht ausreichende Einstellungen</string> + <string name="uninstall_failed">Anwendung kann nicht deinstalliert werden.</string> + <string name="uninstall_text">Deinstallieren</string> + <string name="unknown">Unbekannt</string> + <string name="vibrate_summary">Telefon bei eingehenden Anrufen vibrieren</string> + <string name="vibrate_title">Telefonvibrierung</string> + <string name="wallpaper_label">Bildschirmhintergrund</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Wi-Fi-Netze</string> + <string name="wifi_add_other_network">Wi-Fi-Netz hinzufügen</string> + <string name="wifi_context_menu_change_password">Kennwort ändern</string> + <string name="wifi_context_menu_connect">Verbindung mit Netz</string> + <string name="wifi_context_menu_forget">Netz vergessen</string> + <string name="wifi_dhcp_timeout_error">Es gibt ein Problem beim Beziehen der IP-Adresse.</string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_dns_label">Dns:</string> + <string name="wifi_error">Fehler</string> + <string name="wifi_gateway">Gateway</string> + <string name="wifi_gateway_label">Gateway:</string> + <string name="wifi_generic_connection_error">Es gibt ein Problem bei der Verbindungsherstellung mit dem Netz. Versuchen Sie es erneut.</string> + <string name="wifi_host_ip">Host-IP:</string> + <string name="wifi_ip_address">IP-Adresse</string> + <string name="wifi_ip_settings_invalid_ip">Geben Sie eine gültige IP-Adresse an.</string> + <string name="wifi_ip_settings_menu_cancel">Abbrechen</string> + <string name="wifi_ip_settings_menu_save">Speichern</string> + <string name="wifi_ip_settings_titlebar">IP-Einstellungen</string> + <string name="wifi_link_speed">Geschwindigkeit</string> + <string name="wifi_menu_advanced">Erweitert</string> + <string name="wifi_netmask">Netzmaske</string> + <string name="wifi_netmask_label">Netzmaske:</string> + <string name="wifi_notify_open_networks">Netzbenachrichtigung</string> + <string name="wifi_notify_open_networks_summary">Benachrichtigen, wenn offenes Netz verfügbar ist</string> + <string name="wifi_password_incorrect_error">Das eingegeben Netzkennwort ist falsch. Versuchen Sie es noch einmal.</string> + <string name="wifi_password_unchanged">(unverändert)</string> + <string name="wifi_prefer_wifi">Wi-Fi bevorzugen</string> + <string name="wifi_quick_toggle_summary">Auswählen, um Wi-Fi einzuschalten</string> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <string name="wifi_save_config">Speichern</string> + <string name="wifi_screen_activate_text">Aktivieren</string> + <string name="wifi_screen_dhcp_text">Automatisch</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">Manuell</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi ist aktiv</string> + <string name="wifi_screen_test_text">Test</string> + <string name="wifi_security">Sicherheit</string> + <string name="wifi_security_open">Öffnen</string> + <string name="wifi_security_unknown">Unbekannt</string> + <string name="wifi_security_verbose_open">Offenes Netz</string> + <string name="wifi_security_verbose_wep">Gesichert mit WEP</string> + <string name="wifi_security_verbose_wpa">Gesichert mit WPA</string> + <string name="wifi_security_verbose_wpa2">Gesichert mit WPA2</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_settings">Wi-Fi-Einstellungen</string> + <string name="wifi_settings_category">Wi-Fi-Einstellungen</string> + <string name="wifi_settings_summary">Drahtlos-Zugangspunkte einrichten und verwalten</string> + <string name="wifi_show_password">Kennwort anzeigen.</string> + <string name="wifi_signal_0">Schlecht</string> + <string name="wifi_signal_1">Befriedigend</string> + <string name="wifi_signal_2">Gut</string> + <string name="wifi_signal_3">Hervorragend</string> + <string name="wifi_starting">Einschalten\u2026</string> + <string name="wifi_status">Status</string> + <string name="wifi_stopping">Ausschalten\u2026</string> + <string name="wifi_type_ssid">Netz-SSID eingeben:</string> + <string name="wifi_use_static_ip">Statische IP verwenden</string> + <string name="wifi_wlan_id">WLAN-ID:</string> +</resources> diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml new file mode 100644 index 0000000..db6f9a7 --- /dev/null +++ b/res/values-en-rGB/strings.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2007 Google Inc. + * + * 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. + */ +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Sync settings --> + <string name="sync_gmail">Google Mail</string> +</resources> diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml new file mode 100644 index 0000000..27db21d --- /dev/null +++ b/res/values-es-rUS/strings.xml @@ -0,0 +1,700 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="about_settings">Acerca del teléfono</string> + <string name="about_settings_summary">Ver información legal, estado del teléfono, versión de software</string> + <string name="activity_picker_label">Seleccionar actividad</string> + <string name="airplane_mode">Modo avión</string> + <string name="airplane_mode_summary">Seleccionar para deshabilitar todas las conexiones inalámbricas</string> + <string name="airplane_mode_turning_off">Habilitando conexiones inalámbricas\u2026</string> + <string name="airplane_mode_turning_on">Deshabilitando conexiones inalámbricas\u2026</string> + <string name="android_id_label">ID de Android</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Editar punto de acceso</string> + <string name="apn_http_port">Puerto</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">Puerto MMS</string> + <string name="apn_mms_proxy">Proxy MMS</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Nombre</string> + <string name="apn_not_set"><No establecido></string> + <string name="apn_password">Contraseña</string> + <string name="apn_server">Servidor</string> + <string name="apn_settings">APNs</string> + <string name="apn_type">Tipo de APN</string> + <string name="apn_user">Nombre de usuario</string> + <string name="app_launcher_newView_text">Nuevo AppLauncher</string> + <string name="app_not_found_dlg_text"> La aplicación no se +encontró en la lista de aplicaciones instaladas.</string> + <string name="app_not_found_dlg_title">Aplicación no encontrada</string> + <string name="application_info_label">Inform. de la aplicación</string> + <string name="application_size_label">Aplicación</string> + <string name="applications_settings">Aplicaciones</string> + <string name="applications_settings_header">Configuración de la aplicación</string> + <string name="applications_settings_summary">Administrar aplicaciones, configurar accesos directos para el inicio rápido</string> + <string name="auto_caps">Capitalización automática</string> + <string name="auto_caps_summary">Escribe en mayúscula la primera letra de cada frase</string> + <string name="auto_launch_disable_text">No hay una configuración predeterminada.</string> + <string name="auto_launch_enable_text">Permite seleccionar el inicio de esta aplicación por defecto en algunas acciones.</string> + <string name="auto_launch_label">Inicio predeterminado</string> + <string name="auto_punctuate">Puntuación automática</string> + <string name="auto_punctuate_summary">Pulse la tecla espaciadora dos veces para insertar \u0022.\u0022</string> + <string name="auto_replace">Sustitución automática</string> + <string name="auto_replace_summary">Corrige las palabras escritas incorrectamente</string> + <string name="autorotate">Giro automático</string> + <string name="autorotate_summary_off">Al cambiar la orientación de la pantalla no se gira la aplicación</string> + <string name="autorotate_summary_on">Al cambiar la orientación de la pantalla se gira la aplicación</string> + <string name="b_text">B</string> + <string name="band_mode_failed">Incorrecto</string> + <string name="band_mode_loading">Cargando lista de bandas\u2026</string> + <string name="band_mode_set">Establecer</string> + <string name="band_mode_succeeded">Correcto</string> + <string name="band_mode_title">Establecer banda GSM/UMTS</string> + <string name="baseband_version">Versión de banda básica</string> + <string name="basic_settings_title">Bases del teléfono</string> + <string name="battery_info_awake_battery">Tiempo de actividad con batería:</string> + <string name="battery_info_awake_plugged">Tiempo de actividad mientras se carga:</string> + <string name="battery_info_health_dead">Muerta</string> + <string name="battery_info_health_good">Buena</string> + <string name="battery_info_health_label">Salud de batería:</string> + <string name="battery_info_health_over_voltage">Sobretensión</string> + <string name="battery_info_health_overheat">Recalentamiento</string> + <string name="battery_info_health_unknown">Desconocido</string> + <string name="battery_info_health_unspecified_failure">Error desconocido</string> + <string name="battery_info_label">Información de batería</string> + <string name="battery_info_level_label">Nivel de batería:</string> + <string name="battery_info_scale_label">Escala de batería:</string> + <string name="battery_info_screen_on">Tiempo de encendido de pantalla:</string> + <string name="battery_info_status_charging">Cargando</string> + <string name="battery_info_status_charging_ac">(CA)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Descargando</string> + <string name="battery_info_status_full">Completo</string> + <string name="battery_info_status_label">Estado de la batería:</string> + <string name="battery_info_status_not_charging">No cargando</string> + <string name="battery_info_status_unknown">Desconocido</string> + <string name="battery_info_technology_label">Tecnología de la batería:</string> + <string name="battery_info_temperature_label">Temperatura de la batería:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">Tiempo desde arranque:</string> + <string name="battery_info_voltage_label">Tensión de la batería:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_level_title">Nivel de batería</string> + <string name="battery_status_title">Estado de la batería</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Borrar lista de dispositivos</string> + <string name="bluetooth_connect">Conectar</string> + <string name="bluetooth_connectable">Sólo conectable</string> + <string name="bluetooth_connected">Conectado</string> + <string name="bluetooth_connecting">Conectando\u2026</string> + <string name="bluetooth_device">manos libres / auriculares</string> + <string name="bluetooth_device_info">Información de dispositivo Bluetooth</string> + <string name="bluetooth_device_info_alias">Alias de dispositivo</string> + <string name="bluetooth_device_info_delete">Quitar este dispositivo</string> + <string name="bluetooth_device_info_no_alias">Introducir alias aquí\u2026</string> + <string name="bluetooth_device_info_sdp">Enumerar servicios compatibles</string> + <string name="bluetooth_device_name">Nombre del dispositivo</string> + <string name="bluetooth_devices">Dispositivos Bluetooth</string> + <string name="bluetooth_disabled">Seleccionar la activación de Bluetooth</string> + <string name="bluetooth_disconnect">Desconectar</string> + <string name="bluetooth_disconnect_blank"><xliff:g id="device_name">%1$s</xliff:g> se desconectará</string> + <string name="bluetooth_discoverability_panel_title">Mostrarme\u2026</string> + <string name="bluetooth_discoverable">Detectable durante %1$s segundos</string> + <string name="bluetooth_enable_text">Vaciar botón\u2026</string> + <string name="bluetooth_enabled">Seleccionar la activación de Bluetooth</string> + <string name="bluetooth_enabling">Conexión de Bluetooth\u2026</string> + <string name="bluetooth_enter_pin_msg">Introduzca el código PIN para\u0020</string> + <string name="bluetooth_failed_to_enable">Incapaz de conectar Bluetooth</string> + <string name="bluetooth_is_discoverable">Detectable durante %1$s segundos\u2026</string> + <string name="bluetooth_name_not_set">Ningún nombre establecido, utilizando nombre de cuenta</string> + <string name="bluetooth_neither">Ni detectable ni conectable</string> + <string name="bluetooth_new_data">Introducir nuevos datos</string> + <string name="bluetooth_new_data_cancel">Cancelar</string> + <string name="bluetooth_new_data_confirm">Aceptar</string> + <string name="bluetooth_not_connected">Emparejar con este dispositivo</string> + <string name="bluetooth_not_discoverable">Seleccionar para que el dispositivo sea detectable</string> + <string name="bluetooth_notif_message">Seleccionar emparejamiento con\u0020</string> + <string name="bluetooth_notif_ticker">Solicitud para emparejar Bluetooth</string> + <string name="bluetooth_notif_title">Solicitud para emparejar Bluetooth</string> + <string name="bluetooth_pair">Emparejar</string> + <string name="bluetooth_paired">Emparejado</string> + <string name="bluetooth_paired_not_nearby">Emparejado</string> + <string name="bluetooth_pairing">Emparejando\u2026</string> + <string name="bluetooth_pairing_msg">Emparejando\u2026</string> + <string name="bluetooth_pin_entry">Entrada de PIN Bluetooth</string> + <string name="bluetooth_quick_toggle_summary">Seleccionar la activación de Bluetooth</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Buscar dispositivos</string> + <string name="bluetooth_scan_for_new_devices">Buscando nuevos dispositivos\u2026</string> + <string name="bluetooth_scan_text">Vaciar botón\u2026</string> + <string name="bluetooth_settings">Configuración de Bluetooth</string> + <string name="bluetooth_settings_summary">Administrar conexiones, configuración de nombre del dispositivo y su reconocimiento</string> + <string name="bluetooth_settings_text">Vaciar botón\u2026</string> + <string name="bluetooth_settings_title">Configuración de Bluetooth</string> + <string name="bluetooth_starting">Conexión de Bluetooth\u2026</string> + <string name="bluetooth_stopping">Desconexión de Bluetooth\u2026</string> + <string name="bluetooth_unknown">Desconocido</string> + <string name="bluetooth_unpair">Desemparejar</string> + <string name="bluetooth_visibility">Detectable</string> + <string name="bootloader_version">Arranque de versión del cargador</string> + <string name="brightness">Brillo</string> + <string name="build_date_label">Fecha de compilación</string> + <string name="build_description_label">Descripción de compilación</string> + <string name="build_host_label">Host de compilación</string> + <string name="build_id_label">ID de compilación</string> + <string name="build_number">Número de compilación</string> + <string name="build_type_label">Tipo de compilación</string> + <string name="build_user_label">Usuario de compilación</string> + <string name="call_settings_summary">Configurar correo de voz, desvío de llamada, llamada en espera, identificador de llamada</string> + <string name="call_settings_title">Configuración de llamada</string> + <string name="cancel">Cancelar</string> + <string name="checkin_button_label">Buscar actualización</string> + <string name="checkin_download_failed">Incorrecto</string> + <string name="checkin_download_label">Descargar estado</string> + <string name="checkin_download_ongoing">Descargando</string> + <string name="checkin_download_pending">En espera</string> + <string name="checkin_download_succeeded">Completado</string> + <string name="checkin_download_suspended">Suspendido</string> + <string name="checkin_download_unknown">Estado desconocido</string> + <string name="checkin_failures_label">Fallos desde el último éxito</string> + <string name="checkin_last_time_label">Última registro correcto</string> + <string name="checkin_started_message">Registro iniciado\u2026</string> + <string name="checkin_status_label">Estado del registro</string> + <string name="checkin_time_never">(nunca)</string> + <string name="checkin_upgrade_label">Actualización pendiente</string> + <string name="choose_timezone">Seleccionar zona horaria</string> + <string name="choose_timezone_region">Seleccionar región</string> + <string name="clear_activities">Borrar valores predeterminados</string> + <string name="clear_data_dlg_text">Toda la información guardada en esta aplicación se eliminará de forma permanente. </string> + <string name="clear_data_dlg_title">Eliminar</string> + <string name="clear_data_failed">Incapaz de borrar los datos de la aplicación. </string> + <string name="clear_user_data_text">Borrar datos</string> + <string name="computing_size">Cálculo del tamaño de la aplicación\u2026</string> + <string name="connect">Conectar</string> + <string name="connect_to_blank">Conectar a <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="contributors_title">Contribuyentes</string> + <string name="copyright_title">Copyright</string> + <string name="data_settings">Configuración de datos</string> + <string name="data_settings_summary">Tarjeta SD y memoria de almacenamiento, sincronización de datos</string> + <string name="data_settings_title">Datos</string> + <string name="data_size_label">Datos</string> + <string name="date_and_time">Configuración de fecha y hora</string> + <string name="date_and_time_settings_summary">Configurar fecha, hora, zona horaria y formatos</string> + <string name="date_and_time_settings_title">Fecha y hora</string> + <string name="date_time_24hour">Utilizar el formato de 24 horas</string> + <string name="date_time_auto">Automático</string> + <string name="date_time_auto_summaryOff">Utilizar valores suministrados por la red</string> + <string name="date_time_auto_summaryOn">Utilizar valores suministrados por la red</string> + <string name="date_time_changeDate_text">Cambiar fecha</string> + <string name="date_time_changeTime_text">Cambiar hora</string> + <string name="date_time_dateDisplay_text">3 nov 1997</string> + <string name="date_time_date_format">Seleccionar formato de fecha</string> + <string name="date_time_set_date">Establecer fecha</string> + <string name="date_time_set_time">Establecer hora</string> + <string name="date_time_set_timezone">Establecer zona horaria</string> + <string name="date_time_setzone_text">Cambiar zona horaria</string> + <string name="date_time_timeDisplay_text">11:45:00 a.m.</string> + <string name="date_time_timezone_label">Zona horaria:</string> + <string name="debug_intent_sender_label">Debug intent sender</string> + <string name="default_date_format">dd/MM/aaaa</string> + <string name="default_keyboard_device_label">Dispositivo de teclado predeterminado</string> + <string name="development_settings_summary">Configuración para desarrollar la aplicación</string> + <string name="development_settings_title">Desarrollo</string> + <string name="device_info_asleeptime">Tiempo de inactividad</string> + <string name="device_info_awaketime">Tiempo de actividad</string> + <string name="device_info_default">Desconocido</string> + <string name="device_info_label">Información del dispositivo</string> + <string name="device_info_not_available">No disponible</string> + <string name="device_info_settings">Estado del teléfono</string> + <string name="device_info_uptime">Tiempo de funcionamiento</string> + <string name="device_status">Estado</string> + <string name="device_status_summary">IMEI, número de teléfono, señal, etc.</string> + <string name="dim_screen">Oscurecer pantalla</string> + <string name="disconnect_ums">Desconectar almacenamiento masivo USB</string> + <string name="display_font_size_label">Tamaño de fuente:</string> + <string name="display_label">Pantalla</string> + <string name="display_preview_label">Vista previa:</string> + <string name="display_settings">Configuración de visualización</string> + <string name="dlg_cancel">Cancelar</string> + <string name="dlg_ok">Aceptar</string> + <string name="done">Aceptar</string> + <string name="dtmf_tone_enable_summary_off">Reproducir sonidos al utilizar el panel marcado</string> + <string name="dtmf_tone_enable_summary_on">Reproducir sonidos al utilizar el panel marcado</string> + <string name="dtmf_tone_enable_title">Tonos táctiles con sonido</string> + <string name="enable_adb">Depuración de USB</string> + <string name="enable_adb_summary">Modo depuración cuando el dispositivo USB esté conectado</string> + <string name="error_apn_empty">El nombre del punto de acceso (APN) no puede dejarse en blanco.</string> + <string name="error_connecting">Incapaz de conectar a la red</string> + <string name="error_mcc_not3">El campo MCC debe tener 3 dígitos.</string> + <string name="error_mnc_not23">El campo MNC debe tener 2 ó 3 dígitos.</string> + <string name="error_name_empty">El campo Nombre no puede dejarse en blanco.</string> + <string name="error_saving">Incapaz de guardar la red</string> + <string name="error_scanning">Incapaz de buscar redes</string> + <string name="error_starting">Incapaz de iniciar Wi-Fi</string> + <string name="error_stopping">Incapaz de detener Wi-Fi</string> + <string name="error_title">¡Atención!</string> + <string name="failed_to_connect">Incapaz de conectar a <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="failed_to_pair">Incapaz de emparejar con <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="favorites_label">Favoritos</string> + <string name="firmware_version">Versión de firmware</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">Aceptar</string> + <string name="forget_network">Olvidar</string> + <string name="fragment_status_authenticating">Autenticación con <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_connected">Conectar a <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_connecting">Conectar a <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_disconnected">Desconectado</string> + <string name="fragment_status_disconnecting">Desconectar de <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_failed">Incorrecto</string> + <string name="fragment_status_obtaining_ip">Obteniendo dirección IP de <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_scanning">Búscando\u2026</string> + <string name="gsm_version_baseband_label">Versión de banda básica</string> + <string name="gsm_version_ril_impl_label">Versión RIL Impl</string> + <string name="install_all_warning">Su teléfono y los datos personales son más vulnerables a cualquier ataque de aplicaciones + procedentes de fuentes desconocidas. Por consiguiente, acepta ser el único responsable de cualquier + daño producido en el teléfono o ante la pérdida de datos como resultado del uso de + estas aplicaciones.</string> + <string name="install_applications">Fuentes desconocidas</string> + <string name="install_unknown_applications">Permitir la instalación de aplicaciones no comercializadas</string> + <string name="intent_sender_account_label">Cuenta: </string> + <string name="intent_sender_action_label">Acción:</string> + <string name="intent_sender_data_label">Datos:</string> + <string name="intent_sender_resource_label">Recurso: </string> + <string name="intent_sender_sendbroadcast_text">Enviar emisión</string> + <string name="intent_sender_startactivity_text">Iniciar actividad</string> + <string name="internal_memory">Almacenamiento interno del teléfono</string> + <string name="ip_address">Dirección IP</string> + <string name="kb_text">KB</string> + <string name="keep_screen_on">Permanecer activa</string> + <string name="keep_screen_on_summary">La pantalla nunca quedará en suspensión durante la carga</string> + <string name="kernel_version">Versión de núcleo</string> + <string name="kernel_version_label">Versión de núcleo de Linux</string> + <string name="keyguard_label">Protección de clave</string> + <string name="keyguard_password_button_text">Aceptar</string> + <string name="keyguard_password_confirm_new_label">Confirmar nueva contraseña:</string> + <string name="keyguard_password_mismatch_error_text">Las dos contraseñas no coinciden. Por favor, escríbalas de nuevo.</string> + <string name="keyguard_password_new_label">Contraseña nueva:</string> + <string name="keyguard_password_old_label">Contraseña anterior:</string> + <string name="keyguard_password_old_password_error_text">La contraseña anterior introducida no es correcta. Inténtelo de nuevo.</string> + <string name="keyguard_pin_mod_text">Cambiar PIN</string> + <string name="keyguard_pw_mod_text">Seleccionar patrón de bloqueo</string> + <string name="keyguard_sim_pin_label">PIN de SIM</string> + <string name="language_category">Configuración de idioma</string> + <string name="language_picker_title">Local</string> + <string name="language_settings">Texto</string> + <string name="language_settings_summary">Seleccione las opciones de corrección automática del texto</string> + <string name="large_font">Grande</string> + <string name="legal_information">Información legal</string> + <string name="legal_information_summary">Ver términos y condiciones</string> + <string name="license_title">Licencia</string> + <string name="location_gps">Habilitar satélites GPS</string> + <string name="location_gps_disabled">A nivel de la calle (precisa más batería y cielo abierto)</string> + <string name="location_label">Proveedor de ubicación:</string> + <string name="location_neighborhood_level">Ubicación determinada por redes Wi-Fi y/o móviles.</string> + <string name="location_network_based">Usar redes inalámbricas</string> + <string name="location_networks_disabled">Consulte la ubicación en aplicaciones (como Mapas) utilizando redes inalámbricas</string> + <string name="location_source">Mi ubicación</string> + <string name="location_source_summary">Seleccione fuentes para determinar la ubicación</string> + <string name="location_status">Estado:</string> + <string name="location_street_level">Ubicación precisa hasta llegar a la calle (desmarcar para conservar la batería)</string> + <string name="location_title">Mis fuentes de ubicación</string> + <string name="lock_example_message">Conecte al menos cuatro puntos.\n + \nSeleccione \u201CSiguiente\u201D cuando esté listo para trazar su propio patrón. + </string> + <string name="lock_example_title">Patrón de muestra</string> + <string name="lock_settings_title">Patrón de desbloqueo de pantalla</string> + <string name="lock_title">Seguridad en su teléfono</string> + <string name="lockpattern_change_lock_pattern_label">Cambiar patrón de desbloqueo</string> + <string name="lockpattern_confirm_button_text">Confirmar</string> + <string name="lockpattern_continue_button_text">Continuar</string> + <string name="lockpattern_need_to_confirm">Volver a mostrar patrón para confirmar:</string> + <string name="lockpattern_need_to_unlock">Confirmar patrón guardado:</string> + <string name="lockpattern_need_to_unlock_wrong">Lo siento, inténtelo de nuevo:</string> + <string name="lockpattern_pattern_confirmed_header">Su nuevo patrón de desbloqueo:</string> + <string name="lockpattern_pattern_entered_header">¡Patrón guardado!</string> + <string name="lockpattern_recording_incorrect_too_short">Conectar al menos <xliff:g id="number">%d</xliff:g> puntos. Inténtelo de nuevo:</string> + <string name="lockpattern_recording_inprogress">Suelte el dedo cuando haya terminado.</string> + <string name="lockpattern_recording_intro_footer">Pulse Menú para obtener ayuda.</string> + <string name="lockpattern_recording_intro_header">Trazar un patrón de desbloqueo:</string> + <string name="lockpattern_restart_button_text">Volver a trazar</string> + <string name="lockpattern_retry_button_text">Reintentar</string> + <string name="lockpattern_settings_change_lock_pattern">Cambiar patrón de desbloqueo</string> + <string name="lockpattern_settings_choose_lock_pattern">Configurar patrón de desbloqueo</string> + <string name="lockpattern_settings_enable_summary">Debe establecer un patrón para desbloquear la pantalla</string> + <string name="lockpattern_settings_enable_title">Se necesita patrón</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Utilizar patrón visible</string> + <string name="lockpattern_settings_help_how_to_record">Cómo trazar un patrón de desbloqueo:</string> + <string name="lockpattern_settings_title">Patrón de desbloqueo</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Inténtelo de nuevo en <xliff:g id="number">%d</xliff:g> segundos.</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">¡Demasiados intentos incorrectos!</string> + <string name="manage_applications_title">Administrar aplicaciones</string> + <string name="manage_space_text">Administrar espacio</string> + <string name="manageapplications_settings_title">Administrar aplicaciones</string> + <string name="mass_storage">Utilizar para almacenamiento USB</string> + <string name="master_clear_button_text">Restablecer teléfono</string> + <string name="master_clear_desc">Esta acción restablecerá el teléfono al estado inicial de fábrica, borrando todos los datos y aplicaciones descargadas.</string> + <string name="master_clear_failed">No se ha realizado ningún restablecimiento porque el servicio System Clear no está disponible.</string> + <string name="master_clear_final_button_text">Borrar todo</string> + <string name="master_clear_final_desc">¿Restablecer teléfono, borrando todos los datos y aplicaciones? ¡Este paso no podrá deshacerse!</string> + <string name="master_clear_gesture_explanation">Debe trazar su patrón de desbloqueo para confirmar el restablecimiento del teléfono. </string> + <string name="master_clear_gesture_prompt">Trace su patrón de desbloqueo:</string> + <string name="master_clear_summary">Eliminar todos los datos del teléfono</string> + <string name="master_clear_title">Restablecer según los datos de fábrica</string> + <string name="mb_text">MB</string> + <string name="media_volume_summary">Establecer el volumen de la música y los vídeos</string> + <string name="media_volume_title">Volumen de los medios</string> + <string name="medium_font">Medio</string> + <string name="memory_available">Espacio disponible</string> + <string name="memory_size">Espacio total</string> + <string name="menu_cancel">Rechazar</string> + <string name="menu_delete">Eliminar APN</string> + <string name="menu_new">Nueva APN</string> + <string name="menu_save">Guardar</string> + <string name="model_number">Número del modelo</string> + <string name="network_settings_summary">Configurar opciones para itinerancia, redes, nombres de puntos de acceso (APN)</string> + <string name="network_settings_title">Redes móviles</string> + <string name="networks">Selección de operador</string> + <string name="networks_title">Configuración de red</string> + <string name="next_button_label">Siguiente</string> + <string name="next_label">Siguiente</string> + <string name="notification_sound_dialog_title">Seleccionar tono de timbre de notificación</string> + <string name="notification_sound_summary">Configurar tono de timbre de notificación predeterminado</string> + <string name="notification_sound_title">Tonos de timbre de notificación</string> + <string name="permissions_label">Permisos</string> + <string name="phone_info_label">Información del teléfono</string> + <string name="phone_language">Seleccionar idioma</string> + <string name="ping_test_label">Ejecutar prueba ping</string> + <string name="please_type_hex_key">Tecla hex. WEP (0-9, A-F)</string> + <string name="please_type_passphrase">Contraseña inalámbrica</string> + <string name="product_brand_label">Marca del producto</string> + <string name="product_device_label">Tipo de teléfono</string> + <string name="progress_scanning">Buscando</string> + <string name="proxy_action_text">Guardar</string> + <string name="proxy_clear_text">Borrar</string> + <string name="proxy_defaultView_text">Restaurar predeterminados</string> + <string name="proxy_error">¡Atención!</string> + <string name="proxy_error_dismiss">Aceptar</string> + <string name="proxy_error_empty_host_set_port">El campo Puerto debe estar vacío si el campo Host está vacío.</string> + <string name="proxy_error_empty_port">Debe completar el campo puerto.</string> + <string name="proxy_error_invalid_host">El nombre de host que ha introducido no es válido.</string> + <string name="proxy_error_invalid_port">El nombre de puerto que ha introducido no es válido.</string> + <string name="proxy_hostname_label">Nombre de host</string> + <string name="proxy_port_label">Puerto</string> + <string name="proxy_settings_label">Configuración de proxy</string> + <string name="quick_launch_assign_application">Asignar aplicación</string> + <string name="quick_launch_clear_cancel_button">Cancelar</string> + <string name="quick_launch_clear_dialog_message">Su acceso directo para <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) se borrará.</string> + <string name="quick_launch_clear_dialog_title">Borrar</string> + <string name="quick_launch_clear_ok_button">Aceptar</string> + <string name="quick_launch_display_mode_applications">Aplicaciones</string> + <string name="quick_launch_display_mode_shortcuts">Accesos directos</string> + <string name="quick_launch_no_shortcut">Sin acceso directo</string> + <string name="quick_launch_shortcut">Buscar + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <string name="quick_launch_summary">Configuración de accesos directos en el teclado para iniciar aplicaciones</string> + <string name="quick_launch_title">Inicio rápido</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Conectado</string> + <string name="radioInfo_data_connecting">Conectando</string> + <string name="radioInfo_data_disconnected">Desconectado</string> + <string name="radioInfo_data_suspended">Suspendido</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">bytes</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">paq.</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Deshabilitar conexión de datos</string> + <string name="radioInfo_menu_disableDataOnBoot">Deshabilitar datos al arrancar</string> + <string name="radioInfo_menu_enableData">Habilitar conexión de datos</string> + <string name="radioInfo_menu_enableDataOnBoot">Habilitar datos al arrancar</string> + <string name="radioInfo_menu_getPDP">Obtener lista PDP</string> + <string name="radioInfo_menu_viewADN">Ver agenda de SIM</string> + <string name="radioInfo_menu_viewFDN">Ver números de marcado fijo</string> + <string name="radioInfo_menu_viewSDN">Ver números de marcado de servicio</string> + <string name="radioInfo_phone_idle">Inactivo</string> + <string name="radioInfo_phone_offhook">Llamada en curso</string> + <string name="radioInfo_phone_ringing">Sonando</string> + <string name="radioInfo_roaming_in">Itinerancia</string> + <string name="radioInfo_roaming_not">No itinerancia</string> + <string name="radioInfo_service_emergency">Sólo llamadas de emergencia</string> + <string name="radioInfo_service_in">En servicio</string> + <string name="radioInfo_service_off">Radio apagada</string> + <string name="radioInfo_service_out">Fuera de servicio</string> + <string name="radioInfo_unknown">desconocido</string> + <string name="radio_controls_summary">Administrar Wi-Fi, Bluetooth, modo avión y redes móviles</string> + <string name="radio_controls_title">Controles inalámbricos</string> + <string name="radio_info_band_mode_label">Seleccionar banda de radio</string> + <string name="radio_info_call_redirect_label">Redirección de llamada:</string> + <string name="radio_info_call_status_label">Estado de llamada:</string> + <string name="radio_info_current_network_label">Red actual:</string> + <string name="radio_info_data_attempts_label">Intentos de datos:</string> + <string name="radio_info_data_successes_label">Datos enviados correctamente:</string> + <string name="radio_info_gprs_service_label">Servicio GPRS:</string> + <string name="radio_info_gsm_disconnects_label">Desconexiones GSM:</string> + <string name="radio_info_gsm_service_label">Servicio GSM:</string> + <string name="radio_info_http_client_test">Prueba cliente HTTP:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">Mensaje esperando:</string> + <string name="radio_info_neighboring_location_label">CID cercano:</string> + <string name="radio_info_network_type_label">Tipo de red:</string> + <string name="radio_info_phone_number_label">Número de teléfono:</string> + <string name="radio_info_ping_hostname">Nombre de host para verificar conectividad (www.google.com):</string> + <string name="radio_info_ping_ipaddr">DireccIp Ping:</string> + <string name="radio_info_ppp_received_label">PPP recibido:</string> + <string name="radio_info_ppp_resets_label">Número de restablecimientos PPP desde el arranque:</string> + <string name="radio_info_ppp_sent_label">PPP enviados:</string> + <string name="radio_info_radio_resets_label">Restablecimientos de radio:</string> + <string name="radio_info_roaming_label">Itinerancia:</string> + <string name="radio_info_set_perferred_label">Establecer tipo de red preferido:</string> + <string name="radio_info_signal_location_label">Ubicación:</string> + <string name="radio_info_signal_strength_label">Intensidad de señal:</string> + <string name="radio_info_smsc_label">SMSC:</string> + <string name="radio_info_smsc_refresh_label">Actualizar</string> + <string name="radio_info_smsc_update_label">Actualizar</string> + <string name="radio_info_toggle_ciph_label">Alternar cifrado</string> + <string name="read_only">\u0020(Sólo lectura)</string> + <string name="recompute_size">Repetición del cálculo del tamaño\u2026</string> + <string name="ring_volume_summary">Ajuste del volumen de las llamadas entrantes</string> + <string name="ring_volume_title">Volumen del timbre</string> + <string name="ringer_volume_instructions">Utilizar los botones de volumen para ajustar el volumen del timbre</string> + <string name="ringer_volume_ringer_mode_label">Modo de timbre</string> + <string name="ringer_volume_ringtone_label">Tono de timbre</string> + <string name="ringer_volume_screen_increasing_text">Timbre creciente</string> + <string name="ringtone_summary">Ajuste el tono de timbre de la llamada entrante predeterminado</string> + <string name="ringtone_title">Tono de timbre del teléfono</string> + <string name="roaming">Datos en itinerancia</string> + <string name="roaming_disable">Conectar a servicios de datos durante itinerancia</string> + <string name="roaming_enable">Conectar a servicios de datos durante itinerancia</string> + <string name="roaming_reenable_message">Ha perdido la conectividad de datos porque ha abandonado su red doméstica con la opción Datos en itinerancia desactivada.</string> + <string name="roaming_reenable_title">¡Atención!</string> + <string name="roaming_turn_it_on_button">Activar</string> + <string name="roaming_warning">¿Permitir datos en itinerancia? Puede que incurra en importantes gastos por itinerancia.</string> + <string name="scan_wifi">Buscar</string> + <string name="screen_off_timeout_label">No agotar nunca el tiempo de espera durante la carga</string> + <string name="screen_timeout">Tiempo de espera en pantalla</string> + <string name="sd_card_settings_label">Tarjeta SD</string> + <string name="sd_eject">Desmontar/expulsar tarjeta SD</string> + <string name="sd_memory">Tarjeta SD</string> + <string name="sd_unavailable">No disponible</string> + <string name="sdcard_changes_instructions">Los cambios se aplicarán cuando se vuelva a conectar el cable USB</string> + <string name="sdcard_removal_alert_ok">Aceptar</string> + <string name="sdcard_removal_alert_scolding">La tarjeta SD se retiró cuando aún se estaba utilizando. + Para evitar que se dañe, utilice la pantalla Configuración de la tarjeta SD para desmontar la tarjeta antes de retirarla.</string> + <string name="sdcard_removal_alert_title">Extracción de tarjeta SD no segura</string> + <string name="sdcard_setting">Tarjeta SD</string> + <string name="sdcard_settings_available_bytes_label">Bytes disponibles:</string> + <string name="sdcard_settings_bad_removal_status">¡La tarjeta SD se ha extraído mientras seguía en uso!</string> + <string name="sdcard_settings_mass_storage_status">La tarjeta SD se está utilizando como dispositivo de almacenamiento masivo</string> + <string name="sdcard_settings_not_present_status">Ninguna tarjeta SD</string> + <string name="sdcard_settings_read_only_status">Tarjeta SD insertada de sólo lectura</string> + <string name="sdcard_settings_scanning_status">Buscando medios en tarjeta SD\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">Habilitar almacenamiento masivo USB</string> + <string name="sdcard_settings_total_bytes_label">Bytes totales:</string> + <string name="sdcard_settings_unmounted_status">Ahora es seguro extraer la tarjeta SD</string> + <string name="sdcard_settings_used_bytes_label">Bytes utilizados:</string> + <string name="sdcard_unmount">Desmontar tarjeta SD</string> + <string name="sdcard_unmountable_alert_ok">Aceptar</string> + <string name="sdcard_unmountable_alert_title">Tarjeta SD no legible</string> + <string name="sdcard_unmountable_message">La tarjeta SD no se puede leer. + Puede que el sistema de archivos esté dañado o la tarjeta defectuosa.</string> + <string name="security">Seguridad</string> + <string name="security_and_data_label">Seguridad y datos</string> + <string name="security_passwords_title">Contraseñas</string> + <string name="security_settings_desc">Ésta es la información a la que la aplicación puede acceder en su teléfono:</string> + <string name="security_settings_summary">Mi ubicación, desbloqueo de pantalla, bloqueo de tarjeta SIM</string> + <string name="security_settings_title">Seguridad y ubicación</string> + <string name="select_your_language">Seleccione su idioma</string> + <string name="set_lock_pattern_label">Trazar su patrón de desbloqueo:</string> + <string name="settings_chooser_pick_string"> + El icono de Configuración debería redirigir a: + </string> + <string name="settings_label">Configuración</string> + <string name="settings_license_activity_loading">Cargando\u2026</string> + <string name="settings_license_activity_title">Licencias de fuente abierta</string> + <string name="settings_license_activity_unavailable">Hay un problema con la carga de las licencias.</string> + <string name="show_password">Contraseñas visibles</string> + <string name="show_password_summary">Mostrar contraseña según escribe</string> + <string name="signal">Intensidad de señal</string> + <string name="silent_mode_summary">Todos los sonidos excepto los medios están en silencio</string> + <string name="silent_mode_title">Modo silencioso</string> + <string name="sim_bad_pin">PIN incorrecto</string> + <string name="sim_change_failed">Fallo al cambiar PIN\nPIN posiblemente incorrecto.</string> + <string name="sim_change_pin">Cambiar PIN de SIM</string> + <string name="sim_change_succeeded">PIN de SIM cambiado correctamente</string> + <string name="sim_disable_sim_lock">Deshabilitar bloqueo de tarjeta SIM</string> + <string name="sim_enable_sim_lock">Habilitar bloqueo de tarjeta SIM</string> + <string name="sim_enter_cancel">Cancelar</string> + <string name="sim_enter_new">Introducir nuevo PIN</string> + <string name="sim_enter_ok">Aceptar</string> + <string name="sim_enter_old">Introducir PIN anterior</string> + <string name="sim_enter_pin">Introducir el PIN de la SIM</string> + <string name="sim_lock_failed">Fallo al cambiar el estado de bloqueo de la tarjeta SIM.\nPIN posiblemente incorrecto.</string> + <string name="sim_lock_off">Necesita un código PIN para utilizar el teléfono</string> + <string name="sim_lock_on">Necesita un código PIN para utilizar el teléfono</string> + <string name="sim_lock_settings">Configuración de bloqueo de la tarjeta SIM</string> + <string name="sim_lock_settings_category">Configuración de bloqueo de la tarjeta SIM</string> + <string name="sim_lock_settings_title">Bloqueo de tarjeta SIM</string> + <string name="sim_pin_change">Cambiar código PIN</string> + <string name="sim_pin_toggle">Bloqueo de la tarjeta SIM</string> + <string name="sim_pins_dont_match">Los códigos PIN no coinciden.</string> + <string name="sim_reenter_new">Vuelva a introducir el nuevo PIN</string> + <string name="skip_button_label">Cancelar</string> + <string name="small_font">Pequeño</string> + <string name="software_version">Versión de software</string> + <string name="sort_order_alpha">Ordenar alfabéticamente</string> + <string name="sort_order_size">Ordenar por tamaño (descendente)</string> + <string name="sound_and_display_settings">Sonido y visualización</string> + <string name="sound_and_display_settings_summary">Configurar tonos de timbre, notificaciones y brillo de la pantalla</string> + <string name="sound_effects_enable_summary_off">Reproducir sonido al seleccionar algo en la pantalla</string> + <string name="sound_effects_enable_summary_on">Reproducir sonido al seleccionar algo en la pantalla</string> + <string name="sound_effects_enable_title">Selección sonora</string> + <string name="sound_settings">Configuración de sonido</string> + <string name="status_authenticating">Autenticación\u2026</string> + <string name="status_awake_time">Tiempo de actividad</string> + <string name="status_bt_address">Dirección Bluetooth</string> + <string name="status_connected">Conectado</string> + <string name="status_connecting">Conectando\u2026</string> + <string name="status_data_state">Acceso a los datos</string> + <string name="status_disconnected">Desconectado</string> + <string name="status_disconnecting">Desconexión\u2026</string> + <string name="status_failed">Incorrecto</string> + <string name="status_imei">IMEI</string> + <string name="status_imei_sv">IMEI SV</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Tipo de red</string> + <string name="status_number">Número de teléfono</string> + <string name="status_obtaining_ip">Obtener dirección\u2026</string> + <string name="status_operator">Red</string> + <string name="status_roaming">Itinerancia</string> + <string name="status_scanning">Búscando\u2026</string> + <string name="status_service_state">Estado del servicio</string> + <string name="status_signal_strength">Intensidad de señal</string> + <string name="status_unavailable">No disponible</string> + <string name="status_up_time">Tiempo de funcionamiento</string> + <string name="status_wifi_mac_address">Dirección MAC Wi-Fi</string> + <string name="stay_on">La pantalla está siempre activa durante la carga</string> + <string name="storage_label">Almacenamiento</string> + <string name="storage_settings_summary">Tarjeta SD no insertada, ver almacenamiento disponible</string> + <string name="storage_settings_title">Tarjeta SD y memoria de almacenamiento</string> + <string name="sum_carrier_select">Seleccionar un operador de red</string> + <string name="summary_connection_failed">No se ha podido realizar la conexión, vuelva a intentarlo</string> + <string name="summary_not_in_range">No en intervalo</string> + <string name="summary_remembered">Recordado</string> + <string name="sync_automatically">Sincronización automática</string> + <string name="sync_calendar">Calendario</string> + <string name="sync_contacts">Contactos</string> + <string name="sync_disabled">Seleccione la sincronización automática de datos</string> + <string name="sync_do_nothing">No hacer nada por el momento.</string> + <string name="sync_enabled">Sincronización automática de datos</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_is_failing">La sincronización presenta algunos problemas. Se solucionarán en breve. </string> + <string name="sync_menu_sync_cancel">Cancelar sincronización</string> + <string name="sync_menu_sync_now">Sincronizar ahora</string> + <string name="sync_really_delete">Eliminar los elementos.</string> + <string name="sync_settings">Sincronización de datos</string> + <string name="sync_settings_summary">Seleccionar qué aplicaciones están sincronizadas</string> + <string name="sync_too_many_deletes">Eliminar límite excedido</string> + <string name="sync_too_many_deletes_desc">Hay %d elementos eliminados en %s, cuenta %s. ¿Qué quiere hacer?</string> + <string name="sync_undo_deletes">Deshacer lo eliminado.</string> + <string name="target_build_field_label">Tipo de compilación solicitado</string> + <string name="team_title">Equipo</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">Puerto MMS:</string> + <string name="telephony_mmsproxy_label">Proxy MMS:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">Nombre:</string> + <string name="telephony_password_label">Contraseña:</string> + <string name="telephony_port_label">Puerto:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">Servidor:</string> + <string name="telephony_user_label">Usuario:</string> + <string name="terms_title">Términos y condiciones</string> + <string name="testing">Probando</string> + <string name="testing_battery_info">Información de la batería</string> + <string name="testing_phone_info">Información del teléfono</string> + <string name="testing_sim_toolkit">Herramientas SIM</string> + <string name="text_category">Configuración de texto</string> + <string name="total_size_label">Total</string> + <string name="turn_off_qxdm">Deshabilitar registro QXDM SD</string> + <string name="turn_off_radio">Apagar radio</string> + <string name="turn_on_qxdm">Habilitar registro QXDM SD</string> + <string name="turn_on_radio">Encender radio</string> + <string name="underdeveloped_settings_label">Configuración menos desarrollada</string> + <string name="uninstall_failed">Incapaz de desinstalar la aplicación. </string> + <string name="uninstall_text">Desinstalar</string> + <string name="unknown">Desconocido</string> + <string name="vibrate_summary">Vibración del teléfono al recibir llamadas</string> + <string name="vibrate_title">Vibración del teléfono</string> + <string name="wallpaper_label">Papel tapiz</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Redes Wi-Fi </string> + <string name="wifi_add_other_network">Agregar una red Wi-Fi</string> + <string name="wifi_context_menu_change_password">Cambiar contraseña</string> + <string name="wifi_context_menu_connect">Conectar a la red</string> + <string name="wifi_context_menu_forget">Olvidar red</string> + <string name="wifi_dhcp_timeout_error">Hay problemas al obtener una dirección IP. </string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_dns_label">dns:</string> + <string name="wifi_error">Error</string> + <string name="wifi_gateway">Puerta de enlace</string> + <string name="wifi_gateway_label">puerta de enlace:</string> + <string name="wifi_generic_connection_error">Hay problemas de conexión con la red. Por favor, inténtelo de nuevo.</string> + <string name="wifi_host_ip">ip de host:</string> + <string name="wifi_ip_address">Dirección IP</string> + <string name="wifi_ip_settings_invalid_ip">Escriba una dirección IP válida.</string> + <string name="wifi_ip_settings_menu_cancel">Cancelar</string> + <string name="wifi_ip_settings_menu_save">Guardar</string> + <string name="wifi_ip_settings_titlebar">Configuración IP</string> + <string name="wifi_link_speed">Velocidad</string> + <string name="wifi_menu_advanced">Avanzado</string> + <string name="wifi_netmask">Máscara de red</string> + <string name="wifi_netmask_label">máscara de red:</string> + <string name="wifi_notify_open_networks">Notificación de red</string> + <string name="wifi_notify_open_networks_summary">Notificar cuando esté disponible una red abierta</string> + <string name="wifi_password_incorrect_error">La contraseña de red introducida no es correcta. Inténtelo de nuevo.</string> + <string name="wifi_password_unchanged">(sin cambios)</string> + <string name="wifi_prefer_wifi">Preferir Wi-Fi</string> + <string name="wifi_quick_toggle_summary">Seleccione la activación Wi-Fi. </string> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <string name="wifi_save_config">Guardar</string> + <string name="wifi_screen_activate_text">Activar</string> + <string name="wifi_screen_dhcp_text">automática</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">manual</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">La red Wi-Fi está funcionando</string> + <string name="wifi_screen_test_text">Prueba</string> + <string name="wifi_security">Seguridad</string> + <string name="wifi_security_open">Abrir</string> + <string name="wifi_security_unknown">Desconocido</string> + <string name="wifi_security_verbose_open">Red abierta</string> + <string name="wifi_security_verbose_wep">Protegida con WEP</string> + <string name="wifi_security_verbose_wpa">Protegida con WPA</string> + <string name="wifi_security_verbose_wpa2">Protegida con WPA2</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_settings">Configuración de Wi-Fi</string> + <string name="wifi_settings_category">Configuración de Wi-Fi</string> + <string name="wifi_settings_summary">Configurar y administrar puntos de acceso inalámbrico</string> + <string name="wifi_show_password">Mostrar contraseña. </string> + <string name="wifi_signal_0">Mala</string> + <string name="wifi_signal_1">Normal</string> + <string name="wifi_signal_2">Buena</string> + <string name="wifi_signal_3">Excelente</string> + <string name="wifi_starting">Activar\u2026</string> + <string name="wifi_status">Estado</string> + <string name="wifi_stopping">Desactivar\u2026</string> + <string name="wifi_type_ssid">Escribir la red SSID:</string> + <string name="wifi_use_static_ip">Usar IP estática</string> + <string name="wifi_wlan_id">id de wlan:</string> +</resources> diff --git a/res/values-fr-rFR/strings.xml b/res/values-fr-rFR/strings.xml new file mode 100644 index 0000000..2c86e80 --- /dev/null +++ b/res/values-fr-rFR/strings.xml @@ -0,0 +1,700 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="about_settings">À propos du téléphone</string> + <string name="about_settings_summary">Afficher les infos légales, l\'état du téléphone, la version logicielle</string> + <string name="activity_picker_label">Sélectionner l\'activité</string> + <string name="airplane_mode">Mode Avion</string> + <string name="airplane_mode_summary">Sélectionner pour désactiver toutes connexions sans fil</string> + <string name="airplane_mode_turning_off">Activation des connexions sans fil\u2026</string> + <string name="airplane_mode_turning_on">Désactivation des connexions sans fil\u2026</string> + <string name="android_id_label">ID Android</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Modifier le point d\'accès</string> + <string name="apn_http_port">Port</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">Port MMS</string> + <string name="apn_mms_proxy">Proxy MMS</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Nom</string> + <string name="apn_not_set"><Non défini></string> + <string name="apn_password">Mot de passe</string> + <string name="apn_server">Serveur</string> + <string name="apn_settings">APN</string> + <string name="apn_type">Type APN</string> + <string name="apn_user">Nom d\'utilisateur</string> + <string name="app_launcher_newView_text">Lanceur nouv.app</string> + <string name="app_not_found_dlg_text"> L\'application n\'a pas été +trouvée dans la liste des applications installées.</string> + <string name="app_not_found_dlg_title">Application non trouvée</string> + <string name="application_info_label">Infos d\'application</string> + <string name="application_size_label">Application</string> + <string name="applications_settings">Applications</string> + <string name="applications_settings_header">Paramètres d\'application</string> + <string name="applications_settings_summary">Gérer les applications, configurer des raccourcis de lancement rapide</string> + <string name="auto_caps">Auto-maj</string> + <string name="auto_caps_summary">Première lettre des phrases en majuscule</string> + <string name="auto_launch_disable_text">Aucune valeur par défaut définie.</string> + <string name="auto_launch_enable_text">Vous avez choisi de lancer cette application par défaut pour certaines actions.</string> + <string name="auto_launch_label">Lancer par défaut</string> + <string name="auto_punctuate">Auto-ponctuation</string> + <string name="auto_punctuate_summary">Appuyez la touche Espace deux fois pour insérer \u0022.\u0022</string> + <string name="auto_replace">Auto-remplacer</string> + <string name="auto_replace_summary">Corriger les mots avec faute de frappe</string> + <string name="autorotate">Auto-pivoter</string> + <string name="autorotate_summary_off">Le changement de l\'orientation de l\'écran ne fait pas pivoter l\'application</string> + <string name="autorotate_summary_on">Le changement de l\'orientation de l\'écran fait pivoter l\'application</string> + <string name="b_text">B</string> + <string name="band_mode_failed">Échec</string> + <string name="band_mode_loading">Chargement de la liste de bandes\u2026</string> + <string name="band_mode_set">Définir</string> + <string name="band_mode_succeeded">Réussi</string> + <string name="band_mode_title">Définir la bande GSM/UMTS</string> + <string name="baseband_version">Version bande de base</string> + <string name="basic_settings_title">Infos de base du téléphone</string> + <string name="battery_info_awake_battery">Heures de réveil sur batterie :</string> + <string name="battery_info_awake_plugged">Heures de réveil en charge :</string> + <string name="battery_info_health_dead">Mort</string> + <string name="battery_info_health_good">Bonne</string> + <string name="battery_info_health_label">Santé de la batterie :</string> + <string name="battery_info_health_over_voltage">Surtension</string> + <string name="battery_info_health_overheat">Surchauffe</string> + <string name="battery_info_health_unknown">Inconnu</string> + <string name="battery_info_health_unspecified_failure">Erreur inconnue</string> + <string name="battery_info_label">Infos de la batterie</string> + <string name="battery_info_level_label">Niveau de la batterie :</string> + <string name="battery_info_scale_label">Échelle de la batterie :</string> + <string name="battery_info_screen_on">Durée d\'écran allumé :</string> + <string name="battery_info_status_charging">Chargement</string> + <string name="battery_info_status_charging_ac">(Secteur)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Déchargement</string> + <string name="battery_info_status_full">Pleine</string> + <string name="battery_info_status_label">État de la batterie :</string> + <string name="battery_info_status_not_charging">Pas en charge</string> + <string name="battery_info_status_unknown">Inconnu</string> + <string name="battery_info_technology_label">Technologie de la batterie :</string> + <string name="battery_info_temperature_label">Température de la batterie :</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">Durée depuis l\'amorçage :</string> + <string name="battery_info_voltage_label">Tension de la batterie :</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_level_title">Niveau de la batterie</string> + <string name="battery_status_title">État de la batterie</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Effacer la liste d\'appareil</string> + <string name="bluetooth_connect">Connecter</string> + <string name="bluetooth_connectable">Connectable seulement</string> + <string name="bluetooth_connected">Connecté</string> + <string name="bluetooth_connecting">Connexion\u2026</string> + <string name="bluetooth_device">mains-libres/casque</string> + <string name="bluetooth_device_info">Infos d\'appareil Bluetooth</string> + <string name="bluetooth_device_info_alias">Alias d\'appareil</string> + <string name="bluetooth_device_info_delete">Retirer cet appareil</string> + <string name="bluetooth_device_info_no_alias">Saisissez l\'alias ici\u2026</string> + <string name="bluetooth_device_info_sdp">Lister les services pris en charge</string> + <string name="bluetooth_device_name">Nom d\'appareil</string> + <string name="bluetooth_devices">Appareils Bluetooth</string> + <string name="bluetooth_disabled">Sélectionner d\'activer Bluetooth</string> + <string name="bluetooth_disconnect">Déconnecter</string> + <string name="bluetooth_disconnect_blank"><xliff:g id="device_name">%1$s</xliff:g> sera déconnecté</string> + <string name="bluetooth_discoverability_panel_title">Me rendre\u2026</string> + <string name="bluetooth_discoverable">Découvrable pendant %1$s secondes</string> + <string name="bluetooth_enable_text">Bouton vide\u2026</string> + <string name="bluetooth_enabled">Sélectionner d\'activer Bluetooth</string> + <string name="bluetooth_enabling">Activation de Bluetooth\u2026</string> + <string name="bluetooth_enter_pin_msg">Saisir le code PIN pour\u0020</string> + <string name="bluetooth_failed_to_enable">Impossible d\'activer Bluetooth</string> + <string name="bluetooth_is_discoverable">Découvrable pendant %1$s secondes\u2026</string> + <string name="bluetooth_name_not_set">Pas de nom défini, utilise le nom de compte</string> + <string name="bluetooth_neither">Pas découvrable et pas connectable</string> + <string name="bluetooth_new_data">Saisir nouvelles données</string> + <string name="bluetooth_new_data_cancel">Annuler</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_not_connected">Lier avec cet appareil</string> + <string name="bluetooth_not_discoverable">Sélectionner pour rendre l\'appareil découvrable</string> + <string name="bluetooth_notif_message">Sélectionner de lier avec\u0020</string> + <string name="bluetooth_notif_ticker">Liaison Bluetooth demandée</string> + <string name="bluetooth_notif_title">Liaison Bluetooth demandée</string> + <string name="bluetooth_pair">Lier</string> + <string name="bluetooth_paired">Lié</string> + <string name="bluetooth_paired_not_nearby">Lié</string> + <string name="bluetooth_pairing">Liaison\u2026</string> + <string name="bluetooth_pairing_msg">Liaison\u2026</string> + <string name="bluetooth_pin_entry">Entrée de code PIN Bluetooth</string> + <string name="bluetooth_quick_toggle_summary">Sélectionner d\'activer Bluetooth</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Rechercher les appareils</string> + <string name="bluetooth_scan_for_new_devices">Recherche de nouveaux appareils\u2026</string> + <string name="bluetooth_scan_text">Bouton vide\u2026</string> + <string name="bluetooth_settings">Paramètres Bluetooth</string> + <string name="bluetooth_settings_summary">Gérer les connexions, définir le nom d\'appareil et la découvrabilité</string> + <string name="bluetooth_settings_text">Bouton vide\u2026</string> + <string name="bluetooth_settings_title">Paramètres Bluetooth</string> + <string name="bluetooth_starting">Démarrage Bluetooth\u2026</string> + <string name="bluetooth_stopping">Arrêt Bluetooth\u2026</string> + <string name="bluetooth_unknown">Inconnu</string> + <string name="bluetooth_unpair">Délier</string> + <string name="bluetooth_visibility">Découvrable</string> + <string name="bootloader_version">Version de chargeur d\'amorçage</string> + <string name="brightness">Luminosité</string> + <string name="build_date_label">Date de Build</string> + <string name="build_description_label">Description de Build</string> + <string name="build_host_label">Hôte de Build</string> + <string name="build_id_label">ID Build</string> + <string name="build_number">Numéro de Build</string> + <string name="build_type_label">Type de Build</string> + <string name="build_user_label">Utilisateur de Build</string> + <string name="call_settings_summary">Configurer la messagerie vocale, le transfert d\'appel, le signal d\'appel, l\'identification de l\'appelant</string> + <string name="call_settings_title">Paramètres d\'appel</string> + <string name="cancel">Annuler</string> + <string name="checkin_button_label">Rechercher les mises à niveau</string> + <string name="checkin_download_failed">Échec</string> + <string name="checkin_download_label">État de téléchargement</string> + <string name="checkin_download_ongoing">Téléchargement en cours</string> + <string name="checkin_download_pending">En attente</string> + <string name="checkin_download_succeeded">Terminé</string> + <string name="checkin_download_suspended">Suspendu</string> + <string name="checkin_download_unknown">État inconnu</string> + <string name="checkin_failures_label">Échecs depuis le dernier succès</string> + <string name="checkin_last_time_label">Dernière vérification réussie</string> + <string name="checkin_started_message">Vérification démarrée\u2026</string> + <string name="checkin_status_label">État de vérification</string> + <string name="checkin_time_never">(jamais)</string> + <string name="checkin_upgrade_label">Mise à niveau en attente</string> + <string name="choose_timezone">Sélectionner le fuseau horaire</string> + <string name="choose_timezone_region">Sélectionner la région</string> + <string name="clear_activities">Effacer les valeurs par défaut</string> + <string name="clear_data_dlg_text">Toutes les informations enregistrées dans cette application seront supprimées de manière permanente.</string> + <string name="clear_data_dlg_title">Supprimer</string> + <string name="clear_data_failed">Impossible d\'effacer les données de l\'application.</string> + <string name="clear_user_data_text">Effacer les données</string> + <string name="computing_size">Calcul des tailles de l\'application\u2026</string> + <string name="connect">Connecter</string> + <string name="connect_to_blank">Connecter à <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="contributors_title">Contributeurs</string> + <string name="copyright_title">Copyright</string> + <string name="data_settings">Paramètres des données</string> + <string name="data_settings_summary">Stockage du téléphone et carte SD, synchronisation des données</string> + <string name="data_settings_title">Données</string> + <string name="data_size_label">Données</string> + <string name="date_and_time">Paramètres de date et heure</string> + <string name="date_and_time_settings_summary">Définir la date, l\'heure, le fuseau horaire et les formats</string> + <string name="date_and_time_settings_title">Date et heure</string> + <string name="date_time_24hour">Utiliser le format 24 heures</string> + <string name="date_time_auto">Automatique</string> + <string name="date_time_auto_summaryOff">Utiliser les valeurs fournies par le réseau</string> + <string name="date_time_auto_summaryOn">Utiliser les valeurs fournies par le réseau</string> + <string name="date_time_changeDate_text">Modifier la date</string> + <string name="date_time_changeTime_text">Modifier l\'heure</string> + <string name="date_time_dateDisplay_text">3 nov. 1997</string> + <string name="date_time_date_format">Sélectionner le format de la date</string> + <string name="date_time_set_date">Définir la date</string> + <string name="date_time_set_time">Définir l\'heure</string> + <string name="date_time_set_timezone">Définir le fuseau horaire</string> + <string name="date_time_setzone_text">Modifier le fuseau horaire</string> + <string name="date_time_timeDisplay_text">11:45 AM</string> + <string name="date_time_timezone_label">Fuseau horaire :</string> + <string name="debug_intent_sender_label">Déboguer l\'expéditeur d\'intention</string> + <string name="default_date_format">MM/jj/aaaa</string> + <string name="default_keyboard_device_label">Clavier par défaut</string> + <string name="development_settings_summary">Paramètres pour le développement d\'application</string> + <string name="development_settings_title">Développement</string> + <string name="device_info_asleeptime">Heures de veille</string> + <string name="device_info_awaketime">Heures de réveil</string> + <string name="device_info_default">Inconnu</string> + <string name="device_info_label">Infos d\'appareil</string> + <string name="device_info_not_available">indisponible</string> + <string name="device_info_settings">État du téléphone</string> + <string name="device_info_uptime">Temps productif</string> + <string name="device_status">État</string> + <string name="device_status_summary">IMEI, numéro de téléphone, signal, etc.</string> + <string name="dim_screen">Assombrir l\'écran</string> + <string name="disconnect_ums">Déconnecter le stockage de masse USB</string> + <string name="display_font_size_label">Taille de police :</string> + <string name="display_label">Affichage</string> + <string name="display_preview_label">Aperçu :</string> + <string name="display_settings">Paramètres d\'affichage</string> + <string name="dlg_cancel">Annuler</string> + <string name="dlg_ok">OK</string> + <string name="done">OK</string> + <string name="dtmf_tone_enable_summary_off">Émettre les tonalités lors de l\'utilisation du pavé de numérotation</string> + <string name="dtmf_tone_enable_summary_on">Émettre les tonalités lors de l\'utilisation du pavé de numérotation</string> + <string name="dtmf_tone_enable_title">Tonalités de touches audibles</string> + <string name="enable_adb">Débogage USB</string> + <string name="enable_adb_summary">Mode de débogage lors la connexion USB</string> + <string name="error_apn_empty">Le champ APN ne peut pas être vide.</string> + <string name="error_connecting">Impossible de connecter au réseau.</string> + <string name="error_mcc_not3">Le champ MCC doit avoir 3 chiffres.</string> + <string name="error_mnc_not23">Le champ MNC avoir 2 ou 3 chiffres.</string> + <string name="error_name_empty">Le champ Nom ne peut pas être vide.</string> + <string name="error_saving">Impossible d\'enregistrer le réseau</string> + <string name="error_scanning">Impossible de rechercher les réseaux</string> + <string name="error_starting">Impossible de démarrer Wi-Fi</string> + <string name="error_stopping">Impossible d\'arrêter Wi-Fi</string> + <string name="error_title">Attention</string> + <string name="failed_to_connect">Impossible de connecter à <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="failed_to_pair">Impossible de lier avec <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="favorites_label">Favoris</string> + <string name="firmware_version">Version de microprogramme</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + <string name="forget_network">Oublier</string> + <string name="fragment_status_authenticating">Authentification avec <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_connected">Connecté à <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_connecting">Connexion à <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_disconnected">Déconnecté</string> + <string name="fragment_status_disconnecting">Déconnexion de <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_failed">Échec</string> + <string name="fragment_status_obtaining_ip">Obtention de l\'adresse IP de <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_scanning">Recherche\u2026</string> + <string name="gsm_version_baseband_label">Version bande de base</string> + <string name="gsm_version_ril_impl_label">Version Impl RIL</string> + <string name="install_all_warning">Votre téléphone et données personnelles sont plus vulnérable aux attaques + des applications de sources inconnues. Vous acceptez être entièrement + responsable de tout dommage à votre téléphone ou perte de données + qui peuvent résulter de l\'utilisation de ces applications.</string> + <string name="install_applications">Sources inconnues</string> + <string name="install_unknown_applications">Permettre l\'installation d\'applications non-Market</string> + <string name="intent_sender_account_label">Compte : </string> + <string name="intent_sender_action_label">Action :</string> + <string name="intent_sender_data_label">Données :</string> + <string name="intent_sender_resource_label">Ressource : </string> + <string name="intent_sender_sendbroadcast_text">Envoyer la diffusion</string> + <string name="intent_sender_startactivity_text">Démarrer l\'activité</string> + <string name="internal_memory">Stockage interne du téléphone</string> + <string name="ip_address">Adresse IP</string> + <string name="kb_text">Ko</string> + <string name="keep_screen_on">Rester réveillé</string> + <string name="keep_screen_on_summary">L\'écran n\'entrera jamais en veille pendant la charge</string> + <string name="kernel_version">Version de kernel</string> + <string name="kernel_version_label">Version de kernel Linux</string> + <string name="keyguard_label">Garde-touches</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Confirmer nouveau mot de passe :</string> + <string name="keyguard_password_mismatch_error_text">Les deux mots de passe ne correspondent pas. Veuillez les saisir à nouveau.</string> + <string name="keyguard_password_new_label">Nouveau mot de passe :</string> + <string name="keyguard_password_old_label">Ancien mot de passe :</string> + <string name="keyguard_password_old_password_error_text">L\'ancien code mot de passe saisi est incorrect. Veuillez réessayer.</string> + <string name="keyguard_pin_mod_text">Modifier le code PIN</string> + <string name="keyguard_pw_mod_text">Sélectionner le motif de verrouillage</string> + <string name="keyguard_sim_pin_label">PIN SIM</string> + <string name="language_category">Paramètre de langue</string> + <string name="language_picker_title">Paramètres régionaux</string> + <string name="language_settings">Texte</string> + <string name="language_settings_summary">Sélectionner les options d\'autocorrection du texte</string> + <string name="large_font">Grande</string> + <string name="legal_information">Informations légales</string> + <string name="legal_information_summary">Afficher les termes et conditions</string> + <string name="license_title">Licence</string> + <string name="location_gps">Activer les satellites GPS</string> + <string name="location_gps_disabled">Localiser à la rue prêt (nécessite plus de batterie et une vue du ciel)</string> + <string name="location_label">Fournisseur de localisation :</string> + <string name="location_neighborhood_level">Localisation déterminée par réseaux Wi-Fi et/ou mobiles</string> + <string name="location_network_based">Utiliser les réseaux sans fil</string> + <string name="location_networks_disabled">Voir la localisation dans les applications (telles que Maps) en utilisant les réseaux sans fil</string> + <string name="location_source">Ma localisation</string> + <string name="location_source_summary">Sélectionner les sources pour déterminer la localisation</string> + <string name="location_status">État :</string> + <string name="location_street_level">En localisation, précise à la rue prêt (désélectionner pour économiser la batterie)</string> + <string name="location_title">Sources de Ma localisation</string> + <string name="lock_example_message">Connectez au moins quatre points.\n + \nSélectionnez \"Suivant\" lorsque vous êtes prêt à dessiner votre propre motif. + </string> + <string name="lock_example_title">Exemple de motif</string> + <string name="lock_settings_title">Motif de déverrouillage de l\'écran</string> + <string name="lock_title">Sécurisation de votre téléphone</string> + <string name="lockpattern_change_lock_pattern_label">Modifier le motif de déverrouillage</string> + <string name="lockpattern_confirm_button_text">Confirmer</string> + <string name="lockpattern_continue_button_text">Continuer</string> + <string name="lockpattern_need_to_confirm">Dessiner le motif à nouveau pour confirmer :</string> + <string name="lockpattern_need_to_unlock">Confirmer le motif enregistré :</string> + <string name="lockpattern_need_to_unlock_wrong">Désolé, réessayez :</string> + <string name="lockpattern_pattern_confirmed_header">Votre nouveau motif de déverrouillage :</string> + <string name="lockpattern_pattern_entered_header">Motif enregistré !</string> + <string name="lockpattern_recording_incorrect_too_short">Connectez au moins <xliff:g id="number">%d</xliff:g> points. Réessayez :</string> + <string name="lockpattern_recording_inprogress">Relâchez le doigt quand terminé.</string> + <string name="lockpattern_recording_intro_footer">Appuyez Menu pour de l\'aide.</string> + <string name="lockpattern_recording_intro_header">Dessinez un motif de déverrouillage :</string> + <string name="lockpattern_restart_button_text">Redessiner</string> + <string name="lockpattern_retry_button_text">Réessayer</string> + <string name="lockpattern_settings_change_lock_pattern">Modifier le motif de déverrouillage</string> + <string name="lockpattern_settings_choose_lock_pattern">Définir le motif de verrouillage</string> + <string name="lockpattern_settings_enable_summary">Dessin obligatoire du motif pour déverrouiller l\'écran</string> + <string name="lockpattern_settings_enable_title">Motif requis</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Utiliser un motif visible</string> + <string name="lockpattern_settings_help_how_to_record">Comment dessiner un motif de déverrouillage :</string> + <string name="lockpattern_settings_title">Motif de déverrouillage</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Réessayez dans <xliff:g id="number">%d</xliff:g> secondes.</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Trop de tentatives incorrectes.</string> + <string name="manage_applications_title">Gérer les applications</string> + <string name="manage_space_text">Gérer l\'espace</string> + <string name="manageapplications_settings_title">Gérer les applications</string> + <string name="mass_storage">Utiliser pour le stockage USB</string> + <string name="master_clear_button_text">Réinitialiser le téléphone</string> + <string name="master_clear_desc">Cette action réinitialisera le téléphone à son état initial de l\'usine, effaçant toutes les données et applications téléchargées !</string> + <string name="master_clear_failed">Aucune réinitialisation effectuée car le service Système effacé n\'est pas disponible.</string> + <string name="master_clear_final_button_text">Effacer tout</string> + <string name="master_clear_final_desc">Réinitialiser le téléphone, effaçant toutes vos données et applications ? L\'action ne peut pas être inversée !</string> + <string name="master_clear_gesture_explanation">Vous devez dessiner votre motif de déverrouillage pour confirmer la réinitialisation du téléphone.</string> + <string name="master_clear_gesture_prompt">Veuillez dessiner votre motif de déverrouillage :</string> + <string name="master_clear_summary">Efface toutes les données sur le téléphone</string> + <string name="master_clear_title">Réinitialisation aux données d\'usine</string> + <string name="mb_text">Mo</string> + <string name="media_volume_summary">Définir le volume pour la musique et les vidéos</string> + <string name="media_volume_title">Volume média</string> + <string name="medium_font">Moyen</string> + <string name="memory_available">Espace disponible</string> + <string name="memory_size">Espace total</string> + <string name="menu_cancel">Abandonner</string> + <string name="menu_delete">Supprimer APN</string> + <string name="menu_new">Nouvel APN</string> + <string name="menu_save">Enregistrer</string> + <string name="model_number">Numéro de modèle</string> + <string name="network_settings_summary">Définir les options pour l\'itinérance, les réseaux, les APN</string> + <string name="network_settings_title">Réseaux mobiles</string> + <string name="networks">Sélection de l\'opérateur</string> + <string name="networks_title">Paramètres réseau</string> + <string name="next_button_label">Suivant</string> + <string name="next_label">Suivant</string> + <string name="notification_sound_dialog_title">Sélectionner la sonnerie de notification</string> + <string name="notification_sound_summary">Définir votre sonnerie de notification par défaut</string> + <string name="notification_sound_title">Sonnerie de notification</string> + <string name="permissions_label">Permissions</string> + <string name="phone_info_label">Infos téléphone</string> + <string name="phone_language">Sélectionner la langue</string> + <string name="ping_test_label">Exécuter test ping</string> + <string name="please_type_hex_key">Clé hex WEP (0-9, A-F)</string> + <string name="please_type_passphrase">Mot de passe sans fil</string> + <string name="product_brand_label">Marque de produit</string> + <string name="product_device_label">Type de téléphone</string> + <string name="progress_scanning">Recherche</string> + <string name="proxy_action_text">Enregistrer</string> + <string name="proxy_clear_text">Effacer</string> + <string name="proxy_defaultView_text">Restaurer les valeurs par défaut</string> + <string name="proxy_error">Attention</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_empty_host_set_port">Le champ de port doit être vide si le champ d\'hôte est vide.</string> + <string name="proxy_error_empty_port">Vous devez compléter le champ de port.</string> + <string name="proxy_error_invalid_host">Le nom d\'hôte saisi n\'est pas valide.</string> + <string name="proxy_error_invalid_port">Le port saisi n\'est pas valide.</string> + <string name="proxy_hostname_label">Nom d\'hôte</string> + <string name="proxy_port_label">Port</string> + <string name="proxy_settings_label">Paramètres de proxy</string> + <string name="quick_launch_assign_application">Affecter application</string> + <string name="quick_launch_clear_cancel_button">Annuler</string> + <string name="quick_launch_clear_dialog_message">Votre raccourci pour <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) sera effacé.</string> + <string name="quick_launch_clear_dialog_title">Effacer</string> + <string name="quick_launch_clear_ok_button">OK</string> + <string name="quick_launch_display_mode_applications">Applications</string> + <string name="quick_launch_display_mode_shortcuts">Raccourcis</string> + <string name="quick_launch_no_shortcut">Pas de raccourci</string> + <string name="quick_launch_shortcut">Recherche + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <string name="quick_launch_summary">Définir le clavier les raccourcis pour lancer les applications</string> + <string name="quick_launch_title">Lancement rapide</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Connecté</string> + <string name="radioInfo_data_connecting">Connexion</string> + <string name="radioInfo_data_disconnected">Déconnecté</string> + <string name="radioInfo_data_suspended">Suspendu</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">octets</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">pqts</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Désactiver la connexion de données</string> + <string name="radioInfo_menu_disableDataOnBoot">Désactiver les données à l\'amorçage</string> + <string name="radioInfo_menu_enableData">Activer la connexion de données</string> + <string name="radioInfo_menu_enableDataOnBoot">Activer les données à l\'amorçage</string> + <string name="radioInfo_menu_getPDP">Obtenir la liste PDP</string> + <string name="radioInfo_menu_viewADN">Afficher le carnet d\'adresses en SIM</string> + <string name="radioInfo_menu_viewFDN">Afficher la numérotation fixe</string> + <string name="radioInfo_menu_viewSDN">Afficher la numérotation de service</string> + <string name="radioInfo_phone_idle">Inactif</string> + <string name="radioInfo_phone_offhook">Appel en cours</string> + <string name="radioInfo_phone_ringing">Ça sonne</string> + <string name="radioInfo_roaming_in">Itinérance</string> + <string name="radioInfo_roaming_not">Pas d\'itinérance</string> + <string name="radioInfo_service_emergency">Appel d\'urgence uniquement</string> + <string name="radioInfo_service_in">En service</string> + <string name="radioInfo_service_off">Radio désactivée</string> + <string name="radioInfo_service_out">Hors service</string> + <string name="radioInfo_unknown">inconnu</string> + <string name="radio_controls_summary">Gérer Wi-Fi, Bluetooth, mode avion et réseaux mobiles</string> + <string name="radio_controls_title">Contrôles sans fil</string> + <string name="radio_info_band_mode_label">Sélectionner la bande radio</string> + <string name="radio_info_call_redirect_label">Redirection d\'appel :</string> + <string name="radio_info_call_status_label">État d\'appel :</string> + <string name="radio_info_current_network_label">Réseau actuel :</string> + <string name="radio_info_data_attempts_label">Essais de données :</string> + <string name="radio_info_data_successes_label">Succès de données :</string> + <string name="radio_info_gprs_service_label">Service GPRS :</string> + <string name="radio_info_gsm_disconnects_label">Déconnexions GSM :</string> + <string name="radio_info_gsm_service_label">Service GSM :</string> + <string name="radio_info_http_client_test">Test client HTTP :</string> + <string name="radio_info_imei_label">IMEI :</string> + <string name="radio_info_imsi_label">IMSI :</string> + <string name="radio_info_message_waiting_label">Message en attente :</string> + <string name="radio_info_neighboring_location_label">CID voisin :</string> + <string name="radio_info_network_type_label">Type de réseau :</string> + <string name="radio_info_phone_number_label">Numéro de téléphone :</string> + <string name="radio_info_ping_hostname">Ping nom d\'hôte (www.google.com) :</string> + <string name="radio_info_ping_ipaddr">Ping AdrIP :</string> + <string name="radio_info_ppp_received_label">PPP reçus :</string> + <string name="radio_info_ppp_resets_label">Nombre de réinitialisation PPP depuis l\'amorçage :</string> + <string name="radio_info_ppp_sent_label">PPP envoyés :</string> + <string name="radio_info_radio_resets_label">Réinitialisations radio :</string> + <string name="radio_info_roaming_label">Itinérance :</string> + <string name="radio_info_set_perferred_label">Définir le type de réseau préféré :</string> + <string name="radio_info_signal_location_label">Localisation :</string> + <string name="radio_info_signal_strength_label">Force du signal :</string> + <string name="radio_info_smsc_label">SMSC :</string> + <string name="radio_info_smsc_refresh_label">Actualiser</string> + <string name="radio_info_smsc_update_label">Mise à jour</string> + <string name="radio_info_toggle_ciph_label">Activer/désactiver le chiffrage</string> + <string name="read_only">\u0020(Lecture seule)</string> + <string name="recompute_size">Recalcul de la taille\u2026</string> + <string name="ring_volume_summary">Définir le volume pour les appels entrants</string> + <string name="ring_volume_title">Volume de la sonnerie</string> + <string name="ringer_volume_instructions">Utiliser les boutons du volume pour ajuster le volume de la sonnerie</string> + <string name="ringer_volume_ringer_mode_label">Mode de sonnerie</string> + <string name="ringer_volume_ringtone_label">Sonnerie</string> + <string name="ringer_volume_screen_increasing_text">Sonnerie croissante</string> + <string name="ringtone_summary">Définir votre sonnerie d\'appels entrants par défaut</string> + <string name="ringtone_title">Sonnerie du téléphone</string> + <string name="roaming">Itinérance de données</string> + <string name="roaming_disable">Connecter aux services de donnée en itinérance</string> + <string name="roaming_enable">Connecter aux services de donnée en itinérance</string> + <string name="roaming_reenable_message">Vous avez perdu la connectivité de données car vous avez quitté votre réseau personnel avec l\'itinérance de données désactivée.</string> + <string name="roaming_reenable_title">Attention</string> + <string name="roaming_turn_it_on_button">Activez-la</string> + <string name="roaming_warning">Permettre l\'itinérance de données ? Vous pouvez avoir des frais d\'itinérance importants !</string> + <string name="scan_wifi">Rechercher</string> + <string name="screen_off_timeout_label">Ne jamais expirer pendant la charge</string> + <string name="screen_timeout">Expiration de l\'écran</string> + <string name="sd_card_settings_label">Carte SD</string> + <string name="sd_eject">Démonter/éjecter la carte SD</string> + <string name="sd_memory">Carte SD</string> + <string name="sd_unavailable">Non disponible</string> + <string name="sdcard_changes_instructions">Les modifications prennent effet à la reconnexion du câble USB</string> + <string name="sdcard_removal_alert_ok">OK</string> + <string name="sdcard_removal_alert_scolding">La carte SD a été retirée alors qu\'elle était en utilisation ! + Pour éviter la corruption de la carte, utilisez l\'écran Paramètres de carte SD pour démonter la carte avant le retrait.</string> + <string name="sdcard_removal_alert_title">Retrait de carte SD non sûr !</string> + <string name="sdcard_setting">Carte SD</string> + <string name="sdcard_settings_available_bytes_label">Octets disponibles :</string> + <string name="sdcard_settings_bad_removal_status">La carte SD a été retirée alors qu\'elle était en utilisation !</string> + <string name="sdcard_settings_mass_storage_status">La carte SD est utilisée comme appareil de stockage de masse</string> + <string name="sdcard_settings_not_present_status">Pas de carte SD</string> + <string name="sdcard_settings_read_only_status">Carte SD montée en lecture seule</string> + <string name="sdcard_settings_scanning_status">Recherche de fichiers multimédia dans la carte SD\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">Activer le stockage de masse USB</string> + <string name="sdcard_settings_total_bytes_label">Total d\'octets :</string> + <string name="sdcard_settings_unmounted_status">Il est maintenant possible de retirer la carte SD en toute sécurité</string> + <string name="sdcard_settings_used_bytes_label">Octets utilisés :</string> + <string name="sdcard_unmount">Démonter la carte SD</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + <string name="sdcard_unmountable_alert_title">Carte SD illisible</string> + <string name="sdcard_unmountable_message">La carte SD n\'a pas pu être lue. + Le système de fichiers peut être corrompu ou la carte peut être défective.</string> + <string name="security">Sécurité</string> + <string name="security_and_data_label">Sécurité et données</string> + <string name="security_passwords_title">Mots de passe</string> + <string name="security_settings_desc">Voici ce que cette application peut accéder sur votre téléphone :</string> + <string name="security_settings_summary">Ma localisation, déverrouillage d\'écran, verrouillage de carte SIM</string> + <string name="security_settings_title">Sécurité et localisation</string> + <string name="select_your_language">Sélectionner votre langue</string> + <string name="set_lock_pattern_label">Dessinez votre motif de déverrouillage :</string> + <string name="settings_chooser_pick_string"> + L\'icône des paramètres doit transférer à : + </string> + <string name="settings_label">Paramètres</string> + <string name="settings_license_activity_loading">Chargement\u2026</string> + <string name="settings_license_activity_title">Licences Open source</string> + <string name="settings_license_activity_unavailable">Il y a un problème pour charger les licences.</string> + <string name="show_password">Mots de passe visibles</string> + <string name="show_password_summary">Afficher le mot de passe lors de la saisie</string> + <string name="signal">Force du signal</string> + <string name="silent_mode_summary">Tous les sons excepté le multimédia sont sous silence</string> + <string name="silent_mode_title">Mode silencieux</string> + <string name="sim_bad_pin">Code PIN incorrect !</string> + <string name="sim_change_failed">Impossible de modifier le code PIN.\nPossible code PIN incorrect.</string> + <string name="sim_change_pin">Modifier PIN SIM</string> + <string name="sim_change_succeeded">PIN SIM modifié avec succès</string> + <string name="sim_disable_sim_lock">Déverrouiller la carte SIM</string> + <string name="sim_enable_sim_lock">Verrouiller la carte SIM</string> + <string name="sim_enter_cancel">Annuler</string> + <string name="sim_enter_new">Saisir le nouveau code PIN</string> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_old">Saisir l\'ancien code PIN</string> + <string name="sim_enter_pin">Saisir le code PIN SIM</string> + <string name="sim_lock_failed">Impossible de modifier l\'état de verrouillage de la carte SIM.\nPossible code PIN incorrect.</string> + <string name="sim_lock_off">Exiger le code PIN pour utiliser le téléphone</string> + <string name="sim_lock_on">Exiger le code PIN pour utiliser le téléphone</string> + <string name="sim_lock_settings">Paramètres de verrouillage de carte SIM</string> + <string name="sim_lock_settings_category">Configurer le verrouillage de carte SIM</string> + <string name="sim_lock_settings_title">Verrouillage de carte SIM</string> + <string name="sim_pin_change">Modifier le code PIN</string> + <string name="sim_pin_toggle">Verrouiller la carte SIM</string> + <string name="sim_pins_dont_match">Les codes PIN ne correspondent pas !</string> + <string name="sim_reenter_new">Ressaisir le nouveau code PIN</string> + <string name="skip_button_label">Annuler</string> + <string name="small_font">Petit</string> + <string name="software_version">Version du logiciel</string> + <string name="sort_order_alpha">Trier alphabétiquement</string> + <string name="sort_order_size">Trier par taille (décroissante)</string> + <string name="sound_and_display_settings">Son et affichage</string> + <string name="sound_and_display_settings_summary">Définir les sonneries, les notifications, la luminosité d\'écran</string> + <string name="sound_effects_enable_summary_off">Émettre un son lors de la sélection à l\'écran</string> + <string name="sound_effects_enable_summary_on">Émettre un son lors de la sélection à l\'écran</string> + <string name="sound_effects_enable_title">Sélection sonore</string> + <string name="sound_settings">Paramètres de son</string> + <string name="status_authenticating">Authentification\u2026</string> + <string name="status_awake_time">Heures de réveil</string> + <string name="status_bt_address">Adresse Bluetooth</string> + <string name="status_connected">Connecté</string> + <string name="status_connecting">Connexion\u2026</string> + <string name="status_data_state">Accès aux données</string> + <string name="status_disconnected">Déconnecté</string> + <string name="status_disconnecting">Déconnexion\u2026</string> + <string name="status_failed">Échec</string> + <string name="status_imei">IMEI</string> + <string name="status_imei_sv">IMEI SV</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Type de réseau</string> + <string name="status_number">Numéro de téléphone</string> + <string name="status_obtaining_ip">Obtenir l\'adresse\u2026</string> + <string name="status_operator">Réseau</string> + <string name="status_roaming">Itinérance</string> + <string name="status_scanning">Recherche\u2026</string> + <string name="status_service_state">État de service</string> + <string name="status_signal_strength">Force du signal</string> + <string name="status_unavailable">Non disponible</string> + <string name="status_up_time">Temps productif</string> + <string name="status_wifi_mac_address">Adresse MAC Wi-Fi</string> + <string name="stay_on">L\'écran est toujours allumé pendant la charge</string> + <string name="storage_label">Stockage</string> + <string name="storage_settings_summary">Démonter la carte SD, afficher le stockage disponible</string> + <string name="storage_settings_title">Stockage du téléphone et carte SD</string> + <string name="sum_carrier_select">Sélectionnez un opérateur de réseau</string> + <string name="summary_connection_failed">Échec de la connexion, sélectionnez pour ressayer</string> + <string name="summary_not_in_range">Pas à distance</string> + <string name="summary_remembered">Souvenu</string> + <string name="sync_automatically">Auto-synchroniser</string> + <string name="sync_calendar">Agenda</string> + <string name="sync_contacts">Contacts</string> + <string name="sync_disabled">Sélectionner pour synchroniser automatiquement les données</string> + <string name="sync_do_nothing">Ne rien faire maintenant.</string> + <string name="sync_enabled">Synchroniser automatiquement les données</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_is_failing">Il y a actuellement des problèmes de synchronisation. Elle sera de retour rapidement.</string> + <string name="sync_menu_sync_cancel">Annuler la synchronisation</string> + <string name="sync_menu_sync_now">Synchroniser maintenant</string> + <string name="sync_really_delete">Supprimez les éléments.</string> + <string name="sync_settings">Synchronisation données</string> + <string name="sync_settings_summary">Sélectionnez les applications à synchroniser</string> + <string name="sync_too_many_deletes">Limite de suppression dépassée</string> + <string name="sync_too_many_deletes_desc">Il y a %d éléments supprimés pour %s, compte %s. Que souhaitez-vous faire ?</string> + <string name="sync_undo_deletes">Annulez les suppressions.</string> + <string name="target_build_field_label">Type de Build demandé</string> + <string name="team_title">Équipe</string> + <string name="telephony_apn_label">APN :</string> + <string name="telephony_mcc_label">MCC :</string> + <string name="telephony_mmsc_label">MMSC :</string> + <string name="telephony_mmsport_label">Port MMS :</string> + <string name="telephony_mmsproxy_label">Proxy MMS :</string> + <string name="telephony_mnc_label">MNC :</string> + <string name="telephony_name_label">Nom :</string> + <string name="telephony_password_label">Mot de passe :</string> + <string name="telephony_port_label">Port :</string> + <string name="telephony_proxy_label">Proxy :</string> + <string name="telephony_server_label">Serveur :</string> + <string name="telephony_user_label">Utilisateur :</string> + <string name="terms_title">Termes et conditions</string> + <string name="testing">Test</string> + <string name="testing_battery_info">Informations batterie</string> + <string name="testing_phone_info">Informations téléphone</string> + <string name="testing_sim_toolkit">Outils SIM</string> + <string name="text_category">Paramètres texte</string> + <string name="total_size_label">Total</string> + <string name="turn_off_qxdm">Désactiver journal QXDM SD</string> + <string name="turn_off_radio">Désactiver la radio</string> + <string name="turn_on_qxdm">Activer journal QXDM SD</string> + <string name="turn_on_radio">Activer la radio</string> + <string name="underdeveloped_settings_label">Paramètres sous-développés</string> + <string name="uninstall_failed">Impossible de désinstaller l\'application.</string> + <string name="uninstall_text">Désinstaller</string> + <string name="unknown">Inconnu</string> + <string name="vibrate_summary">Faire vibrer le téléphone pour les appels entrants</string> + <string name="vibrate_title">Vibreur téléphone</string> + <string name="wallpaper_label">Papier peint</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Réseaux Wi-Fi</string> + <string name="wifi_add_other_network">Ajouter un réseau Wi-Fi</string> + <string name="wifi_context_menu_change_password">Changer le mot de passe</string> + <string name="wifi_context_menu_connect">Connexion au réseau</string> + <string name="wifi_context_menu_forget">Oublier le réseau</string> + <string name="wifi_dhcp_timeout_error">Il y a un problème pour obtenir une adresse IP.</string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_dns_label">dns :</string> + <string name="wifi_error">Erreur</string> + <string name="wifi_gateway">Passerelle</string> + <string name="wifi_gateway_label">passerelle :</string> + <string name="wifi_generic_connection_error">Il y a un problème de connexion au réseau. Veuillez réessayer.</string> + <string name="wifi_host_ip">ip hôte :</string> + <string name="wifi_ip_address">Adresse IP</string> + <string name="wifi_ip_settings_invalid_ip">Veuillez saisir une adresse IP valide.</string> + <string name="wifi_ip_settings_menu_cancel">Annuler</string> + <string name="wifi_ip_settings_menu_save">Enregistrer</string> + <string name="wifi_ip_settings_titlebar">Paramètres IP</string> + <string name="wifi_link_speed">Vitesse</string> + <string name="wifi_menu_advanced">Avancés</string> + <string name="wifi_netmask">Masque réseau</string> + <string name="wifi_netmask_label">masque réseau :</string> + <string name="wifi_notify_open_networks">Notification réseau</string> + <string name="wifi_notify_open_networks_summary">Me notifier quand un réseau ouvert est disponible</string> + <string name="wifi_password_incorrect_error">Le mot de passe du réseau saisi est incorrect. Veuillez réessayer.</string> + <string name="wifi_password_unchanged">(inchangé)</string> + <string name="wifi_prefer_wifi">Wi-Fi préféré</string> + <string name="wifi_quick_toggle_summary">Sélectionner d\'activer Wi-Fi</string> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <string name="wifi_save_config">Enregistrer</string> + <string name="wifi_screen_activate_text">Activer</string> + <string name="wifi_screen_dhcp_text">automatique</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">manuel</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi fonctionne</string> + <string name="wifi_screen_test_text">Test</string> + <string name="wifi_security">Sécurité</string> + <string name="wifi_security_open">Ouvrir</string> + <string name="wifi_security_unknown">Inconnu</string> + <string name="wifi_security_verbose_open">Réseau ouvert</string> + <string name="wifi_security_verbose_wep">Sécurisé avec WEP</string> + <string name="wifi_security_verbose_wpa">Sécurisé avec WPA</string> + <string name="wifi_security_verbose_wpa2">Sécurisé avec WPA2</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_settings">Paramètres Wi-Fi</string> + <string name="wifi_settings_category">Paramètres Wi-Fi</string> + <string name="wifi_settings_summary">Configurer et gérer les points d\'accès sans fil</string> + <string name="wifi_show_password">Affichez le mot de passe.</string> + <string name="wifi_signal_0">Faible</string> + <string name="wifi_signal_1">Passable</string> + <string name="wifi_signal_2">Bonne</string> + <string name="wifi_signal_3">Excellente</string> + <string name="wifi_starting">Activation\u2026</string> + <string name="wifi_status">État</string> + <string name="wifi_stopping">Désactivation\u2026</string> + <string name="wifi_type_ssid">Saisissez le SSID du réseau :</string> + <string name="wifi_use_static_ip">Utiliser IP statique</string> + <string name="wifi_wlan_id">id réseau sans fil :</string> +</resources> diff --git a/res/values-it-rIT/strings.xml b/res/values-it-rIT/strings.xml new file mode 100644 index 0000000..0cf95d0 --- /dev/null +++ b/res/values-it-rIT/strings.xml @@ -0,0 +1,700 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="about_settings">Informazioni sul telefono</string> + <string name="about_settings_summary">Visualizza le informazioni legali, lo stato del telefono e la versione del software</string> + <string name="activity_picker_label">Seleziona attività</string> + <string name="airplane_mode">Modalità aereo</string> + <string name="airplane_mode_summary">Selezionare per disattivare tutte le connessioni wireless</string> + <string name="airplane_mode_turning_off">Attivazione connessioni wireless\u2026</string> + <string name="airplane_mode_turning_on">Disattivazione connessioni wireless\u2026</string> + <string name="android_id_label">ID Android</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Modifica punto di accesso</string> + <string name="apn_http_port">Porta</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">Porta MMS</string> + <string name="apn_mms_proxy">Proxy MMS</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Nome</string> + <string name="apn_not_set"><Non impostato></string> + <string name="apn_password">Password</string> + <string name="apn_server">Server</string> + <string name="apn_settings">APN</string> + <string name="apn_type">Tipo APN</string> + <string name="apn_user">Nome utente</string> + <string name="app_launcher_newView_text">Nuovo AppLauncher</string> + <string name="app_not_found_dlg_text"> Impossibile trovare l'applicazione +nell'elenco di applicazioni installate.</string> + <string name="app_not_found_dlg_title">Impossibile trovare l'applicazione</string> + <string name="application_info_label">Informazioni sull'applicazione</string> + <string name="application_size_label">Applicazione</string> + <string name="applications_settings">Applicazioni</string> + <string name="applications_settings_header">Impostazioni applicazione</string> + <string name="applications_settings_summary">Gestisce le applicazioni, imposta i collegamenti di avvio rapido</string> + <string name="auto_caps">Maiuscola automatica</string> + <string name="auto_caps_summary">Attiva la maiuscola per la prima lettera nelle frasi</string> + <string name="auto_launch_disable_text">Nessuna impostazione predefinita.</string> + <string name="auto_launch_enable_text">Si è scelto di avviare questa applicazione per impostazione predefinita per alcune azioni.</string> + <string name="auto_launch_label">Avvia per impostazione predefinita</string> + <string name="auto_punctuate">Punteggiatura automatica</string> + <string name="auto_punctuate_summary">Premere Barra spaziatrice per inserire \u0022.\u0022</string> + <string name="auto_replace">Sostituzione automatica</string> + <string name="auto_replace_summary">Corregge le parole con errori di ortografia</string> + <string name="autorotate">Rotazione automatica</string> + <string name="autorotate_summary_off">Cambiando l'orientamento dello schermo non viene ruotata l'applicazione</string> + <string name="autorotate_summary_on">Cambiando l'orientamento dello schermo viene ruotata l'applicazione</string> + <string name="b_text">B</string> + <string name="band_mode_failed">Non riuscito</string> + <string name="band_mode_loading">Caricamento lista bande in corso\u2026</string> + <string name="band_mode_set">Imposta</string> + <string name="band_mode_succeeded">Riuscita</string> + <string name="band_mode_title">Imposta banda GSM/UMTS</string> + <string name="baseband_version">Versione banda di base</string> + <string name="basic_settings_title">Funzioni di base del telefono</string> + <string name="battery_info_awake_battery">Tempo riattivazione batteria:</string> + <string name="battery_info_awake_plugged">Tempo riattivazione durante la carica:</string> + <string name="battery_info_health_dead">Fuori uso</string> + <string name="battery_info_health_good">Buona</string> + <string name="battery_info_health_label">Stato batteria:</string> + <string name="battery_info_health_over_voltage">Sovratensione</string> + <string name="battery_info_health_overheat">Surriscaldamento</string> + <string name="battery_info_health_unknown">Sconosciuto</string> + <string name="battery_info_health_unspecified_failure">Errore sconosciuto</string> + <string name="battery_info_label">Informazioni batteria</string> + <string name="battery_info_level_label">Livello batteria:</string> + <string name="battery_info_scale_label">Scala batteria:</string> + <string name="battery_info_screen_on">Tempo accensione schermo:</string> + <string name="battery_info_status_charging">Sotto carica</string> + <string name="battery_info_status_charging_ac">(CA)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Scarico</string> + <string name="battery_info_status_full">Carico</string> + <string name="battery_info_status_label">Stato batteria:</string> + <string name="battery_info_status_not_charging">Non sotto carica</string> + <string name="battery_info_status_unknown">Sconosciuto</string> + <string name="battery_info_technology_label">Tecnologia batteria:</string> + <string name="battery_info_temperature_label">Temperatura batteria:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">Tempo dall'avvio:</string> + <string name="battery_info_voltage_label">Voltaggio batteria:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_level_title">Livello batteria</string> + <string name="battery_status_title">Stato batteria</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Cancella elenco dispositivi</string> + <string name="bluetooth_connect">Connetti</string> + <string name="bluetooth_connectable">Solo collegabile</string> + <string name="bluetooth_connected">Connesso</string> + <string name="bluetooth_connecting">Connessione in corso\u2026</string> + <string name="bluetooth_device">viva voce/cuffia</string> + <string name="bluetooth_device_info">Informazioni dispositivo Bluetooth</string> + <string name="bluetooth_device_info_alias">Alias dispositivo</string> + <string name="bluetooth_device_info_delete">Rimuovi dispositivo</string> + <string name="bluetooth_device_info_no_alias">Digitare l'alias qui\u2026</string> + <string name="bluetooth_device_info_sdp">Servizi supportati nell'elenco</string> + <string name="bluetooth_device_name">Nome dispositivo</string> + <string name="bluetooth_devices">Dispositivi Bluetooth</string> + <string name="bluetooth_disabled">Selezionare per attivare il Bluetooth</string> + <string name="bluetooth_disconnect">Disconnetti</string> + <string name="bluetooth_disconnect_blank"><xliff:g id="device_name">%1$s</xliff:g> verrà disconnesso</string> + <string name="bluetooth_discoverability_panel_title">Nomina me\u2026</string> + <string name="bluetooth_discoverable">Rilevabile per %1$s secondi</string> + <string name="bluetooth_enable_text">Pulsante vuoto\u2026</string> + <string name="bluetooth_enabled">Selezionare per attivare il Bluetooth</string> + <string name="bluetooth_enabling">Attivazione Bluetooth in corso\u2026</string> + <string name="bluetooth_enter_pin_msg">Immettere il PIN per\u0020</string> + <string name="bluetooth_failed_to_enable">Impossibile attivare Bluetooth</string> + <string name="bluetooth_is_discoverable">Rilevabile per %1$s secondi\u2026</string> + <string name="bluetooth_name_not_set">Nessun nome impostato, utilizzando il nome account</string> + <string name="bluetooth_neither">Non rilevabile né collegabile</string> + <string name="bluetooth_new_data">Digitare i nuovi dati</string> + <string name="bluetooth_new_data_cancel">Annulla</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_not_connected">Accoppia a dispositivo</string> + <string name="bluetooth_not_discoverable">Selezionare per rendere il dispositivo rilevabile</string> + <string name="bluetooth_notif_message">Selezionare per accoppiare\u0020</string> + <string name="bluetooth_notif_ticker">Richiesta accoppiamento Bluetooth</string> + <string name="bluetooth_notif_title">Richiesta accoppiamento Bluetooth</string> + <string name="bluetooth_pair">Accoppia</string> + <string name="bluetooth_paired">Accoppiato</string> + <string name="bluetooth_paired_not_nearby">Accoppiato</string> + <string name="bluetooth_pairing">Accoppiamento in corso\u2026</string> + <string name="bluetooth_pairing_msg">Accoppiamento in corso\u2026</string> + <string name="bluetooth_pin_entry">Codice PIN Bluetooth</string> + <string name="bluetooth_quick_toggle_summary">Selezionare per attivare il Bluetooth</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Ricerca dispositivi</string> + <string name="bluetooth_scan_for_new_devices">Ricerca nuovi dispositivi\u2026</string> + <string name="bluetooth_scan_text">Pulsante vuoto\u2026</string> + <string name="bluetooth_settings">Impostazioni Bluetooth</string> + <string name="bluetooth_settings_summary">Gestisce le connessioni, imposta il nome del dispositivo e la rilevabilità</string> + <string name="bluetooth_settings_text">Pulsante vuoto\u2026</string> + <string name="bluetooth_settings_title">Impostazioni Bluetooth</string> + <string name="bluetooth_starting">Avvio di Bluetooth\u2026</string> + <string name="bluetooth_stopping">Interruzione Bluetooth\u2026</string> + <string name="bluetooth_unknown">Sconosciuto</string> + <string name="bluetooth_unpair">Disaccoppia</string> + <string name="bluetooth_visibility">Rilevabile</string> + <string name="bootloader_version">Versione del caricatore di avvio</string> + <string name="brightness">Luminosità</string> + <string name="build_date_label">Data build</string> + <string name="build_description_label">Descrizione build</string> + <string name="build_host_label">Host build</string> + <string name="build_id_label">ID build</string> + <string name="build_number">Numero build</string> + <string name="build_type_label">Tipo build</string> + <string name="build_user_label">Utente build</string> + <string name="call_settings_summary">Imposta la casella vocale, il trasferimento chiamata, la chiamata in attesa, l'ID chiamante</string> + <string name="call_settings_title">Impostazioni chiamata</string> + <string name="cancel">Annulla</string> + <string name="checkin_button_label">Verifica aggiornamento</string> + <string name="checkin_download_failed">Non riuscito</string> + <string name="checkin_download_label">Stato download</string> + <string name="checkin_download_ongoing">Download in corso</string> + <string name="checkin_download_pending">In sospeso</string> + <string name="checkin_download_succeeded">Completato</string> + <string name="checkin_download_suspended">Sospeso</string> + <string name="checkin_download_unknown">Stato sconosciuto</string> + <string name="checkin_failures_label">Errori dall'ultima operazione completata</string> + <string name="checkin_last_time_label">Ultima verifica riuscita</string> + <string name="checkin_started_message">Archiviazione avviata\u2026</string> + <string name="checkin_status_label">Stato verifica</string> + <string name="checkin_time_never">(mai)</string> + <string name="checkin_upgrade_label">Aggiornamento in sospeso</string> + <string name="choose_timezone">Seleziona fuso orario</string> + <string name="choose_timezone_region">Seleziona area</string> + <string name="clear_activities">Cancella predefiniti</string> + <string name="clear_data_dlg_text">Tutte le informazioni salvate in questa applicazione verranno eliminate in maniera permanente.</string> + <string name="clear_data_dlg_title">Elimina</string> + <string name="clear_data_failed">Impossibile cancellare i dati dell'applicazione.</string> + <string name="clear_user_data_text">Cancella dati</string> + <string name="computing_size">Calcolo delle dimensioni dell'applicazione in corso\u2026</string> + <string name="connect">Connetti</string> + <string name="connect_to_blank">Connetti a <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="contributors_title">Collaboratori</string> + <string name="copyright_title">Copyright</string> + <string name="data_settings">Impostazioni dati</string> + <string name="data_settings_summary">Scheda SD e archiviazione telefono, sincronizzazione dati</string> + <string name="data_settings_title">Dati</string> + <string name="data_size_label">Dati</string> + <string name="date_and_time">Impostazioni di data e ora</string> + <string name="date_and_time_settings_summary">Imposta la data, l'ora, il fuso orario e i formati</string> + <string name="date_and_time_settings_title">Data e ora</string> + <string name="date_time_24hour">Usa formato 24 ore</string> + <string name="date_time_auto">Automatico</string> + <string name="date_time_auto_summaryOff">Usa valori della rete</string> + <string name="date_time_auto_summaryOn">Usa valori della rete</string> + <string name="date_time_changeDate_text">Modifica data</string> + <string name="date_time_changeTime_text">Modifica ora</string> + <string name="date_time_dateDisplay_text">3 nov 1997</string> + <string name="date_time_date_format">Seleziona formato data</string> + <string name="date_time_set_date">Imposta data</string> + <string name="date_time_set_time">Imposta ora</string> + <string name="date_time_set_timezone">Imposta fuso orario</string> + <string name="date_time_setzone_text">Modifica fuso orario</string> + <string name="date_time_timeDisplay_text">11:45</string> + <string name="date_time_timezone_label">Fuso orario:</string> + <string name="debug_intent_sender_label">Mittente intenzione debug</string> + <string name="default_date_format">gg/MM/aaaa</string> + <string name="default_keyboard_device_label">Dispositivo tastiera predefinito</string> + <string name="development_settings_summary">Impostazioni per lo sviluppo di applicazioni</string> + <string name="development_settings_title">Sviluppo</string> + <string name="device_info_asleeptime">Tempo di inattività</string> + <string name="device_info_awaketime">Tempo riattivazione</string> + <string name="device_info_default">Sconosciuto</string> + <string name="device_info_label">Informazioni dispositivo</string> + <string name="device_info_not_available">Non disponibile</string> + <string name="device_info_settings">Stato telefono</string> + <string name="device_info_uptime">Disponibilità</string> + <string name="device_status">Stato</string> + <string name="device_status_summary">IMEI, numero di telefono, segnale ecc...</string> + <string name="dim_screen">Oscura schermo</string> + <string name="disconnect_ums">Disconnetti dispositivo di memorizzazione di massa USB</string> + <string name="display_font_size_label">Dimensioni carattere:</string> + <string name="display_label">Display</string> + <string name="display_preview_label">Anteprima:</string> + <string name="display_settings">Impostazioni display</string> + <string name="dlg_cancel">Annulla</string> + <string name="dlg_ok">OK</string> + <string name="done">OK</string> + <string name="dtmf_tone_enable_summary_off">Riproduci toni durante la composizione</string> + <string name="dtmf_tone_enable_summary_on">Riproduci toni durante la composizione</string> + <string name="dtmf_tone_enable_title">Toni udibili al tocco</string> + <string name="enable_adb">Debug USB</string> + <string name="enable_adb_summary">Modalità debug quando è connesso USB</string> + <string name="error_apn_empty">L'APN non può essere vuoto.</string> + <string name="error_connecting">Impossibile collegarsi alla rete</string> + <string name="error_mcc_not3">Il campo MCC deve essere costituito da 3 cifre.</string> + <string name="error_mnc_not23">Il campo MNC deve essere costituito da 2 o 3 cifre.</string> + <string name="error_name_empty">Il campo Nome non può essere vuoto.</string> + <string name="error_saving">Impossibile salvare la rete</string> + <string name="error_scanning">Impossibile cercare le reti</string> + <string name="error_starting">Impossibile avviare Wi-Fi</string> + <string name="error_stopping">Impossibile interrompere Wi-Fi</string> + <string name="error_title">Attenzione</string> + <string name="failed_to_connect">Impossibile connettersi a <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="failed_to_pair">Impossibile eseguire l'accoppiamento con <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="favorites_label">Preferiti</string> + <string name="firmware_version">Versione firmware</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + <string name="forget_network">Ignora</string> + <string name="fragment_status_authenticating">Autenticazione con <xliff:g id="network_name">%1$s</xliff:g> in corso\u2026</string> + <string name="fragment_status_connected">Connesso a <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_connecting">Connessione a <xliff:g id="network_name">%1$s</xliff:g> in corso\u2026</string> + <string name="fragment_status_disconnected">Disconnesso</string> + <string name="fragment_status_disconnecting">Disconnessione da <xliff:g id="network_name">%1$s</xliff:g> in corso\u2026</string> + <string name="fragment_status_failed">Non riuscito</string> + <string name="fragment_status_obtaining_ip">Ottenimento indirizzo IP da <xliff:g id="network_name">%1$s</xliff:g> in corso\u2026</string> + <string name="fragment_status_scanning">Scansione in corso\u2026</string> + <string name="gsm_version_baseband_label">Versione banda di base</string> + <string name="gsm_version_ril_impl_label">Versione Impl RIL</string> + <string name="install_all_warning">Il telefono e i dati personali sono più vulnerabili agli attacchi da parte di applicazioni + di origini sconosciute. L'utente accetta di essere il solo responsabile degli eventuali + danni al telefono o della perdita dei dati che potrebbero derivare dall'utilizzo di + queste applicazioni.</string> + <string name="install_applications">Origini sconosciute</string> + <string name="install_unknown_applications">Consente l'installazione di applicazioni non commerciali</string> + <string name="intent_sender_account_label">Account: </string> + <string name="intent_sender_action_label">Azione:</string> + <string name="intent_sender_data_label">Dati:</string> + <string name="intent_sender_resource_label">Risorsa: </string> + <string name="intent_sender_sendbroadcast_text">Invia broadcast</string> + <string name="intent_sender_startactivity_text">Avvia attività</string> + <string name="internal_memory">Dispositivo di memorizzazione interna telefono</string> + <string name="ip_address">Indirizzo IP</string> + <string name="kb_text">KB</string> + <string name="keep_screen_on">Rimani attivo</string> + <string name="keep_screen_on_summary">Lo schermo non diventa mai inattivo sotto carica</string> + <string name="kernel_version">Versione kernel</string> + <string name="kernel_version_label">Versione kernel Linux</string> + <string name="keyguard_label">Coperchio</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Conferma nuova password:</string> + <string name="keyguard_password_mismatch_error_text">Le due password non corrispondono. Digitarle di nuovo.</string> + <string name="keyguard_password_new_label">Nuova password:</string> + <string name="keyguard_password_old_label">Vecchia password:</string> + <string name="keyguard_password_old_password_error_text">La vecchia password immessa non è corretta. Riprovare.</string> + <string name="keyguard_pin_mod_text">Cambia PIN</string> + <string name="keyguard_pw_mod_text">Seleziona codice di blocco</string> + <string name="keyguard_sim_pin_label">PIN SIM</string> + <string name="language_category">Impostazione lingua</string> + <string name="language_picker_title">Impostazioni internazionali</string> + <string name="language_settings">Testo</string> + <string name="language_settings_summary">Selezionare le opzioni di correzione automatica testo</string> + <string name="large_font">Grande</string> + <string name="legal_information">Informazioni legali</string> + <string name="legal_information_summary">Visualizza termini e condizioni</string> + <string name="license_title">Licenza</string> + <string name="location_gps">Attiva satelliti GPS</string> + <string name="location_gps_disabled">Individuare il livello stradale (richiede più batteria e la vista del cielo)</string> + <string name="location_label">Fornitore posizione:</string> + <string name="location_neighborhood_level">Posizione determinata dalla reti mobili e/o Wi-Fi</string> + <string name="location_network_based">Usa reti wireless</string> + <string name="location_networks_disabled">Visualizza la posizione nelle applicazioni (ad esempio Mappe) utilizzando le reti wireless</string> + <string name="location_source">Località</string> + <string name="location_source_summary">Selezionare le origini per determinare la località</string> + <string name="location_status">Stato:</string> + <string name="location_street_level">Durante localizzazione, accuratezza a livello stradale (deselezionare per risparmiare batteria)</string> + <string name="location_title">Fornti località</string> + <string name="lock_example_message">Collegare almeno quattro punti.\n + \nSelezionare \"Avanti\" quando si è pronti a creare il proprio codice. + </string> + <string name="lock_example_title">Codice di esempio</string> + <string name="lock_settings_title">Codice blocco schermo</string> + <string name="lock_title">Protezione del telefono</string> + <string name="lockpattern_change_lock_pattern_label">Cambia codice di sblocco</string> + <string name="lockpattern_confirm_button_text">Conferma</string> + <string name="lockpattern_continue_button_text">Continua</string> + <string name="lockpattern_need_to_confirm">Ridigitare il codice per confermare:</string> + <string name="lockpattern_need_to_unlock">Conferma codice salvato:</string> + <string name="lockpattern_need_to_unlock_wrong">Riprovare:</string> + <string name="lockpattern_pattern_confirmed_header">Nuovo codice di sblocco:</string> + <string name="lockpattern_pattern_entered_header">Codice registrato</string> + <string name="lockpattern_recording_incorrect_too_short">Connettere ad almeno <xliff:g id="number">%d</xliff:g> punti. Riprovare:</string> + <string name="lockpattern_recording_inprogress">Rilasciare il dito al termine.</string> + <string name="lockpattern_recording_intro_footer">Premere Menu per visualizzare la Guida.</string> + <string name="lockpattern_recording_intro_header">Digitare un codice di sblocco:</string> + <string name="lockpattern_restart_button_text">Ridisegna</string> + <string name="lockpattern_retry_button_text">Riprova</string> + <string name="lockpattern_settings_change_lock_pattern">Cambia codice di sblocco</string> + <string name="lockpattern_settings_choose_lock_pattern">Imposta codice di sblocco</string> + <string name="lockpattern_settings_enable_summary">Digitare un codice per sbloccare lo schermo</string> + <string name="lockpattern_settings_enable_title">Richiedi codice</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Usa codice visibile</string> + <string name="lockpattern_settings_help_how_to_record">Procedura per la digitazione di un codice di sblocco:</string> + <string name="lockpattern_settings_title">Codice di sblocco</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Riprovare tra <xliff:g id="number">%d</xliff:g> secondi.</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Troppi tentativi errati</string> + <string name="manage_applications_title">Gestisci applicazioni</string> + <string name="manage_space_text">Gestisci spazio</string> + <string name="manageapplications_settings_title">Gestisci applicazioni</string> + <string name="mass_storage">Usa per dispositivo di memorizzazione USB</string> + <string name="master_clear_button_text">Ripristina telefono</string> + <string name="master_clear_desc">Questa azione consente di ripristinare i valori di fabbrica del telefono, cancellando tutti i dati e le applicazioni scaricate.</string> + <string name="master_clear_failed">Nessun ripristino eseguito perché il servizio System Clear non è disponibile.</string> + <string name="master_clear_final_button_text">Cancella tutto</string> + <string name="master_clear_final_desc">Ripristinare il telefono, cancellando tutti i dati e le applicazioni? Questa azione è irreversibile.</string> + <string name="master_clear_gesture_explanation">È necessario digitare un codice di sblocco per confermare un ripristino del telefono.</string> + <string name="master_clear_gesture_prompt">Digitare il codice di sblocco:</string> + <string name="master_clear_summary">Cancella tutti i dati sul telefono</string> + <string name="master_clear_title">Ripristino dati di fabbrica</string> + <string name="mb_text">MB</string> + <string name="media_volume_summary">Imposta volume per musica e video</string> + <string name="media_volume_title">Volume supporto</string> + <string name="medium_font">Supporto</string> + <string name="memory_available">Spazio disponibile</string> + <string name="memory_size">Spazio totale</string> + <string name="menu_cancel">Ignora</string> + <string name="menu_delete">Elimina APN</string> + <string name="menu_new">Nuovo APN</string> + <string name="menu_save">Salva</string> + <string name="model_number">Numero modello</string> + <string name="network_settings_summary">Imposta le opzioni per roaming, reti e APN</string> + <string name="network_settings_title">Reti mobili</string> + <string name="networks">Selezione operatore</string> + <string name="networks_title">Impostazioni rete</string> + <string name="next_button_label">Avanti</string> + <string name="next_label">Avanti</string> + <string name="notification_sound_dialog_title">Seleziona suoneria notifica</string> + <string name="notification_sound_summary">Imposta suoneria di notifica predefinita</string> + <string name="notification_sound_title">Suoneria notifica</string> + <string name="permissions_label">Autorizzazioni</string> + <string name="phone_info_label">Informazioni telefono</string> + <string name="phone_language">Seleziona lingua</string> + <string name="ping_test_label">Esegui test ping</string> + <string name="please_type_hex_key">Chiave esadecimale WEP (0-9, A-F)</string> + <string name="please_type_passphrase">Password wireless</string> + <string name="product_brand_label">Marchio prodotto</string> + <string name="product_device_label">Tipo telefono</string> + <string name="progress_scanning">Ricerca in corso</string> + <string name="proxy_action_text">Salva</string> + <string name="proxy_clear_text">Cancella</string> + <string name="proxy_defaultView_text">Ripristina impostazioni predefinite</string> + <string name="proxy_error">Attenzione</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_empty_host_set_port">Il campo della porta deve essere vuoto se il campo host è vuoto.</string> + <string name="proxy_error_empty_port">È necessario completare il campo della porta.</string> + <string name="proxy_error_invalid_host">Il nome dell'host immesso non è valido.</string> + <string name="proxy_error_invalid_port">La porta specificata non è valida.</string> + <string name="proxy_hostname_label">Nome host</string> + <string name="proxy_port_label">Porta</string> + <string name="proxy_settings_label">Impostazioni proxy</string> + <string name="quick_launch_assign_application">Assegna applicazione</string> + <string name="quick_launch_clear_cancel_button">Annulla</string> + <string name="quick_launch_clear_dialog_message">Il collegamento per <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) verrà cancellato.</string> + <string name="quick_launch_clear_dialog_title">Cancella</string> + <string name="quick_launch_clear_ok_button">OK</string> + <string name="quick_launch_display_mode_applications">Applicazioni</string> + <string name="quick_launch_display_mode_shortcuts">Collegamenti</string> + <string name="quick_launch_no_shortcut">Nessun collegamento</string> + <string name="quick_launch_shortcut">Cerca + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <string name="quick_launch_summary">Imposta scelte rapide da tastiera per avviare le applicazioni</string> + <string name="quick_launch_title">Avvio rapido</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Connesso</string> + <string name="radioInfo_data_connecting">Connessione in corso</string> + <string name="radioInfo_data_disconnected">Disconnesso</string> + <string name="radioInfo_data_suspended">Sospeso</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">byte</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">pkts</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Disabilita connessione dati</string> + <string name="radioInfo_menu_disableDataOnBoot">Disabilita dati all'avvio</string> + <string name="radioInfo_menu_enableData">Abilita connessione dati</string> + <string name="radioInfo_menu_enableDataOnBoot">Abilita dati all'avvio</string> + <string name="radioInfo_menu_getPDP">Ottieni elenco PDP</string> + <string name="radioInfo_menu_viewADN">Visualizza Rubrica SIM</string> + <string name="radioInfo_menu_viewFDN">Visualizza numeri dell'elenco numeri ammessi</string> + <string name="radioInfo_menu_viewSDN">Visualizza numeri dell'elenco dei numeri di servizio</string> + <string name="radioInfo_phone_idle">Inattivo</string> + <string name="radioInfo_phone_offhook">Chiamata in corso</string> + <string name="radioInfo_phone_ringing">Chiamata in corso</string> + <string name="radioInfo_roaming_in">Roaming</string> + <string name="radioInfo_roaming_not">Non roaming</string> + <string name="radioInfo_service_emergency">Solo chiamate di emergenza</string> + <string name="radioInfo_service_in">In servizio</string> + <string name="radioInfo_service_off">Radio disattivata</string> + <string name="radioInfo_service_out">Fuori servizio</string> + <string name="radioInfo_unknown">sconosciuto</string> + <string name="radio_controls_summary">Gestisci Wi-Fi, Bluetooth, modalità aereo e reti mobili</string> + <string name="radio_controls_title">Controlli wireless</string> + <string name="radio_info_band_mode_label">Seleziona banda radio</string> + <string name="radio_info_call_redirect_label">Reindirizzamento chiamata:</string> + <string name="radio_info_call_status_label">Stato chiamata:</string> + <string name="radio_info_current_network_label">Rete corrente:</string> + <string name="radio_info_data_attempts_label">Tentativi dati:</string> + <string name="radio_info_data_successes_label">Dati riusciti:</string> + <string name="radio_info_gprs_service_label">Servizio GPRS:</string> + <string name="radio_info_gsm_disconnects_label">Disconnessioni GSM:</string> + <string name="radio_info_gsm_service_label">Servizio GSM:</string> + <string name="radio_info_http_client_test">Test client HTTP:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">Messaggio in attesa:</string> + <string name="radio_info_neighboring_location_label">CID adiacente:</string> + <string name="radio_info_network_type_label">Tipo di rete:</string> + <string name="radio_info_phone_number_label">Numero di telefono:</string> + <string name="radio_info_ping_hostname">Nome host ping (www.google.com):</string> + <string name="radio_info_ping_ipaddr">IpAddr ping:</string> + <string name="radio_info_ppp_received_label">PPP ricevuto:</string> + <string name="radio_info_ppp_resets_label">Numero di PPP reimpostati dall'avvio:</string> + <string name="radio_info_ppp_sent_label">PPP inviato:</string> + <string name="radio_info_radio_resets_label">Reimpostazioni radio:</string> + <string name="radio_info_roaming_label">Roaming:</string> + <string name="radio_info_set_perferred_label">Impostare il tipo di rete preferito:</string> + <string name="radio_info_signal_location_label">Posizione:</string> + <string name="radio_info_signal_strength_label">Intensità segnale:</string> + <string name="radio_info_smsc_label">SMSC:</string> + <string name="radio_info_smsc_refresh_label">Aggiorna</string> + <string name="radio_info_smsc_update_label">Aggiorna</string> + <string name="radio_info_toggle_ciph_label">Alterna cifratura</string> + <string name="read_only">\u0020(Sola lettura)</string> + <string name="recompute_size">Ricalcola dimensioni in corso\u2026</string> + <string name="ring_volume_summary">Imposta volume per chiamate in ingresso</string> + <string name="ring_volume_title">Volume suoneria</string> + <string name="ringer_volume_instructions">Utilizzare i pulsanti del volume per regolare la suoneria</string> + <string name="ringer_volume_ringer_mode_label">Modalità suoneria</string> + <string name="ringer_volume_ringtone_label">Suoneria</string> + <string name="ringer_volume_screen_increasing_text">Suoneria crescente</string> + <string name="ringtone_summary">Imposta suoneria chiamata in ingresso predefinita</string> + <string name="ringtone_title">Suoneria telefono</string> + <string name="roaming">Roaming dati</string> + <string name="roaming_disable">Impossibile connettersi ai servizi di dati durante il roaming</string> + <string name="roaming_enable">Impossibile connettersi ai servizi di dati durante il roaming</string> + <string name="roaming_reenable_message">Connessione dati perduta. La rete domestica con il roaming dei dati è stata lasciata disattivata.</string> + <string name="roaming_reenable_title">Attenzione</string> + <string name="roaming_turn_it_on_button">Attivarla</string> + <string name="roaming_warning">Consentire il roaming dei dati? Può provocare l'aggiunta di notevoli spese per il roaming.</string> + <string name="scan_wifi">Scansione</string> + <string name="screen_off_timeout_label">Mai timeout quando sotto carica</string> + <string name="screen_timeout">Timeout schermo</string> + <string name="sd_card_settings_label">Scheda SD</string> + <string name="sd_eject">Smonta/Espelli scheda SD</string> + <string name="sd_memory">Scheda SD</string> + <string name="sd_unavailable">Non disponibile</string> + <string name="sdcard_changes_instructions">Le modifiche saranno effettive alla riconnessione del cavo USB</string> + <string name="sdcard_removal_alert_ok">OK</string> + <string name="sdcard_removal_alert_scolding">La scheda SD è stata rimossa quando ancora in uso. + Per evitare di danneggiare la scheda, utilizzare la schermata Impostazioni della scheda SD per smontare la scheda prima della rimozione.</string> + <string name="sdcard_removal_alert_title">Rimozione scheda SD non sicura</string> + <string name="sdcard_setting">Scheda SD</string> + <string name="sdcard_settings_available_bytes_label">Tipi disponibili:</string> + <string name="sdcard_settings_bad_removal_status">La scheda SD è stata rimossa mentre ancora in uso.</string> + <string name="sdcard_settings_mass_storage_status">La scheda SD è attualmente utilizzata da un dispositivo di memorizzazione di massa</string> + <string name="sdcard_settings_not_present_status">Nessuna scheda SD</string> + <string name="sdcard_settings_read_only_status">La scheda SD smontata è di sola lettura</string> + <string name="sdcard_settings_scanning_status">Ricerca del supporto nella scheda SD\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">Abilita dispositivo di memorizzazione di massa USB</string> + <string name="sdcard_settings_total_bytes_label">Byte totali:</string> + <string name="sdcard_settings_unmounted_status">È ora possibile rimuovere la scheda SD</string> + <string name="sdcard_settings_used_bytes_label">Byte utilizzati:</string> + <string name="sdcard_unmount">Smonta scheda SD</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + <string name="sdcard_unmountable_alert_title">Scheda SD non leggibile</string> + <string name="sdcard_unmountable_message">Impossibile leggere la scheda SD. + Il file system può essere danneggiato o la scheda difettosa.</string> + <string name="security">Protezione</string> + <string name="security_and_data_label">Protezione e dati</string> + <string name="security_passwords_title">Password</string> + <string name="security_settings_desc">Specificare in questo campo il contenuto a cui può accedere l'applicazione sul telefono:</string> + <string name="security_settings_summary">Località, sblocco schermo, blocco scheda SIM</string> + <string name="security_settings_title">Protezione e ubicazione</string> + <string name="select_your_language">Selezionare la lingua</string> + <string name="set_lock_pattern_label">Digitare il codice di sblocco:</string> + <string name="settings_chooser_pick_string"> + Inoltrare l'icona delle impostazioni a: + </string> + <string name="settings_label">Impostazioni</string> + <string name="settings_license_activity_loading">Caricamento in corso\u2026</string> + <string name="settings_license_activity_title">Apri licenze origine</string> + <string name="settings_license_activity_unavailable">Si è verificato un problema nel caricamente delle licenze.</string> + <string name="show_password">Password visibili</string> + <string name="show_password_summary">Visualizza password durante la digitazione</string> + <string name="signal">Intensità segnale</string> + <string name="silent_mode_summary">Tutti i suoni eccetto quelli multimediali verranno disattivati</string> + <string name="silent_mode_title">Modalità automatica</string> + <string name="sim_bad_pin">PIN errato</string> + <string name="sim_change_failed">Impossibile cambiare il PIN.\nÈ probabile che il PIN non sia corretto.</string> + <string name="sim_change_pin">Cambia PIN SIM</string> + <string name="sim_change_succeeded">PIN SIM cambiato</string> + <string name="sim_disable_sim_lock">Disabilita blocco scheda SIM</string> + <string name="sim_enable_sim_lock">Abilita blocco scheda SIM</string> + <string name="sim_enter_cancel">Annulla</string> + <string name="sim_enter_new">Digita nuovo PIN</string> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_old">Digita PIN precedente</string> + <string name="sim_enter_pin">Digitare il PIN SIM</string> + <string name="sim_lock_failed">Impossibile modificare lo stato di blocco della scheda SIM.\nÈ possibile che il PIN non sia corretto.</string> + <string name="sim_lock_off">Richiede il PIN per utilizzare il telefono</string> + <string name="sim_lock_on">Richiede il PIN per utilizzare il telefono</string> + <string name="sim_lock_settings">Impostazioni blocco scheda SIM</string> + <string name="sim_lock_settings_category">Configurazione blocco scheda SIM</string> + <string name="sim_lock_settings_title">Blocco scheda SIM</string> + <string name="sim_pin_change">Modifica codice PIN</string> + <string name="sim_pin_toggle">Sblocca scheda SIM</string> + <string name="sim_pins_dont_match">I PIN non corrispondono</string> + <string name="sim_reenter_new">Reimmetti nuovo PIN</string> + <string name="skip_button_label">Annulla</string> + <string name="small_font">Piccolo</string> + <string name="software_version">Versione software</string> + <string name="sort_order_alpha">Ordine alfabetico</string> + <string name="sort_order_size">Ordina per dimensioni (decrescente)</string> + <string name="sound_and_display_settings">Suono e visualizzazione</string> + <string name="sound_and_display_settings_summary">Imposta suonerie, notifiche e luminosità dello schermo</string> + <string name="sound_effects_enable_summary_off">Riproduci audio quando si esegue una selezione schermo</string> + <string name="sound_effects_enable_summary_on">Riproduci audio quando si esegue una selezione schermo</string> + <string name="sound_effects_enable_title">Selezione sonora</string> + <string name="sound_settings">Impostazioni audio</string> + <string name="status_authenticating">Autenticazione in corso\u2026</string> + <string name="status_awake_time">Tempo riattivazione</string> + <string name="status_bt_address">Indirizzo Bluetooth</string> + <string name="status_connected">Connesso</string> + <string name="status_connecting">Connessione in corso\u2026</string> + <string name="status_data_state">Accesso ai dati</string> + <string name="status_disconnected">Disconnesso</string> + <string name="status_disconnecting">Disconnessione in corso\u2026</string> + <string name="status_failed">Non riuscito</string> + <string name="status_imei">IMEI</string> + <string name="status_imei_sv">IMEI SV</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Tipo di rete</string> + <string name="status_number">Numero di telefono</string> + <string name="status_obtaining_ip">Ottenimento indirizzo in corso\u2026</string> + <string name="status_operator">Rete</string> + <string name="status_roaming">Roaming</string> + <string name="status_scanning">Scansione in corso\u2026</string> + <string name="status_service_state">Stato servizio</string> + <string name="status_signal_strength">Intensità segnale</string> + <string name="status_unavailable">Non disponibile</string> + <string name="status_up_time">Tempo di riattivazione</string> + <string name="status_wifi_mac_address">Indirizzo MAC Wi-Fi</string> + <string name="stay_on">Schermo sempre attivo quando sotto carica</string> + <string name="storage_label">Dispositivo di memorizzazione</string> + <string name="storage_settings_summary">Smontare la scheda SD, visualizzare il dispositivo di memorizzazione disponibile</string> + <string name="storage_settings_title">Scheda SD e memoria telefono</string> + <string name="sum_carrier_select">Selezionare un operatore di rete</string> + <string name="summary_connection_failed">Connessione non riuscita, selezionare per riprovare</string> + <string name="summary_not_in_range">Fuori intervallo</string> + <string name="summary_remembered">Memorizzato</string> + <string name="sync_automatically">Sincronizzazione automatica</string> + <string name="sync_calendar">Calendario</string> + <string name="sync_contacts">Contatti</string> + <string name="sync_disabled">Selezionare per sincronizzare i dati automaticamente</string> + <string name="sync_do_nothing">Non eseguire alcuna operazione per ora.</string> + <string name="sync_enabled">Sincronizza dati automaticamente</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_is_failing">La sincronizzazione presenta dei problemi. L'operazione verrà presto ripristinata.</string> + <string name="sync_menu_sync_cancel">Annulla sincronizzazione</string> + <string name="sync_menu_sync_now">Sincronizza ora</string> + <string name="sync_really_delete">Eliminare gli elementi.</string> + <string name="sync_settings">Sincronizzazione dati</string> + <string name="sync_settings_summary">Scegliere le applicazioni sincronizzate</string> + <string name="sync_too_many_deletes">Limite di eliminazioni superato</string> + <string name="sync_too_many_deletes_desc">Esistono %d elementi eliminati per %s, account %s. Specificare l'operazione da eseguire.</string> + <string name="sync_undo_deletes">Annullare le eliminazioni.</string> + <string name="target_build_field_label">Tipo di build richiesta</string> + <string name="team_title">Team</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">Porta MMS:</string> + <string name="telephony_mmsproxy_label">Proxy MMS:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">Nome:</string> + <string name="telephony_password_label">Password:</string> + <string name="telephony_port_label">Porta:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">Server:</string> + <string name="telephony_user_label">Utente:</string> + <string name="terms_title">Termini e condizioni</string> + <string name="testing">Verifica in corso</string> + <string name="testing_battery_info">Informazioni batteria</string> + <string name="testing_phone_info">Informazioni sul telefono</string> + <string name="testing_sim_toolkit">Kit di strumenti SIM</string> + <string name="text_category">Impostazioni testo</string> + <string name="total_size_label">Totale</string> + <string name="turn_off_qxdm">Disabilita log SD QXDM</string> + <string name="turn_off_radio">Disattiva radio</string> + <string name="turn_on_qxdm">Abilita log SD QXDM</string> + <string name="turn_on_radio">Attiva radio</string> + <string name="underdeveloped_settings_label">Impostazioni ancora poco sviluppate</string> + <string name="uninstall_failed">Impossibile disinstallare l'applicazione.</string> + <string name="uninstall_text">Disinstalla</string> + <string name="unknown">Sconosciuto</string> + <string name="vibrate_summary">Vibrazione telefono per chiamate in ingresso</string> + <string name="vibrate_title">Vibrazione telefono</string> + <string name="wallpaper_label">Sfondo</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Reti Wi-Fi</string> + <string name="wifi_add_other_network">Aggiungere una rete Wi-Fi</string> + <string name="wifi_context_menu_change_password">Cambia password</string> + <string name="wifi_context_menu_connect">Connesso alla rete</string> + <string name="wifi_context_menu_forget">Ignora rete</string> + <string name="wifi_dhcp_timeout_error">Si è verificato un errore durante l'ottenimento di un indirizzo IP.</string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_dns_label">dns:</string> + <string name="wifi_error">Errore</string> + <string name="wifi_gateway">Gateway</string> + <string name="wifi_gateway_label">gateway:</string> + <string name="wifi_generic_connection_error">Si è verificato un problema durante la connessione alla rete. Riprovare.</string> + <string name="wifi_host_ip">ip host:</string> + <string name="wifi_ip_address">Indirizzo IP</string> + <string name="wifi_ip_settings_invalid_ip">Digitare un indirizzo IP valido.</string> + <string name="wifi_ip_settings_menu_cancel">Annulla</string> + <string name="wifi_ip_settings_menu_save">Salva</string> + <string name="wifi_ip_settings_titlebar">Impostazioni IP</string> + <string name="wifi_link_speed">Velocità</string> + <string name="wifi_menu_advanced">Avanzate</string> + <string name="wifi_netmask">Netmask</string> + <string name="wifi_netmask_label">maschera di rete:</string> + <string name="wifi_notify_open_networks">Notifica rete</string> + <string name="wifi_notify_open_networks_summary">Notifica quando è disponibile una rete aperta</string> + <string name="wifi_password_incorrect_error">La password di rete immessa non è corretta. Riprovare.</string> + <string name="wifi_password_unchanged">(non modificato)</string> + <string name="wifi_prefer_wifi">Preferisci Wi-Fi</string> + <string name="wifi_quick_toggle_summary">Selezionare per attivare Wi-Fi</string> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <string name="wifi_save_config">Salva</string> + <string name="wifi_screen_activate_text">Attiva</string> + <string name="wifi_screen_dhcp_text">automatico</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">manuale</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi è in funzione</string> + <string name="wifi_screen_test_text">Test</string> + <string name="wifi_security">Protezione</string> + <string name="wifi_security_open">Apri</string> + <string name="wifi_security_unknown">Sconosciuto</string> + <string name="wifi_security_verbose_open">Apri rete</string> + <string name="wifi_security_verbose_wep">Protetto con WEP</string> + <string name="wifi_security_verbose_wpa">Protetto con WPA</string> + <string name="wifi_security_verbose_wpa2">Protetto con WPA2</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_settings">Impostazioni Wi-Fi</string> + <string name="wifi_settings_category">Impostazioni Wi-Fi</string> + <string name="wifi_settings_summary">Configura e gestisci punti di accesso wireless</string> + <string name="wifi_show_password">Visualizza password.</string> + <string name="wifi_signal_0">Scarsa</string> + <string name="wifi_signal_1">Mediocre</string> + <string name="wifi_signal_2">Buona</string> + <string name="wifi_signal_3">Eccellente</string> + <string name="wifi_starting">Disattivazione in corso\u2026</string> + <string name="wifi_status">Stato</string> + <string name="wifi_stopping">Disattivazione in corso\u2026</string> + <string name="wifi_type_ssid">Digitare il SSID della rete:</string> + <string name="wifi_use_static_ip">Usa IP statico</string> + <string name="wifi_wlan_id">id wlan:</string> +</resources> diff --git a/res/values-nl-rNL/strings.xml b/res/values-nl-rNL/strings.xml new file mode 100644 index 0000000..bb566be --- /dev/null +++ b/res/values-nl-rNL/strings.xml @@ -0,0 +1,445 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="activity_picker_label">Activiteit selecteren</string> + <string name="airplane_mode">Vliegtuigmodus</string> + <string name="android_id_label">Android ID</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">Toegangspunt bewerken</string> + <string name="apn_http_port">Poort</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">MMS-poort</string> + <string name="apn_mms_proxy">MMS-proxy</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">Naam</string> + <string name="apn_not_set"><Niet ingesteld></string> + <string name="apn_password">Wachtwoord</string> + <string name="apn_server">Server</string> + <string name="apn_settings">APN</string> + <string name="apn_user">Gebruikersnaam</string> + <string name="app_launcher_newView_text">Nieuwe AppLauncher</string> + <string name="band_mode_failed">Mislukt</string> + <string name="band_mode_loading">Bandlijst wordt geladen\u2026</string> + <string name="band_mode_set">Instellen</string> + <string name="band_mode_succeeded">Geslaagd</string> + <string name="band_mode_title">Gsm/umts-band instellen</string> + <string name="baseband_version">Basebandversie</string> + <string name="basic_settings_title">Basisinstellingen</string> + <string name="battery_info_health_dead">Dood</string> + <string name="battery_info_health_good">Goed</string> + <string name="battery_info_health_label">Batterijstatus:</string> + <string name="battery_info_health_over_voltage">Spanning te hoog</string> + <string name="battery_info_health_overheat">Oververhitting</string> + <string name="battery_info_health_unknown">Onbekend</string> + <string name="battery_info_health_unspecified_failure">Onbekende fout</string> + <string name="battery_info_label">Batterij-info</string> + <string name="battery_info_level_label">Batterijniveau:</string> + <string name="battery_info_scale_label">Batterijschaal:</string> + <string name="battery_info_status_charging">opladen</string> + <string name="battery_info_status_charging_ac">(wisselstroom)</string> + <string name="battery_info_status_charging_usb">(Usb)</string> + <string name="battery_info_status_discharging">Bezig met ontladen</string> + <string name="battery_info_status_full">Vol</string> + <string name="battery_info_status_label">Batterijstatus:</string> + <string name="battery_info_status_not_charging">Wordt niet opgeladen</string> + <string name="battery_info_status_unknown">Onbekend</string> + <string name="battery_info_technology_label">Batterijtechnologie:</string> + <string name="battery_info_temperature_label">Batterijtemperatuur:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_voltage_label">Batterijvoltage:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="bluetooth">Bluetooth</string> + <string name="bluetooth_clear_list">Apparaatlijst wissen</string> + <string name="bluetooth_connectable">Alleen waarmee verbinding mogelijk is</string> + <string name="bluetooth_connected">Verbonden</string> + <string name="bluetooth_connecting">Verbinden\u2026</string> + <string name="bluetooth_device">handsfree / headset</string> + <string name="bluetooth_device_info">Bluetooth-toestelinfo</string> + <string name="bluetooth_device_info_alias">Toestelalias</string> + <string name="bluetooth_device_info_delete">Dit toestel verwijderen</string> + <string name="bluetooth_device_info_no_alias">Alias hier invoeren\u2026</string> + <string name="bluetooth_device_info_sdp">Lijst met ondersteunde diensten</string> + <string name="bluetooth_device_name">Apparaatnaam</string> + <string name="bluetooth_devices">Bluetooth-apparaten</string> + <string name="bluetooth_disabled">Bluetooth is uitgeschakeld</string> + <string name="bluetooth_disconnect_blank">Verbinding met %1$s verbreken?</string> + <string name="bluetooth_discoverability_panel_title">Maak me\u2026</string> + <string name="bluetooth_discoverable">Zichtbaar & met verbinding</string> + <string name="bluetooth_enable_text">Knop leegmaken\u2026</string> + <string name="bluetooth_enabled">Bluetooth is nu ingeschakeld</string> + <string name="bluetooth_enabling">Bluetooth wordt ingeschakeld\u2026</string> + <string name="bluetooth_enter_pin_msg">Voer pincode in voor </string> + <string name="bluetooth_is_discoverable">Toestel is zichtbaar</string> + <string name="bluetooth_name_not_set">Geen naam ingesteld, accountnaam wordt gebruikt</string> + <string name="bluetooth_neither">Zichtbaar noch met verbinding</string> + <string name="bluetooth_new_data">Voer nieuwe gegevens in</string> + <string name="bluetooth_new_data_cancel">Annuleren</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_not_connected">Niet verbonden</string> + <string name="bluetooth_not_discoverable">Toestel is niet zichtbaar</string> + <string name="bluetooth_paired">Gekoppeld</string> + <string name="bluetooth_pairing_msg">Koppelen\u2026</string> + <string name="bluetooth_pin_entry">Bluetooth-pincode invoeren</string> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_scan_for_devices">Zoeken naar Bluetooth-apparaten</string> + <string name="bluetooth_scan_for_new_devices">Bezig met scannen naar nieuwe toestellen\u2026</string> + <string name="bluetooth_scan_text">Knop leegmaken\u2026</string> + <string name="bluetooth_settings_text">Knop leegmaken\u2026</string> + <string name="bluetooth_settings_title">Bluetooth-instellingen</string> + <string name="bluetooth_starting">Bluetooth wordt gestart\u2026</string> + <string name="bluetooth_stopping">Bluetooth wordt gestopt\u2026</string> + <string name="bluetooth_title">Bluetooth</string> + <string name="bluetooth_unknown">Onbekend</string> + <string name="bluetooth_visibility">Zichtbaarheid</string> + <string name="bootloader_version">Bootloaderversie</string> + <string name="brightness">Helderheid</string> + <string name="build_date_label">Versiedatum</string> + <string name="build_description_label">Versiebeschrijving</string> + <string name="build_host_label">Versiehost</string> + <string name="build_id_label">Versie-id</string> + <string name="build_type_label">Versietype</string> + <string name="build_user_label">Versiegebruiker</string> + <string name="call_settings_title">Belinstellingen</string> + <string name="cancel">Annuleren</string> + <string name="checkin_button_label">Controleren op upgrade</string> + <string name="checkin_download_failed_status">Downloaden mislukt</string> + <string name="checkin_download_label">Downloadstatus</string> + <string name="checkin_download_ongoing_status">Downloaden\u2026</string> + <string name="checkin_download_succeeded_status">Downloaden gelukt, bezig met controleren\u2026</string> + <string name="checkin_download_suspended_status">Downloaden uitgesteld</string> + <string name="checkin_download_unknown_status">Onbekende status</string> + <string name="checkin_failures_label">Mislukkingen sinds laatste succes</string> + <string name="checkin_last_time_label">Laatste gelukte aanmelding</string> + <string name="checkin_status_label">Aanmeldstatus</string> + <string name="checkin_time_never">(nooit)</string> + <string name="checkin_upgrade_label">Upgrade in behandeling</string> + <string name="choose_timezone">Tijdzone selecteren</string> + <string name="choose_timezone_region">Regio selecteren</string> + <string name="connect">Verbinden</string> + <string name="connect_to_blank">Verbinding maken met %1$s</string> + <string name="date_and_time">Datum & Tijd</string> + <string name="date_and_time_settings_title">Datum & Tijd</string> + <string name="date_time_24hour">24-uurs indeling</string> + <string name="date_time_auto">Auto</string> + <string name="date_time_auto_summaryOff">Gebruik door gebruikers gekozen waardes</string> + <string name="date_time_auto_summaryOn">Gebruik door netwerk geleverde waardes</string> + <string name="date_time_changeDate_text">Datum veranderen</string> + <string name="date_time_changeTime_text">Tijd veranderen</string> + <string name="date_time_dateDisplay_text">3 nov 1997</string> + <string name="date_time_date_format">Datumindeling instellen</string> + <string name="date_time_set_date">Datum instellen</string> + <string name="date_time_set_time">Tijd instellen</string> + <string name="date_time_set_timezone">Tijdzone selecteren</string> + <string name="date_time_setzone_text">Tijdzone veranderen</string> + <string name="date_time_timeDisplay_text">11:45 AM</string> + <string name="date_time_timezone_label">Tijdzone:</string> + <string name="debug_intent_sender_label">Debug intent sender</string> + <string name="default_date_format">dd/MM/yyyy</string> + <string name="default_keyboard_device_label">Standaard toetsenbordapparaat</string> + <string name="device_info_asleeptime">Slaaptijd</string> + <string name="device_info_awaketime">Opwektijd</string> + <string name="device_info_default">Onbekend</string> + <string name="device_info_label">Toestelinfo</string> + <string name="device_info_settings">Toestelinfo</string> + <string name="device_info_uptime">Tijd geactiveerd</string> + <string name="device_memory">Geheugen</string> + <string name="device_memory_summary">Intern geheugen, sd-kaartgeheugen</string> + <string name="device_status">Status</string> + <string name="device_status_summary">IMEI, telefoonnummer, signaal, enz.</string> + <string name="dim_screen">Scherm dimmen</string> + <string name="disconnect_ums">Verbinding met usb-massaopslag verbreken</string> + <string name="display_font_size_label">Lettergrootte:</string> + <string name="display_label">Scherm</string> + <string name="display_preview_label">Voorbld:</string> + <string name="display_settings">Scherm</string> + <string name="done">OK</string> + <string name="error_apn_empty">APN kan niet blanco zijn</string> + <string name="error_connecting">Fout bij maken van netwerkverbinding</string> + <string name="error_mcc_not3">MMC-veld moet 3 tekens zijn</string> + <string name="error_mnc_not23">MMC-veld moet 2 of 3 tekens zijn</string> + <string name="error_name_empty">Naam kan niet blanco zijn</string> + <string name="error_saving">Fout bij opslaan netwerk</string> + <string name="error_scanning">Fout bij scannen naar netwerken</string> + <string name="error_starting">Fout bij starten van wifi</string> + <string name="error_stopping">Fout bij stoppen van wifi</string> + <string name="error_title">Ongeldige gegevens</string> + <string name="failed_to_connect">Geen verbinding gemaakt met\u0020</string> + <string name="favorites_label">Favorieten</string> + <string name="firmware_version">Firmwareversie</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + <string name="forget_network">Vergeten</string> + <string name="fragment_status_authenticating">Controleren met %1$s</string> + <string name="fragment_status_connected">Verbonden met %1$s</string> + <string name="fragment_status_connecting">Bezig met verbinding maken met %1$s</string> + <string name="fragment_status_disconnected">Verbinding verbroken</string> + <string name="fragment_status_disconnecting">Verbinding met %1$s wordt verbroken</string> + <string name="fragment_status_failed">Mislukt</string> + <string name="fragment_status_obtaining_ip">Ip-adres wordt verkregen van %1$s</string> + <string name="fragment_status_scanning">Scannen</string> + <string name="gsm_version_baseband_label">Basebandversie</string> + <string name="gsm_version_ril_impl_label">RIL Impl-versie</string> + <string name="intent_sender_account_label">Account: </string> + <string name="intent_sender_action_label">Actie:</string> + <string name="intent_sender_data_label">Gegevens:</string> + <string name="intent_sender_resource_label">Netwerkbron: </string> + <string name="intent_sender_sendbroadcast_text">Uitzending versturen</string> + <string name="intent_sender_startactivity_text">Activiteit starten</string> + <string name="ip_address">Ip-adres</string> + <string name="kernel_version_label">Linux kernelversie</string> + <string name="keyguard_label">Toetsbescherming</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Bevestig nieuw wachtwoord:</string> + <string name="keyguard_password_mismatch_error_text">De twee wachtwoorden verschillen! Voer ze nogmaals in</string> + <string name="keyguard_password_new_label">Nieuw wachtwoord:</string> + <string name="keyguard_password_old_label">Oud wachtwoord:</string> + <string name="keyguard_password_old_password_error_text">Het oude wachtwoord is onjuist! Probeer het opnieuw</string> + <string name="keyguard_pin_mod_text">Pincode wijzigen</string> + <string name="keyguard_pw_mod_text">Blokkeringspatroon selecteren</string> + <string name="keyguard_sim_pin_label">SIM-pincode</string> + <string name="language_picker_title">Taal</string> + <string name="large_font">Groot</string> + <string name="location_gps">Gebaseerd op gps</string> + <string name="location_label">Locatieprovider:</string> + <string name="location_neighborhood_level">Nauwkeurigheid op buurtniveau</string> + <string name="location_network_based">Gebaseerd op netwerk</string> + <string name="location_source">Locatienauwkeurigheid</string> + <string name="location_status">Status:</string> + <string name="location_street_level">Nauwkeurigheid op straatniveau</string> + <string name="lock_settings_title">Blokkeergebaar</string> + <string name="lockpattern_change_lock_pattern_label">Patroon voor veranderen blokkering</string> + <string name="lockpattern_confirm_button_text">Bevestigen</string> + <string name="lockpattern_need_to_unlock">Opgeslagen patroon bevestigen:</string> + <string name="lockpattern_need_to_unlock_wrong">Onjuist! Nogmaals proberen:</string> + <string name="lockpattern_pattern_confirmed_header">Het nieuwe blokkeringspatroon:</string> + <string name="lockpattern_pattern_entered_header">U selecteerde:</string> + <string name="lockpattern_recording_incorrect_less_than_three">Onjuist! U moet over minstens drie punten slepen</string> + <string name="lockpattern_recording_inprogress">Til de vinger op als u klaar bent</string> + <string name="lockpattern_recording_intro_footer">Druk op Menu voor hulp</string> + <string name="lockpattern_recording_intro_header">Teken een patroon om als codeblokkering te gebruiken:</string> + <string name="lockpattern_restart_button_text">Opnieuw starten</string> + <string name="lockpattern_settings_change_lock_pattern">Gebaarpatroon voor veranderen blokkering</string> + <string name="lockpattern_settings_choose_lock_pattern">Patroon voor blokkeringsgebaar selecteren</string> + <string name="lockpattern_settings_enable_summary">Gebaar vereisen voor vrijgeven</string> + <string name="lockpattern_settings_enable_title">Blokkeergebaar</string> + <string name="lockpattern_settings_enable_visible_pattern_title">Zichtbaar patroon gebruiken</string> + <string name="lockpattern_settings_help_how_to_record">Het opnemen van een blokkeringspatroon</string> + <string name="lockpattern_settings_title">Blokkeergebaar</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Probeer opnieuw over <xliff:g id="number">%d</xliff:g> seconden</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Te veel onjuiste bevestigingspogingen</string> + <string name="master_clear_button_text">Apparaat opnieuw instellen</string> + <string name="master_clear_desc">Herstelt de oorspronkelijke fabriekswaarden van het toestel, waarbij alle gegevens en gedownloade toepassingen worden gewist</string> + <string name="master_clear_failed">Geen reset uitgevoerd omdat de service Systeem wissen niet beschikbaar is</string> + <string name="master_clear_final_button_text">Alles wissen</string> + <string name="master_clear_final_desc">Toestel resetten, waarbij alle gegevens en toepassingen worden gewist? Handeling kan niet worden teruggedraaid!</string> + <string name="master_clear_gesture_explanation">U moet het blokkeringspatroon tekeken om een toestelreset goed te keuren</string> + <string name="master_clear_gesture_prompt">Teken het blokkeringspatroon</string> + <string name="master_clear_title">Hoofd wissen</string> + <string name="medium_font">Normaal</string> + <string name="menu_cancel">Wissen</string> + <string name="menu_delete">APN verwijderen</string> + <string name="menu_new">Nieuwe APN</string> + <string name="menu_save">Opslaan</string> + <string name="mobile_network">Mobiel netwerk</string> + <string name="network_settings_title">Netwerkinstellingen</string> + <string name="next_label">Volgende</string> + <string name="notification_sound_dialog_title">Meldingsbeltonen selecteren</string> + <string name="notification_sound_title">Meldingsbeltonen</string> + <string name="phone_info_label">Telefooninfo</string> + <string name="please_type_passphrase">Voer de draadloze wachtwoordcode in</string> + <string name="power_management_label">Energiebeheer</string> + <string name="progress_scanning">Scannen</string> + <string name="proxy_action_text">Opslaan</string> + <string name="proxy_clear_text">Wissen</string> + <string name="proxy_defaultView_text">Beginwaarden</string> + <string name="proxy_error">Let op!</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_empty_host_set_port">Het poortveld moet blanco zijn als het hostveld blanco is</string> + <string name="proxy_error_empty_port">U moet het poortveld voltooien</string> + <string name="proxy_error_invalid_host">De opgegeven hostnaam is ongeldig</string> + <string name="proxy_error_invalid_port">De opgegeven poort is ongeldig</string> + <string name="proxy_hostname_label">Hostnaam</string> + <string name="proxy_port_label">Poort</string> + <string name="proxy_settings_label">Proxyinstellingen</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">Verbonden</string> + <string name="radioInfo_data_connecting">Verbinding</string> + <string name="radioInfo_data_disconnected">Verbinding verbroken</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">bytes</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">pkts</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">Gegevensverbinding uitschakelen</string> + <string name="radioInfo_menu_enableData">Gegevensverbinding inschakelen</string> + <string name="radioInfo_menu_getPDP">PDP-lijst verkrijgen</string> + <string name="radioInfo_menu_viewADN">SIM-adresboek weergeven</string> + <string name="radioInfo_menu_viewFDN">Vaste nummers weergeven</string> + <string name="radioInfo_menu_viewSDN">Service kiesnummers weergeven</string> + <string name="radioInfo_phone_idle">Niet-actief</string> + <string name="radioInfo_phone_offhook">Gesprek bezig</string> + <string name="radioInfo_phone_ringing">Bezig met overgaan</string> + <string name="radioInfo_roaming_in">Roaming</string> + <string name="radioInfo_roaming_not">Geen roaming</string> + <string name="radioInfo_service_emergency">Alleen alarmnummers</string> + <string name="radioInfo_service_in">Geactiveerd</string> + <string name="radioInfo_service_off">Radio uit</string> + <string name="radioInfo_service_out">Buiten dienst</string> + <string name="radioInfo_unknown">onbekend</string> + <string name="radio_info_band_mode_label">Radioband selecteren</string> + <string name="radio_info_call_redirect_label">Gesprek doorsturen:</string> + <string name="radio_info_call_status_label">Oproepstatus:</string> + <string name="radio_info_current_network_label">Huidig netwerk:</string> + <string name="radio_info_data_attempts_label">Gegevenspogingen:</string> + <string name="radio_info_data_successes_label">Gegevenssuccessen:</string> + <string name="radio_info_gprs_service_label">Gprs-dienst:</string> + <string name="radio_info_gsm_disconnects_label">Gsm-verbinding verbreken:</string> + <string name="radio_info_gsm_service_label">Gsm-dienst:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">Bericht wachtend op behandeling:</string> + <string name="radio_info_neighboring_location_label">Omgevings-CID:</string> + <string name="radio_info_network_type_label">Netwerktype:</string> + <string name="radio_info_phone_number_label">Telefoonnummer:</string> + <string name="radio_info_ppp_received_label">PPP ontvangen:</string> + <string name="radio_info_ppp_resets_label">Aantal PPP-resets sinds opstarten:</string> + <string name="radio_info_ppp_sent_label">PPP verzonden:</string> + <string name="radio_info_radio_resets_label">Radio resets:</string> + <string name="radio_info_roaming_label">Roaming:</string> + <string name="radio_info_set_perferred_label">Voorkeursnetwerktype instellen:</string> + <string name="radio_info_signal_location_label">Locatie:</string> + <string name="radio_info_signal_strength_label">Signaalsterkte:</string> + <string name="read_only">\u0020(Alleen lezen)</string> + <string name="ring_volume_title">Belvolume</string> + <string name="ringer_volume_instructions">Gebruik volumetoetsen om het belvolume aan te passen</string> + <string name="ringer_volume_ringer_mode_label">Beltoonmodus</string> + <string name="ringer_volume_ringtone_label">Beltoon</string> + <string name="ringer_volume_screen_increasing_text">Belvolume verhogen</string> + <string name="ringtone_title">Telefoonbeltoon</string> + <string name="scan_wifi">Scannen</string> + <string name="screen_off_timeout_label">Scherm uit time-out</string> + <string name="sd_card_settings_label">Sd-kaart</string> + <string name="sd_unavailable">Niet beschikbaar</string> + <string name="sdcard_changes_instructions">Veranderingen worden toegepast zodra de usb-kabel opnieuw wordt aangesloten</string> + <string name="sdcard_removal_alert_ok">OK</string> + <string name="sdcard_removal_alert_scolding">De sd-kaart is verwijderd terwijl deze nog in gebruik was! + Om beschadiging van de kaart te vorkomen, gebruikt u het venster Sd-kaartinstellingen om de kaart vrij te geven voordat deze wordt verwijderd</string> + <string name="sdcard_removal_alert_title">Onveilige verwijdering van sd-kaart</string> + <string name="sdcard_setting">Sd-kaart</string> + <string name="sdcard_settings_available_bytes_label">Beschikbare bytes:</string> + <string name="sdcard_settings_bad_removal_status">Sd-kaart is verwijderd terwijl deze nog in gebruik was!</string> + <string name="sdcard_settings_mass_storage_status">Sd-kaart wordt gebruikt als apparaat voor massaopslag</string> + <string name="sdcard_settings_not_present_status">Geen sd-kaart</string> + <string name="sdcard_settings_read_only_status">Sd-kaart is alleen-lezen</string> + <string name="sdcard_settings_scanning_status">Sd-kaart wordt gescand op media\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">Usb-massaopslag inschakelen</string> + <string name="sdcard_settings_total_bytes_label">Totaal aantal bytes:</string> + <string name="sdcard_settings_unmounted_status">Nu kunt u de sd-kaart veilig verwijderen</string> + <string name="sdcard_settings_used_bytes_label">Gebruikt aantal bytes:</string> + <string name="sdcard_unmount">Sd-kaart vrijgeven</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + <string name="sdcard_unmountable_alert_title">Sd-kaart onleesbaar</string> + <string name="sdcard_unmountable_message">De sd-kaart kon niet worden gelezen. + Het bestandssysteem is beschadigd of de kaart is defect</string> + <string name="security">Beveiliging</string> + <string name="security_label">Beveiliging</string> + <string name="settings_chooser_pick_string"> + Instellingenpictogram moet verwijzen naar: +</string> + <string name="settings_label">Instellingen</string> + <string name="signal">Signaalsterkte</string> + <string name="silent_mode_title">Stil</string> + <string name="sim_bad_pin">Let op: Onjuiste pincode</string> + <string name="sim_change_failed">Veranderen van pincode mislukt\nWellicht onjuiste pincode</string> + <string name="sim_change_pin">SIM-pincode wijzigen</string> + <string name="sim_change_succeeded">Veranderen van SIM-pincode gelukt</string> + <string name="sim_disable_sim_lock">SIM-kaartblokkering uitschakelen</string> + <string name="sim_enable_sim_lock">SIM-kaartblokkering inschakelen</string> + <string name="sim_enter_cancel">Annuleren</string> + <string name="sim_enter_new">Nieuwe pincode invoeren</string> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_old">Oude pincode invoeren</string> + <string name="sim_enter_pin">SIM-pincode invoeren</string> + <string name="sim_lock_failed">Veranderen blokkeringsstatus van SIM-kaart mislukt\nWellicht onjuist pincode</string> + <string name="sim_lock_off">SIM-kaartblokkering uit</string> + <string name="sim_lock_on">SIM-kaartblokkering aan</string> + <string name="sim_lock_settings">SIM-kaartblokkering</string> + <string name="sim_lock_settings_title">SIM-blokkeerinstellingen</string> + <string name="sim_pin_change">Pincode veranderen</string> + <string name="sim_pin_toggle">SIM-kaartblokkering</string> + <string name="sim_pins_dont_match">Let op: Pincodes verschillen</string> + <string name="sim_reenter_new">Voer nieuwe pincode opnieuw in</string> + <string name="small_font">Klein</string> + <string name="software_version">Softwareversie</string> + <string name="sound_and_alerts_settings">Geluid</string> + <string name="status_authenticating">Bezig met verifiëren</string> + <string name="status_awake_time">Opwektijd</string> + <string name="status_connected">Verbonden</string> + <string name="status_connecting">Verbinding</string> + <string name="status_data_state">Gegevenstoegang</string> + <string name="status_disconnected">Verbinding verbroken</string> + <string name="status_disconnecting">Verbinding wordt verbroken</string> + <string name="status_failed">Mislukt</string> + <string name="status_imei">IMEI</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">Netwerktype</string> + <string name="status_number">Telefoonnummer</string> + <string name="status_obtaining_ip">Bezig met verkrijgen van ip-adres</string> + <string name="status_operator">Netwerk</string> + <string name="status_roaming">Roaming</string> + <string name="status_scanning">Scannen</string> + <string name="status_service_state">Dienststatus</string> + <string name="status_signal_strength">Signaalsterkte</string> + <string name="status_up_time">Tijd geactiveerd</string> + <string name="stay_on">Ingeschakeld laten als aangesloten</string> + <string name="summary_not_in_range">Niet in bereik</string> + <string name="summary_remembered">Onthouden</string> + <string name="sync_calendar">Agenda</string> + <string name="sync_contacts">Contacten</string> + <string name="sync_disabled">Uit</string> + <string name="sync_enabled">Synchroniseren met Google-server ingeschakeld</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_menu_sync_cancel">Synchroniseren annuleren</string> + <string name="sync_menu_sync_now">Nu synchroniseren</string> + <string name="sync_settings">Synchronisatie</string> + <string name="target_build_field_label">Opgevraagd versietype</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">MMS-poort:</string> + <string name="telephony_mmsproxy_label">MMS-proxy:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">Naam:</string> + <string name="telephony_password_label">Wachtwoord :</string> + <string name="telephony_port_label">Poort:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">Server:</string> + <string name="telephony_user_label">Gebruiker:</string> + <string name="turn_off_qxdm">QXDM sd-log uitschakelen</string> + <string name="turn_off_radio">Radio uitschakelen</string> + <string name="turn_on_qxdm">QXDM sd-log inschakelen</string> + <string name="turn_on_radio">Radio uitschakelen</string> + <string name="underdeveloped_settings_label">Onderontwikkelde instellingen</string> + <string name="wallpaper_label">Achtergrond</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Netwerken</string> + <string name="wifi_dns_label">dns:</string> + <string name="wifi_gateway_label">gateway:</string> + <string name="wifi_host_ip">host-ip:</string> + <string name="wifi_netmask_label">netmask:</string> + <string name="wifi_prefer_wifi">Wifi heeft voorkeur</string> + <string name="wifi_screen_activate_text">Activeren</string> + <string name="wifi_screen_dhcp_text">automatisch</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">handmatig</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wifi functioneert</string> + <string name="wifi_screen_test_text">Testen</string> + <string name="wifi_settings">Wifi-instellingen</string> + <string name="wifi_wlan_id">wlan-id:</string> +</resources> diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml new file mode 100644 index 0000000..19907b1 --- /dev/null +++ b/res/values-zh-rTW/strings.xml @@ -0,0 +1,700 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="about_settings">關於電話</string> + <string name="about_settings_summary">檢視合法資訊、電話狀態、軟體版本</string> + <string name="activity_picker_label">選取活動</string> + <string name="airplane_mode">飛安模式</string> + <string name="airplane_mode_summary">選取以便停用所有無線連線</string> + <string name="airplane_mode_turning_off">正在啟用無線連線\u2026</string> + <string name="airplane_mode_turning_on">正在停用無線連線\u2026</string> + <string name="android_id_label">Android ID</string> + <string name="apn_apn">APN</string> + <string name="apn_edit">編輯存取點</string> + <string name="apn_http_port">連接埠</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_label">APN</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mms_port">多媒體簡訊連接埠</string> + <string name="apn_mms_proxy">多媒體簡訊 Proxy</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_name">名稱</string> + <string name="apn_not_set"><尚未設定></string> + <string name="apn_password">密碼</string> + <string name="apn_server">伺服器</string> + <string name="apn_settings">APN</string> + <string name="apn_type">APN 類型</string> + <string name="apn_user">使用者名稱</string> + <string name="app_launcher_newView_text">新增 AppLauncher</string> + <string name="app_not_found_dlg_text"> 已安裝之應用程式的清單中找 +不到此應用程式。</string> + <string name="app_not_found_dlg_title">找不到應用程式</string> + <string name="application_info_label">應用程式資訊</string> + <string name="application_size_label">應用程式</string> + <string name="applications_settings">應用程式</string> + <string name="applications_settings_header">應用程式設定</string> + <string name="applications_settings_summary">管理應用程式,設定快速啟動捷徑</string> + <string name="auto_caps">自動大寫</string> + <string name="auto_caps_summary">句子首字母大寫</string> + <string name="auto_launch_disable_text">無預設設定。</string> + <string name="auto_launch_enable_text">根據預設,您已經選取啟動此應用程式以便執行某些動作。</string> + <string name="auto_launch_label">預設啟動</string> + <string name="auto_punctuate">自動標點符號</string> + <string name="auto_punctuate_summary">按下 Space 鍵兩次即可插入 \u0022。\u0022</string> + <string name="auto_replace">自動取代</string> + <string name="auto_replace_summary">修正輸入錯誤的字彙</string> + <string name="autorotate">自動旋轉</string> + <string name="autorotate_summary_off">變更畫面方向不會旋轉應用程式</string> + <string name="autorotate_summary_on">變更畫面方向旋轉應用程式</string> + <string name="b_text">B</string> + <string name="band_mode_failed">失敗</string> + <string name="band_mode_loading">正在載入波段清單\u2026</string> + <string name="band_mode_set">設定</string> + <string name="band_mode_succeeded">成功</string> + <string name="band_mode_title">設定 GSM/UMTS 波段</string> + <string name="baseband_version">Baseband 版本</string> + <string name="basic_settings_title">電話基本資訊</string> + <string name="battery_info_awake_battery">使用電池時的喚醒時間:</string> + <string name="battery_info_awake_plugged">充電時的喚醒時間:</string> + <string name="battery_info_health_dead">故障</string> + <string name="battery_info_health_good">良好</string> + <string name="battery_info_health_label">電池壽命:</string> + <string name="battery_info_health_over_voltage">電壓超載</string> + <string name="battery_info_health_overheat">過熱</string> + <string name="battery_info_health_unknown">無法辨識</string> + <string name="battery_info_health_unspecified_failure">無法辨識的錯誤</string> + <string name="battery_info_label">電池資訊</string> + <string name="battery_info_level_label">電池電量:</string> + <string name="battery_info_scale_label">電池刻度:</string> + <string name="battery_info_screen_on">畫面顯示時間:</string> + <string name="battery_info_status_charging">正在充電</string> + <string name="battery_info_status_charging_ac">(AC)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">正在放電</string> + <string name="battery_info_status_full">充滿</string> + <string name="battery_info_status_label">電池狀態:</string> + <string name="battery_info_status_not_charging">尚未充電</string> + <string name="battery_info_status_unknown">無法辨識</string> + <string name="battery_info_technology_label">電池技術:</string> + <string name="battery_info_temperature_label">電池溫度:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">開機後使用時間已經超過:</string> + <string name="battery_info_voltage_label">電池電壓:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_level_title">電池電量</string> + <string name="battery_status_title">電池狀態</string> + <string name="bluetooth">藍牙</string> + <string name="bluetooth_clear_list">清除裝置清單</string> + <string name="bluetooth_connect">連線</string> + <string name="bluetooth_connectable">僅可連線</string> + <string name="bluetooth_connected">已連線</string> + <string name="bluetooth_connecting">正在連線\u2026</string> + <string name="bluetooth_device">免持聽筒/耳機</string> + <string name="bluetooth_device_info">藍牙裝置資訊</string> + <string name="bluetooth_device_info_alias">裝置別名</string> + <string name="bluetooth_device_info_delete">移除此裝置</string> + <string name="bluetooth_device_info_no_alias">在此輸入類型別名\u2026</string> + <string name="bluetooth_device_info_sdp">列出支援的服務</string> + <string name="bluetooth_device_name">裝置名稱</string> + <string name="bluetooth_devices">藍牙裝置</string> + <string name="bluetooth_disabled">選取開啟藍牙</string> + <string name="bluetooth_disconnect">中斷連線</string> + <string name="bluetooth_disconnect_blank">將會與 <xliff:g id="device_name">%1$s</xliff:g> 中斷連線。</string> + <string name="bluetooth_discoverability_panel_title">將我設成\u2026</string> + <string name="bluetooth_discoverable">可搜尋 %1$s 秒</string> + <string name="bluetooth_enable_text">清空按鍵\u2026</string> + <string name="bluetooth_enabled">選取開啟藍牙</string> + <string name="bluetooth_enabling">正在開啟藍牙\u2026</string> + <string name="bluetooth_enter_pin_msg">輸入 PIN 碼\u0020</string> + <string name="bluetooth_failed_to_enable">無法開啟藍牙</string> + <string name="bluetooth_is_discoverable">可搜尋 %1$s 秒\u2026</string> + <string name="bluetooth_name_not_set">尚未設定名稱,使用帳號名稱代替</string> + <string name="bluetooth_neither">無法搜尋及連線</string> + <string name="bluetooth_new_data">輸入新資料</string> + <string name="bluetooth_new_data_cancel">取消</string> + <string name="bluetooth_new_data_confirm">確定</string> + <string name="bluetooth_not_connected">與此裝置配對</string> + <string name="bluetooth_not_discoverable">選取讓裝置設成可搜尋</string> + <string name="bluetooth_notif_message">選取配對目標\u0020</string> + <string name="bluetooth_notif_ticker">藍牙配對要求</string> + <string name="bluetooth_notif_title">藍牙配對要求</string> + <string name="bluetooth_pair">配對</string> + <string name="bluetooth_paired">已經配對</string> + <string name="bluetooth_paired_not_nearby">已經配對</string> + <string name="bluetooth_pairing">正在配對\u2026</string> + <string name="bluetooth_pairing_msg">正在配對\u2026</string> + <string name="bluetooth_pin_entry">輸入藍牙 PIN 碼</string> + <string name="bluetooth_quick_toggle_summary">選取開啟藍牙</string> + <string name="bluetooth_quick_toggle_title">藍牙</string> + <string name="bluetooth_scan_for_devices">掃描裝置</string> + <string name="bluetooth_scan_for_new_devices">正在掃描新裝置\u2026</string> + <string name="bluetooth_scan_text">清空按鍵\u2026</string> + <string name="bluetooth_settings">藍牙設定</string> + <string name="bluetooth_settings_summary">管理連線,及設定裝置名稱與可搜尋性</string> + <string name="bluetooth_settings_text">清空按鍵\u2026</string> + <string name="bluetooth_settings_title">藍牙設定</string> + <string name="bluetooth_starting">正在啟動藍牙\u2026</string> + <string name="bluetooth_stopping">正在停止藍牙\u2026</string> + <string name="bluetooth_unknown">無法辨識</string> + <string name="bluetooth_unpair">取消配對</string> + <string name="bluetooth_visibility">可搜尋的</string> + <string name="bootloader_version">Boot Loader 版本</string> + <string name="brightness">亮度</string> + <string name="build_date_label">建置日期</string> + <string name="build_description_label">建置說明</string> + <string name="build_host_label">建置主機</string> + <string name="build_id_label">建置 ID</string> + <string name="build_number">建置號碼</string> + <string name="build_type_label">建置類型</string> + <string name="build_user_label">建置使用者</string> + <string name="call_settings_summary">設定語音信箱、來電轉接、來電插撥、本機號碼</string> + <string name="call_settings_title">通話設定</string> + <string name="cancel">取消</string> + <string name="checkin_button_label">檢查升級</string> + <string name="checkin_download_failed">失敗</string> + <string name="checkin_download_label">下載狀態</string> + <string name="checkin_download_ongoing">正在下載</string> + <string name="checkin_download_pending">等待</string> + <string name="checkin_download_succeeded">已完成</string> + <string name="checkin_download_suspended">已擱置</string> + <string name="checkin_download_unknown">無法辨識的狀態</string> + <string name="checkin_failures_label">自上次成功後發生失敗</string> + <string name="checkin_last_time_label">最後一次成功檢查</string> + <string name="checkin_started_message">已經開始檢查\u2026</string> + <string name="checkin_status_label">檢查狀態</string> + <string name="checkin_time_never">(永不)</string> + <string name="checkin_upgrade_label">正在等待升級</string> + <string name="choose_timezone">選取時區</string> + <string name="choose_timezone_region">選取地區</string> + <string name="clear_activities">清除預設值</string> + <string name="clear_data_dlg_text">在此應用程式中已經儲存的所有資訊將會被永久刪除。</string> + <string name="clear_data_dlg_title">刪除</string> + <string name="clear_data_failed">無法清除應用程式資料。</string> + <string name="clear_user_data_text">清除資料</string> + <string name="computing_size">正在計算應用程式大小\u2026</string> + <string name="connect">連線</string> + <string name="connect_to_blank">連線到 <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="contributors_title">代理商</string> + <string name="copyright_title">Copyright</string> + <string name="data_settings">資料設定</string> + <string name="data_settings_summary">SD 卡與電話儲存空間、資料同步</string> + <string name="data_settings_title">資料</string> + <string name="data_size_label">資料</string> + <string name="date_and_time">日期與時間設定</string> + <string name="date_and_time_settings_summary">設定日期、時間、時區與格式</string> + <string name="date_and_time_settings_title">日期與時間</string> + <string name="date_time_24hour">使用 24 小時格式</string> + <string name="date_time_auto">自動</string> + <string name="date_time_auto_summaryOff">使用網路提供的值</string> + <string name="date_time_auto_summaryOn">使用網路提供的值</string> + <string name="date_time_changeDate_text">變更日期</string> + <string name="date_time_changeTime_text">變更時間</string> + <string name="date_time_dateDisplay_text">1997 年 11 月 3 日</string> + <string name="date_time_date_format">選取日期格式</string> + <string name="date_time_set_date">設定日期</string> + <string name="date_time_set_time">設定時間</string> + <string name="date_time_set_timezone">設定時區</string> + <string name="date_time_setzone_text">變更時區</string> + <string name="date_time_timeDisplay_text">11:45 AM</string> + <string name="date_time_timezone_label">時區:</string> + <string name="debug_intent_sender_label">Debug intent sender</string> + <string name="default_date_format">yyyy/MM/dd</string> + <string name="default_keyboard_device_label">預設鍵盤裝置</string> + <string name="development_settings_summary">應用程式開發設定</string> + <string name="development_settings_title">開發</string> + <string name="device_info_asleeptime">睡眠時間</string> + <string name="device_info_awaketime">喚醒時間</string> + <string name="device_info_default">無法辨識</string> + <string name="device_info_label">裝置資訊</string> + <string name="device_info_not_available">無法使用</string> + <string name="device_info_settings">電話狀態</string> + <string name="device_info_uptime">正常運作時間</string> + <string name="device_status">狀態</string> + <string name="device_status_summary">IMEI、電話號碼、訊號等</string> + <string name="dim_screen">畫面變暗</string> + <string name="disconnect_ums">與 USB 高容量儲存裝置中斷連線</string> + <string name="display_font_size_label">字型大小:</string> + <string name="display_label">顯示</string> + <string name="display_preview_label">預覽:</string> + <string name="display_settings">顯示設定</string> + <string name="dlg_cancel">取消</string> + <string name="dlg_ok">確定</string> + <string name="done">確定</string> + <string name="dtmf_tone_enable_summary_off">使用撥號鍵台時播放撥號音</string> + <string name="dtmf_tone_enable_summary_on">使用撥號鍵台時播放撥號音</string> + <string name="dtmf_tone_enable_title">可聽見的觸控撥號音</string> + <string name="enable_adb">USB 偵錯</string> + <string name="enable_adb_summary">連接 USB 時使用偵錯模式</string> + <string name="error_apn_empty">APN 不可以空白。</string> + <string name="error_connecting">無法連線到網路</string> + <string name="error_mcc_not3">MCC 欄位必須是 3 個數字。</string> + <string name="error_mnc_not23">MNC 欄位必須是 2 或 3 個數字。</string> + <string name="error_name_empty">名稱欄位不可以空白。</string> + <string name="error_saving">無法儲存網路</string> + <string name="error_scanning">無法掃描網路</string> + <string name="error_starting">無法啟動 Wi-Fi</string> + <string name="error_stopping">無法停止 Wi-Fi</string> + <string name="error_title">注意</string> + <string name="failed_to_connect">無法連線到 <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="failed_to_pair">無法與 <xliff:g id="device_name">%1$s</xliff:g> 配對</string> + <string name="favorites_label">我的最愛</string> + <string name="firmware_version">韌體版本</string> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">確定</string> + <string name="forget_network">忘記</string> + <string name="fragment_status_authenticating">驗證 <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_connected">已連線到 <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_connecting">正在連線到 <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_disconnected">已中斷連線</string> + <string name="fragment_status_disconnecting">正在與 <xliff:g id="network_name">%1$s</xliff:g> 中斷連線\u2026</string> + <string name="fragment_status_failed">失敗</string> + <string name="fragment_status_obtaining_ip">正在從 <xliff:g id="network_name">%1$s</xliff:g> 取得 IP 位址\u2026</string> + <string name="fragment_status_scanning">正在掃描\u2026</string> + <string name="gsm_version_baseband_label">Baseband 版本</string> + <string name="gsm_version_ril_impl_label">RIL Impl 版本</string> + <string name="install_all_warning">您的電話及個人資料極為容易遭受無法辨識之來源的應用程式 +攻擊。您在此同意,任何 +因為使用 +這些應用程式而可能導致的電話損壞或資料遺失皆完全由您自行負責。</string> + <string name="install_applications">無法辨識的來源</string> + <string name="install_unknown_applications">允許安裝非 Market 的應用程式</string> + <string name="intent_sender_account_label">帳號: </string> + <string name="intent_sender_action_label">動作:</string> + <string name="intent_sender_data_label">資料:</string> + <string name="intent_sender_resource_label">資源: </string> + <string name="intent_sender_sendbroadcast_text">傳送廣播</string> + <string name="intent_sender_startactivity_text">開始活動</string> + <string name="internal_memory">電話內建儲存空間</string> + <string name="ip_address">IP 位址</string> + <string name="kb_text">KB</string> + <string name="keep_screen_on">保持喚醒狀態</string> + <string name="keep_screen_on_summary">充電時畫面將不會進入睡眠模式</string> + <string name="kernel_version">Kernel 版本</string> + <string name="kernel_version_label">Linux Kernel 版本</string> + <string name="keyguard_label">鍵盤鎖</string> + <string name="keyguard_password_button_text">確定</string> + <string name="keyguard_password_confirm_new_label">確認新密碼:</string> + <string name="keyguard_password_mismatch_error_text">兩組密碼不相符。請再次輸入。</string> + <string name="keyguard_password_new_label">新密碼:</string> + <string name="keyguard_password_old_label">舊密碼:</string> + <string name="keyguard_password_old_password_error_text">輸入的舊密碼不正確。請再試一次。</string> + <string name="keyguard_pin_mod_text">變更 PIN 碼</string> + <string name="keyguard_pw_mod_text">選取鎖定模式</string> + <string name="keyguard_sim_pin_label">SIM 卡 PIN 碼</string> + <string name="language_category">語言設定</string> + <string name="language_picker_title">地區設定</string> + <string name="language_settings">文字</string> + <string name="language_settings_summary">選取文字自動修正選項</string> + <string name="large_font">大</string> + <string name="legal_information">法律資訊</string> + <string name="legal_information_summary">檢視條款與細則</string> + <string name="license_title">授權</string> + <string name="location_gps">啟用 GPS 衛星</string> + <string name="location_gps_disabled">定位到街道 (需要更多電池電量及更高衛星可見度)</string> + <string name="location_label">位置提供者:</string> + <string name="location_neighborhood_level">藉由 Wi-Fi 及/或行動電話網路判斷的位置</string> + <string name="location_network_based">使用無線網路</string> + <string name="location_networks_disabled">在應用程式中 (例如地圖) 使用無線網路檢視位置</string> + <string name="location_source">我的位置</string> + <string name="location_source_summary">選取判斷位置的來源</string> + <string name="location_status">狀態:</string> + <string name="location_street_level">精確定位到街道 (取消選取即可節省電池電量)</string> + <string name="location_title">我的位置來源</string> + <string name="lock_example_message">連接至少四個點。\n + \n當您準備繪製專屬的模式時,請選取「下一步」。 + </string> + <string name="lock_example_title">模式範例</string> + <string name="lock_settings_title">畫面解除鎖定模式</string> + <string name="lock_title">保護電話</string> + <string name="lockpattern_change_lock_pattern_label">變更解除鎖定模式</string> + <string name="lockpattern_confirm_button_text">確認</string> + <string name="lockpattern_continue_button_text">繼續</string> + <string name="lockpattern_need_to_confirm">再次繪製模式以便確定:</string> + <string name="lockpattern_need_to_unlock">確認儲存的模式:</string> + <string name="lockpattern_need_to_unlock_wrong">抱歉,再試一次:</string> + <string name="lockpattern_pattern_confirmed_header">新的解除鎖定模式:</string> + <string name="lockpattern_pattern_entered_header">已經記錄模式!</string> + <string name="lockpattern_recording_incorrect_too_short">請連接至少 <xliff:g id="number">%d</xliff:g> 個點。再試一次:</string> + <string name="lockpattern_recording_inprogress">完成後鬆開手指。</string> + <string name="lockpattern_recording_intro_footer">按下功能表開啟說明。</string> + <string name="lockpattern_recording_intro_header">繪製解除鎖定模式:</string> + <string name="lockpattern_restart_button_text">重新繪製</string> + <string name="lockpattern_retry_button_text">重試</string> + <string name="lockpattern_settings_change_lock_pattern">變更解除鎖定模式</string> + <string name="lockpattern_settings_choose_lock_pattern">設定解除鎖定模式</string> + <string name="lockpattern_settings_enable_summary">必須繪製模式以便解除鎖定畫面</string> + <string name="lockpattern_settings_enable_title">需要模式</string> + <string name="lockpattern_settings_enable_visible_pattern_title">使用可見模式</string> + <string name="lockpattern_settings_help_how_to_record">繪製解除鎖定模式的方式:</string> + <string name="lockpattern_settings_title">解除鎖定模式</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">請在 <xliff:g id="number">%d</xliff:g> 秒後再試一次。</string> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">過多不正確嘗試!</string> + <string name="manage_applications_title">管理應用程式</string> + <string name="manage_space_text">管理空間</string> + <string name="manageapplications_settings_title">管理應用程式</string> + <string name="mass_storage">用於 USB 儲存</string> + <string name="master_clear_button_text">重設電話</string> + <string name="master_clear_desc">此動作將會把電話重設為其初始的出廠狀態,並清除所有的資料及下載的應用程式!</string> + <string name="master_clear_failed">尚未執行重設;因為無法使用系統清除服務。</string> + <string name="master_clear_final_button_text">全部清除</string> + <string name="master_clear_final_desc">重設電話,並清除所有的資料及應用程式?此動作無法還原!</string> + <string name="master_clear_gesture_explanation">您必須繪製解除鎖定模式,以便確認重設電話。</string> + <string name="master_clear_gesture_prompt">請繪製解除鎖定模式:</string> + <string name="master_clear_summary">清除電話上的所有資料</string> + <string name="master_clear_title">出廠資料重設</string> + <string name="mb_text">MB</string> + <string name="media_volume_summary">設定音樂及影片音量</string> + <string name="media_volume_title">媒體音量</string> + <string name="medium_font">中</string> + <string name="memory_available">可用空間</string> + <string name="memory_size">總空間</string> + <string name="menu_cancel">放棄</string> + <string name="menu_delete">刪除 APN</string> + <string name="menu_new">新增 APN</string> + <string name="menu_save">儲存</string> + <string name="model_number">型號</string> + <string name="network_settings_summary">設定漫遊、網路及 APN 選項</string> + <string name="network_settings_title">行動電話網路</string> + <string name="networks">選取電信業者</string> + <string name="networks_title">網路設定</string> + <string name="next_button_label">下一步</string> + <string name="next_label">下一步</string> + <string name="notification_sound_dialog_title">選取通知響鈴音調</string> + <string name="notification_sound_summary">設定預設的通知響鈴音調</string> + <string name="notification_sound_title">通知響鈴音調</string> + <string name="permissions_label">權限</string> + <string name="phone_info_label">電話資訊</string> + <string name="phone_language">選取語言</string> + <string name="ping_test_label">執行 Ping 測試</string> + <string name="please_type_hex_key">WEP Hex 金鑰 (0-9、A-F)</string> + <string name="please_type_passphrase">無線網路密碼</string> + <string name="product_brand_label">產品品牌</string> + <string name="product_device_label">電話類型</string> + <string name="progress_scanning">正在掃描</string> + <string name="proxy_action_text">儲存</string> + <string name="proxy_clear_text">清除</string> + <string name="proxy_defaultView_text">還原預設值</string> + <string name="proxy_error">注意</string> + <string name="proxy_error_dismiss">確定</string> + <string name="proxy_error_empty_host_set_port">如果主機欄位保留空白,則連接埠欄位也必須保留空白。</string> + <string name="proxy_error_empty_port">您必須填入連接埠欄位。</string> + <string name="proxy_error_invalid_host">輸入的主機名稱無效。</string> + <string name="proxy_error_invalid_port">輸入的連接埠無效。</string> + <string name="proxy_hostname_label">主機名稱</string> + <string name="proxy_port_label">連接埠</string> + <string name="proxy_settings_label">Proxy 設定</string> + <string name="quick_launch_assign_application">指定應用程式</string> + <string name="quick_launch_clear_cancel_button">取消</string> + <string name="quick_launch_clear_dialog_message">將會清除 <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) 的捷徑。</string> + <string name="quick_launch_clear_dialog_title">清除</string> + <string name="quick_launch_clear_ok_button">確定</string> + <string name="quick_launch_display_mode_applications">應用程式</string> + <string name="quick_launch_display_mode_shortcuts">捷徑</string> + <string name="quick_launch_no_shortcut">無捷徑</string> + <string name="quick_launch_shortcut">搜尋 + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <string name="quick_launch_summary">設定鍵盤捷徑以便啟動應用程式</string> + <string name="quick_launch_title">快速啟動</string> + <string name="radioInfo_cid">CID</string> + <string name="radioInfo_data_connected">已連線</string> + <string name="radioInfo_data_connecting">正在連線</string> + <string name="radioInfo_data_disconnected">已中斷連線</string> + <string name="radioInfo_data_suspended">已擱置</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_display_bytes">位元組</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_packets">pkts</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_menu_disableData">停用資料連線</string> + <string name="radioInfo_menu_disableDataOnBoot">開機時停用資料</string> + <string name="radioInfo_menu_enableData">啟用資料連線</string> + <string name="radioInfo_menu_enableDataOnBoot">開機時啟用資料</string> + <string name="radioInfo_menu_getPDP">取得 PDP 清單</string> + <string name="radioInfo_menu_viewADN">檢視 SIM 卡通訊錄</string> + <string name="radioInfo_menu_viewFDN">檢視固定撥號號碼</string> + <string name="radioInfo_menu_viewSDN">檢視服務撥號號碼</string> + <string name="radioInfo_phone_idle">閒置</string> + <string name="radioInfo_phone_offhook">通話中</string> + <string name="radioInfo_phone_ringing">響鈴中</string> + <string name="radioInfo_roaming_in">漫遊中</string> + <string name="radioInfo_roaming_not">尚未漫遊</string> + <string name="radioInfo_service_emergency">僅限緊急通話</string> + <string name="radioInfo_service_in">服務中</string> + <string name="radioInfo_service_off">關閉無線電話</string> + <string name="radioInfo_service_out">超出服務區域</string> + <string name="radioInfo_unknown">無法辨識</string> + <string name="radio_controls_summary">管理 Wi-Fi、藍牙、飛安模式及行動電話網路</string> + <string name="radio_controls_title">無線控制</string> + <string name="radio_info_band_mode_label">選取無線電波波段</string> + <string name="radio_info_call_redirect_label">撥號重新導向:</string> + <string name="radio_info_call_status_label">撥號狀態:</string> + <string name="radio_info_current_network_label">目前網路:</string> + <string name="radio_info_data_attempts_label">資料嘗試次數:</string> + <string name="radio_info_data_successes_label">資料成功次數:</string> + <string name="radio_info_gprs_service_label">GPRS 服務:</string> + <string name="radio_info_gsm_disconnects_label">與 GSM 中斷連線:</string> + <string name="radio_info_gsm_service_label">GSM 服務:</string> + <string name="radio_info_http_client_test">HTTP 用戶端測試:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_message_waiting_label">訊息等待中:</string> + <string name="radio_info_neighboring_location_label">鄰近 CID:</string> + <string name="radio_info_network_type_label">網路類型:</string> + <string name="radio_info_phone_number_label">電話號碼:</string> + <string name="radio_info_ping_hostname">Ping 主機名稱 (www.google.com):</string> + <string name="radio_info_ping_ipaddr">Ping IpAddr:</string> + <string name="radio_info_ppp_received_label">接收的 PPP:</string> + <string name="radio_info_ppp_resets_label">開機後重設 PPP 號碼:</string> + <string name="radio_info_ppp_sent_label">傳送的 PPP:</string> + <string name="radio_info_radio_resets_label">無線電話重設:</string> + <string name="radio_info_roaming_label">漫遊中:</string> + <string name="radio_info_set_perferred_label">設定偏好的網路類型:</string> + <string name="radio_info_signal_location_label">位置:</string> + <string name="radio_info_signal_strength_label">訊號強度:</string> + <string name="radio_info_smsc_label">SMSC:</string> + <string name="radio_info_smsc_refresh_label">重新整理</string> + <string name="radio_info_smsc_update_label">更新</string> + <string name="radio_info_toggle_ciph_label">切換密碼</string> + <string name="read_only">\u0020(唯讀)</string> + <string name="recompute_size">正在重新計算大小\u2026</string> + <string name="ring_volume_summary">設定來電音量</string> + <string name="ring_volume_title">響鈴音量</string> + <string name="ringer_volume_instructions">使用音量鍵調整響鈴音量</string> + <string name="ringer_volume_ringer_mode_label">響鈴模式</string> + <string name="ringer_volume_ringtone_label">響鈴音調</string> + <string name="ringer_volume_screen_increasing_text">鈴聲漸強</string> + <string name="ringtone_summary">設定預設的來電響鈴音調</string> + <string name="ringtone_title">電話響鈴音調</string> + <string name="roaming">資料漫遊</string> + <string name="roaming_disable">漫遊時連線到資料服務</string> + <string name="roaming_enable">漫遊時連線到資料服務</string> + <string name="roaming_reenable_message">您已經關閉主網路的資料漫遊功能,所以無法進行資料連線。</string> + <string name="roaming_reenable_title">注意</string> + <string name="roaming_turn_it_on_button">請將其開啟</string> + <string name="roaming_warning">允許資料漫遊?您可能需要支付一筆漫遊費用!</string> + <string name="scan_wifi">掃描</string> + <string name="screen_off_timeout_label">充電時永不逾時</string> + <string name="screen_timeout">畫面逾時</string> + <string name="sd_card_settings_label">SD 卡</string> + <string name="sd_eject">卸載/退出 SD 卡</string> + <string name="sd_memory">SD 卡</string> + <string name="sd_unavailable">不可用</string> + <string name="sdcard_changes_instructions">變更會在重新連接 USB 傳輸線時生效</string> + <string name="sdcard_removal_alert_ok">確定</string> + <string name="sdcard_removal_alert_scolding">SD 卡使用時被取出! + 若要避免毀損,請先使用 SD 卡的設定畫面來將其卸載,然後再取出。</string> + <string name="sdcard_removal_alert_title">不安全的 SD 卡取出動作!</string> + <string name="sdcard_setting">SD 卡</string> + <string name="sdcard_settings_available_bytes_label">可用的位元組:</string> + <string name="sdcard_settings_bad_removal_status">SD 卡使用時被取出!</string> + <string name="sdcard_settings_mass_storage_status">正在使用 SD 卡做為高容量儲存裝置</string> + <string name="sdcard_settings_not_present_status">無 SD 卡</string> + <string name="sdcard_settings_read_only_status">掛載的 SD 卡為唯讀</string> + <string name="sdcard_settings_scanning_status">正在掃描 SD 卡的媒體\u2026</string> + <string name="sdcard_settings_screen_mass_storage_text">啟用 USB 高容量儲存</string> + <string name="sdcard_settings_total_bytes_label">總位元組:</string> + <string name="sdcard_settings_unmounted_status">現在可以安全地移除 SD 卡</string> + <string name="sdcard_settings_used_bytes_label">使用的位元組:</string> + <string name="sdcard_unmount">卸載 SD 卡</string> + <string name="sdcard_unmountable_alert_ok">確定</string> + <string name="sdcard_unmountable_alert_title">無法讀取 SD 卡</string> + <string name="sdcard_unmountable_message">無法讀取 SD 卡。 + 檔案系統可能已經毀損或卡片可能受損。</string> + <string name="security">安全性</string> + <string name="security_and_data_label">安全性與資料</string> + <string name="security_passwords_title">密碼</string> + <string name="security_settings_desc">此應用程式可以存取之電話上的資料如下所示:</string> + <string name="security_settings_summary">我的位置、畫面解除鎖定、SIM 卡鎖定</string> + <string name="security_settings_title">安全性與位置</string> + <string name="select_your_language">選取您的語言</string> + <string name="set_lock_pattern_label">繪製解除鎖定模式:</string> + <string name="settings_chooser_pick_string"> + 設定的圖示應該移動到: + </string> + <string name="settings_label">設定</string> + <string name="settings_license_activity_loading">正在載入\u2026</string> + <string name="settings_license_activity_title">開啟來源授權</string> + <string name="settings_license_activity_unavailable">載入授權時發生問題。</string> + <string name="show_password">可見的密碼</string> + <string name="show_password_summary">輸入時顯示密碼</string> + <string name="signal">訊號強度</string> + <string name="silent_mode_summary">除了媒體以外的所有聲音都會變為靜音。</string> + <string name="silent_mode_title">靜音模式</string> + <string name="sim_bad_pin">PIN 碼不正確!</string> + <string name="sim_change_failed">無法變更 PIN 碼。\n可能是 PIN 碼不正確。</string> + <string name="sim_change_pin">變更 SIM 卡 PIN 碼</string> + <string name="sim_change_succeeded">變更 SIM 卡 PIN 碼成功</string> + <string name="sim_disable_sim_lock">停用 SIM 卡鎖定</string> + <string name="sim_enable_sim_lock">啟用 SIM 卡鎖定</string> + <string name="sim_enter_cancel">取消</string> + <string name="sim_enter_new">輸入新 PIN 碼</string> + <string name="sim_enter_ok">確定</string> + <string name="sim_enter_old">輸入舊 PIN 碼</string> + <string name="sim_enter_pin">輸入 SIM 卡 PIN 碼</string> + <string name="sim_lock_failed">無法變更 SIM 卡鎖定狀態。\n可能是 PIN 碼不正確。</string> + <string name="sim_lock_off">需要 PIN 碼才能使用電話</string> + <string name="sim_lock_on">需要 PIN 碼才能使用電話</string> + <string name="sim_lock_settings">SIM 卡鎖定設定</string> + <string name="sim_lock_settings_category">設定 SIM 卡鎖定</string> + <string name="sim_lock_settings_title">SIM 卡鎖定</string> + <string name="sim_pin_change">變更 PIN 碼</string> + <string name="sim_pin_toggle">鎖定 SIM 卡</string> + <string name="sim_pins_dont_match">PIN 碼不相符!</string> + <string name="sim_reenter_new">重新輸入新 PIN 碼</string> + <string name="skip_button_label">取消</string> + <string name="small_font">小</string> + <string name="software_version">軟體版本</string> + <string name="sort_order_alpha">依照字母順序排序</string> + <string name="sort_order_size">依照大小排序 (遞減)</string> + <string name="sound_and_display_settings">聲音與顯示</string> + <string name="sound_and_display_settings_summary">設定響鈴音調、通知、畫面亮度</string> + <string name="sound_effects_enable_summary_off">點選畫面選項時播放聲音</string> + <string name="sound_effects_enable_summary_on">點選畫面選項時播放聲音</string> + <string name="sound_effects_enable_title">聲音選取</string> + <string name="sound_settings">聲音設定</string> + <string name="status_authenticating">正在驗證\u2026</string> + <string name="status_awake_time">喚醒時間</string> + <string name="status_bt_address">藍牙位址</string> + <string name="status_connected">已連線</string> + <string name="status_connecting">正在連線\u2026</string> + <string name="status_data_state">資料存取</string> + <string name="status_disconnected">已中斷連線</string> + <string name="status_disconnecting">正在中斷連線\u2026</string> + <string name="status_failed">失敗</string> + <string name="status_imei">IMEI</string> + <string name="status_imei_sv">IMEI SV</string> + <string name="status_imsi">IMSI</string> + <string name="status_network_type">網路類型</string> + <string name="status_number">電話號碼</string> + <string name="status_obtaining_ip">正在取得位址\u2026</string> + <string name="status_operator">網路</string> + <string name="status_roaming">漫遊中</string> + <string name="status_scanning">正在掃描\u2026</string> + <string name="status_service_state">服務狀態</string> + <string name="status_signal_strength">訊號強度</string> + <string name="status_unavailable">不可用</string> + <string name="status_up_time">正常運作時間</string> + <string name="status_wifi_mac_address">Wi-Fi MAC 位址</string> + <string name="stay_on">充電時畫面永遠保持開啟</string> + <string name="storage_label">儲存空間</string> + <string name="storage_settings_summary">卸載 SD 卡,檢視可用的儲存空間</string> + <string name="storage_settings_title">SD 卡與電話儲存空間</string> + <string name="sum_carrier_select">選取網路電信業者</string> + <string name="summary_connection_failed">連線失敗,選取以便再試一次</string> + <string name="summary_not_in_range">超出範圍</string> + <string name="summary_remembered">已記住</string> + <string name="sync_automatically">自動同步</string> + <string name="sync_calendar">行事曆</string> + <string name="sync_contacts">連絡人</string> + <string name="sync_disabled">選取自動同步資料</string> + <string name="sync_do_nothing">目前不執行任何動作。</string> + <string name="sync_enabled">自動同步資料</string> + <string name="sync_gmail">Gmail</string> + <string name="sync_is_failing">同步目前發生問題。將會立即恢復正常。</string> + <string name="sync_menu_sync_cancel">取消同步</string> + <string name="sync_menu_sync_now">立即同步</string> + <string name="sync_really_delete">刪除項目。</string> + <string name="sync_settings">資料同步</string> + <string name="sync_settings_summary">選取要同步的應用程式</string> + <string name="sync_too_many_deletes">已經超過刪除上限</string> + <string name="sync_too_many_deletes_desc">%d 個 %s 刪除的項目,來自 %s 帳號。處理的方式為?</string> + <string name="sync_undo_deletes">復原刪除的項目。</string> + <string name="target_build_field_label">要求的建置類型</string> + <string name="team_title">團隊</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_mmsport_label">多媒體簡訊連接埠:</string> + <string name="telephony_mmsproxy_label">多媒體簡訊 Proxy:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_name_label">名稱:</string> + <string name="telephony_password_label">密碼:</string> + <string name="telephony_port_label">連接埠:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_server_label">伺服器:</string> + <string name="telephony_user_label">使用者:</string> + <string name="terms_title">條款和條件</string> + <string name="testing">正在測試</string> + <string name="testing_battery_info">電池資訊</string> + <string name="testing_phone_info">電話資訊</string> + <string name="testing_sim_toolkit">SIM Toolkit</string> + <string name="text_category">文字設定</string> + <string name="total_size_label">總計</string> + <string name="turn_off_qxdm">停用 QXDM SD 記錄</string> + <string name="turn_off_radio">關閉無線電話</string> + <string name="turn_on_qxdm">啟用 QXDM SD 記錄</string> + <string name="turn_on_radio">開啟無線電話</string> + <string name="underdeveloped_settings_label">開發中的設定</string> + <string name="uninstall_failed">無法解除安裝應用程式。</string> + <string name="uninstall_text">解除安裝</string> + <string name="unknown">無法辨識</string> + <string name="vibrate_summary">來電時震動電話</string> + <string name="vibrate_title">電話震動</string> + <string name="wallpaper_label">桌布</string> + <string name="wifi">Wi-Fi</string> + <string name="wifi_access_points">Wi-Fi 網路</string> + <string name="wifi_add_other_network">新增 Wi-Fi 網路</string> + <string name="wifi_context_menu_change_password">變更密碼</string> + <string name="wifi_context_menu_connect">連線到網路</string> + <string name="wifi_context_menu_forget">忽略網路</string> + <string name="wifi_dhcp_timeout_error">取得 IP 位址時發生問題。</string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_dns_label">DNS:</string> + <string name="wifi_error">錯誤</string> + <string name="wifi_gateway">閘道</string> + <string name="wifi_gateway_label">閘道:</string> + <string name="wifi_generic_connection_error">連線到網路時發生問題。請再試一次。</string> + <string name="wifi_host_ip">主機 IP:</string> + <string name="wifi_ip_address">IP 位址</string> + <string name="wifi_ip_settings_invalid_ip">請輸入有效的 IP 位址。</string> + <string name="wifi_ip_settings_menu_cancel">取消</string> + <string name="wifi_ip_settings_menu_save">儲存</string> + <string name="wifi_ip_settings_titlebar">IP 設定</string> + <string name="wifi_link_speed">速度</string> + <string name="wifi_menu_advanced">進階</string> + <string name="wifi_netmask">網路遮罩</string> + <string name="wifi_netmask_label">網路遮罩:</string> + <string name="wifi_notify_open_networks">網路通知</string> + <string name="wifi_notify_open_networks_summary">當找到可用的開放網路時通知我</string> + <string name="wifi_password_incorrect_error">輸入的網路密碼不正確。請再試一次。</string> + <string name="wifi_password_unchanged">(尚未變更)</string> + <string name="wifi_prefer_wifi">偏好 Wi-Fi</string> + <string name="wifi_quick_toggle_summary">選取啟動 Wi-Fi</string> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <string name="wifi_save_config">儲存</string> + <string name="wifi_screen_activate_text">啟動</string> + <string name="wifi_screen_dhcp_text">自動</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">手動</string> + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi 運作中</string> + <string name="wifi_screen_test_text">測試</string> + <string name="wifi_security">安全性</string> + <string name="wifi_security_open">開啟</string> + <string name="wifi_security_unknown">無法辨識</string> + <string name="wifi_security_verbose_open">開啟網路</string> + <string name="wifi_security_verbose_wep">已經受到 WEP 保護</string> + <string name="wifi_security_verbose_wpa">已經受到 WPA 保護</string> + <string name="wifi_security_verbose_wpa2">已經受到 WPA2 保護</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_settings">Wi-Fi 設定</string> + <string name="wifi_settings_category">Wi-Fi 設定</string> + <string name="wifi_settings_summary">設定與管理無線存取點</string> + <string name="wifi_show_password">顯示密碼。</string> + <string name="wifi_signal_0">弱</string> + <string name="wifi_signal_1">尚可</string> + <string name="wifi_signal_2">良好</string> + <string name="wifi_signal_3">強</string> + <string name="wifi_starting">正在啟動\u2026</string> + <string name="wifi_status">狀態</string> + <string name="wifi_stopping">正在關閉\u2026</string> + <string name="wifi_type_ssid">輸入網路 SSID:</string> + <string name="wifi_use_static_ip">使用靜態 IP</string> + <string name="wifi_wlan_id">WLAN ID:</string> +</resources> diff --git a/res/values/arrays.xml b/res/values/arrays.xml new file mode 100644 index 0000000..c571e28 --- /dev/null +++ b/res/values/arrays.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** +** Copyright 2007 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. +*/ +--> +<resources> + <!-- Choices for timezone picker first level. + These values will be used as search terms for TimeZone displayName + strings. --> + <string-array name="timezone_filters"> + <item>America</item> + <item>Europe</item> + <item>Africa</item> + <item>Asia</item> + <item>Australia</item> + <item>Pacific</item> + <item>All</item> + </string-array> + + <!-- List of formats for date display to display + in Date & Time Settings screen --> + <string-array name="date_format_values"> + <item>MM-dd-yyyy</item> + <item>dd-MM-yyyy</item> + <item>MMM dd, yyyy</item> + <item>dd-MMM-yyyy</item> + <item>yyyy-MM-dd</item> + </string-array> + + <!-- Display settings --> + <string-array name="screen_timeout_entries"> + <item>15 seconds</item> + <item>30 seconds</item> + <item>1 minute</item> + <item>2 minutes</item> + <item>10 minutes</item> + <item>Never timeout</item> + </string-array> + + <string-array name="screen_timeout_values"> + <item>15000</item> + <item>30000</item> + <item>60000</item> + <item>120000</item> + <item>600000</item> + <item>-1</item> + </string-array> + + <!-- Wi-Fi settings --> + + <!-- Match this with code. --> + <string-array name="wifi_security_entries"> + <item>Auto</item> + <item>None</item> + <item>WEP</item> + <item>WPA Personal</item> + <item>WPA2 Personal</item> + </string-array> + + <!-- Match this with code. --> + <string-array name="wifi_security_without_auto_entries"> + <item>None</item> + <item>WEP</item> + <item>WPA Personal</item> + <item>WPA2 Personal</item> + </string-array> + + <!-- Match this with code. --> + <string-array name="wifi_wep_type"> + <item>Auto</item> + <item>WEP ASCII</item> + <item>WEP hexadecimal</item> + </string-array> + + <string-array name="friction_values"> + <item>normal</item> + <item>no friction</item> + <item>no inertia</item> + </string-array> + +</resources> diff --git a/res/values/attrs.xml b/res/values/attrs.xml new file mode 100644 index 0000000..9bf79f9 --- /dev/null +++ b/res/values/attrs.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<resources> + <declare-styleable name="WifiEncryptionState"> + <attr name="state_encrypted" format="boolean" /> + </declare-styleable> +</resources> diff --git a/res/values/colors.xml b/res/values/colors.xml new file mode 100644 index 0000000..199b4b4 --- /dev/null +++ b/res/values/colors.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<resources> + <color name="black">#000</color> + <color name="white">#fff</color> + <color name="darker_gray">#aaa</color> + <color name="lighter_gray">#ddd</color> +</resources> + diff --git a/res/values/strings.xml b/res/values/strings.xml new file mode 100644 index 0000000..ed3eba3 --- /dev/null +++ b/res/values/strings.xml @@ -0,0 +1,1104 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Device Info --> + <string name="device_info_default">Unknown</string> + <string name="device_info_uptime">Uptime</string> + <string name="device_info_awaketime">Awake time</string> + <string name="device_info_asleeptime">Asleep time</string> + + <string name="build_description_label">Build description</string> + <string name="build_id_label">Build ID</string> + <string name="build_date_label">Build date</string> + <string name="build_type_label">Build type</string> + <string name="product_device_label">Phone type</string> + <string name="product_brand_label">Product brand</string> + <string name="build_user_label">Build user</string> + <string name="build_host_label">Build host</string> + <string name="kernel_version_label">Linux kernel version</string> + <string name="gsm_version_baseband_label">Baseband version</string> + <string name="gsm_version_ril_impl_label">RIL Impl version</string> + <string name="default_keyboard_device_label">Default keyboard device</string> + <string name="android_id_label">Android ID</string> + <string name="checkin_last_time_label">Last successful checkin</string> + <string name="checkin_failures_label">Failures since last success</string> + <string name="checkin_upgrade_label">Pending upgrade</string> + <string name="checkin_download_label">Download status</string> + <string name="checkin_time_never">(never)</string> + <string name="checkin_status_label">Check-in status</string> + <string name="target_build_field_label">Requested build type</string> + <string name="checkin_button_label">Check for upgrade</string> + <string name="checkin_started_message">Checkin started\u2026</string> + <string name="checkin_download_suspended">Suspended</string> + <string name="checkin_download_pending">Pending</string> + <string name="checkin_download_ongoing">Downloading</string> + <string name="checkin_download_failed">Unsuccessful</string> + <string name="checkin_download_succeeded">Completed</string> + <string name="checkin_download_unknown">Unknown status</string> + + <!-- Phone info --> + <string name="turn_on_radio">Turn on radio</string> + <string name="turn_off_radio">Turn off radio</string> + <string name="turn_on_qxdm">Enable QXDM SD log</string> + <string name="turn_off_qxdm">Disable QXDM SD log</string> + + <string name="radioInfo_menu_viewADN">View SIM address book</string> + <string name="radioInfo_menu_viewFDN">View Fixed Dialing Numbers</string> + <string name="radioInfo_menu_viewSDN">View Service Dialing Numbers</string> + <string name="radioInfo_menu_getPDP">Get PDP list</string> + <string name="radioInfo_menu_enableData">Enable data connection</string> + <string name="radioInfo_menu_disableData">Disable data connection</string> + <string name="radioInfo_menu_enableDataOnBoot">Enable data on boot</string> + <string name="radioInfo_menu_disableDataOnBoot">Disable data on boot</string> + + <string name="radioInfo_service_in">In service</string> + <string name="radioInfo_service_out">Out of service</string> + <string name="radioInfo_service_emergency">Emergency calls only</string> + <string name="radioInfo_service_off">Radio off</string> + + <string name="radioInfo_roaming_in">Roaming</string> + <string name="radioInfo_roaming_not">Not roaming</string> + + <string name="radioInfo_phone_idle">Idle</string> + <string name="radioInfo_phone_ringing">Ringing</string> + <string name="radioInfo_phone_offhook">Call in progress</string> + + <string name="radioInfo_data_disconnected">Disconnected</string> + <string name="radioInfo_data_connecting">Connecting</string> + <string name="radioInfo_data_connected">Connected</string> + <string name="radioInfo_data_suspended">Suspended</string> + + <string name="radioInfo_unknown">unknown</string> + <string name="radioInfo_display_packets">pkts</string> + <string name="radioInfo_display_bytes">bytes</string> + <string name="radioInfo_display_dbm">dBm</string> + <string name="radioInfo_display_asu">asu</string> + <string name="radioInfo_lac">LAC</string> + <string name="radioInfo_cid">CID</string> + + <string name="sdcard_unmount">Unmount SD card</string> + <string name="disconnect_ums">Disconnect USB mass storage</string> + + <!-- labels for the font size spinner --> + <string name="small_font">Small</string> + <string name="medium_font">Medium</string> + <string name="large_font">Large</string> + + <!-- label for font size preview --> + <string name="font_size_preview_text">Servez à ce monsieur une bière et des kiwis.</string> + <string name="font_size_save">OK</string> + + <!-- SD card setting --> + <string name="sdcard_setting">SD card</string> + + <!-- power management settings --> + <string name="screen_off_timeout_label">Never timeout while charging</string> + <string name="stay_on">Screen is always on while charging</string> + + <string name="app_launcher_newView_text">New AppLauncher</string> + <string name="battery_info_status_label">Battery status:</string> + <string name="battery_info_scale_label">Battery scale:</string> + <string name="battery_info_level_label">Battery level:</string> + <string name="battery_info_health_label">Battery health:</string> + <string name="battery_info_technology_label">Battery technology:</string> + <string name="battery_info_voltage_label">Battery voltage:</string> + <string name="battery_info_voltage_units">mV</string> + <string name="battery_info_temperature_label">Battery temperature:</string> + <string name="battery_info_temperature_units">\u00B0 C</string> + <string name="battery_info_uptime">Time since boot:</string> + <string name="battery_info_awake_battery">Awake time on battery:</string> + <string name="battery_info_awake_plugged">Awake time when charging:</string> + <string name="battery_info_screen_on">Screen ON time:</string> + + + <string name="battery_info_status_unknown">Unknown</string> + <string name="battery_info_status_charging">Charging</string> + <string name="battery_info_status_charging_ac">(AC)</string> + <string name="battery_info_status_charging_usb">(USB)</string> + <string name="battery_info_status_discharging">Discharging</string> + <string name="battery_info_status_not_charging">Not charging</string> + <string name="battery_info_status_full">Full</string> + + <string name="battery_info_health_unknown">Unknown</string> + <string name="battery_info_health_good">Good</string> + <string name="battery_info_health_overheat">Overheat</string> + <string name="battery_info_health_dead">Dead</string> + <string name="battery_info_health_over_voltage">Over voltage</string> + <string name="battery_info_health_unspecified_failure">Unknown error</string> + + <!--Used as option name on second screen after selecting Bluetooth settings --> + <string name="bluetooth">Bluetooth</string> + <!-- Summary text while Bluetooth is starting or stopping: --> + <string name="bluetooth_starting">Bluetooth starting\u2026</string> + <string name="bluetooth_stopping">Bluetooth stopping\u2026</string> + <string name="bluetooth_disabled">Select to turn on Bluetooth</string> + <string name="bluetooth_enabled">Select to turn on Bluetooth</string> + <string name="bluetooth_enabling">Turning on Bluetooth\u2026</string> + <!-- Bluetooth settings screen, check box label --> + <string name="bluetooth_visibility">Discoverable</string> + <!-- Bluetooth settings screen, summary after selecting Discoverable check box --> + <string name="bluetooth_is_discoverable">Discoverable for %1$s seconds\u2026</string> + <!-- Bluetooth settings screen, Discoverable summary text --> + <string name="bluetooth_not_discoverable">Select to make device discoverable</string> + <!-- Bluetooth settings screen, heading --> + <string name="bluetooth_devices">Bluetooth devices</string> + <!-- Bluetooth settings screen, heading --> + <string name="bluetooth_device_name">Device name</string> + <!-- Bluetooth settings screen, summary text --> + <string name="bluetooth_name_not_set">No name set, using account name</string> + <!-- Bluetooth settings screen, menu item --> + <string name="bluetooth_scan_for_devices">Scan for devices</string> + <!-- Bluetooth settings screen, menu item --> + <string name="bluetooth_clear_list">Clear device list</string> + <string name="bluetooth_disconnect_blank"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected</string> + <string name="bluetooth_connected">Connected</string> + <string name="bluetooth_connecting">Connecting\u2026</string> + <!--Bluetooth settings screen, summary text under individual Bluetooth devices when not paired yet --> + <string name="bluetooth_not_connected">Pair with this device</string> + <string name="bluetooth_failed_to_enable">Unable to turn on Bluetooth</string> + <!--Bluetooth settings screen, summary text under individual Bluetooth devices when pairing --> + <string name="bluetooth_pairing">Pairing\u2026</string> + <string name="failed_to_pair">Unable to pair with <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="failed_to_connect">Unable to connect to <xliff:g id="device_name">%1$s</xliff:g></string> + <string name="bluetooth_paired">Paired</string> + <string name="bluetooth_paired_not_nearby">Paired</string> + <string name="bluetooth_device">handsfree/headset</string> + <!-- Context menu items for bluetooth device entries --> + <string name="bluetooth_disconnect">Disconnect</string> + <string name="bluetooth_connect">Connect</string> + <string name="bluetooth_unpair">Unpair</string> + <string name="bluetooth_pair">Pair</string> + <!--Bluetooth settings screen, text that appears in heading bar when scanning for devices --> + <string name="progress_scanning">Scanning</string> + <string name="bluetooth_notif_ticker">Bluetooth pairing request</string> + <string name="bluetooth_notif_title">Bluetooth pairing request</string> + <string name="bluetooth_notif_message">Select to pair with\u0020</string> + + + <string name="bluetooth_scan_text">Empty button\u2026</string> + <string name="bluetooth_settings_text">Empty button\u2026</string> + <string name="bluetooth_enable_text">Empty button\u2026</string> + + <string name="bluetooth_device_info_connectButton_text"></string> + <string name="bluetooth_device_info_deviceInfo_text"></string> + + <string name="bluetooth_sdp_query_services_text"></string> + <!-- Date & time settings screen title --> + <string name="date_and_time">Date & time settings</string> + <string name="date_time_dateDisplay_text">Nov 3 1997</string> + <string name="date_time_timeDisplay_text">11:45 AM</string> + <string name="date_time_changeTime_text">Change time</string> + <string name="date_time_changeDate_text">Change date</string> + <string name="date_time_setzone_text">Change time zone</string> + <string name="date_time_timezone_label">Time zone:</string> + <string name="choose_timezone_region">Select region</string> + <!-- Date & time settings screen, setting option name --> + <string name="choose_timezone">Select time zone</string> + <string name="default_date_format">MM/dd/yyyy</string> + + <string name="display_preview_label">Preview:</string> + <string name="display_font_size_label">Font size:</string> + + <string name="intent_sender_data_label">Data:</string> + <string name="intent_sender_sendbroadcast_text">Send broadcast</string> + <string name="intent_sender_action_label">Action:</string> + <string name="intent_sender_startactivity_text">Start activity</string> + <string name="intent_sender_resource_label">Resource: </string> + <string name="intent_sender_account_label">Account: </string> + + <string name="keyguard_pw_mod_text">Select lock pattern</string> + <string name="keyguard_pin_mod_text">Change PIN</string> + <string name="keyguard_label">Keyguard</string> + <string name="keyguard_sim_pin_label">SIM PIN</string> + + <string name="keyguard_password_old_password_error_text">The old password you typed is not correct. Please try again.</string> + <string name="keyguard_password_button_text">OK</string> + <string name="keyguard_password_confirm_new_label">Confirm new password:</string> + <string name="keyguard_password_new_label">New password:</string> + <string name="keyguard_password_old_label">Old password:</string> + <string name="keyguard_password_mismatch_error_text">The two passwords don\'t match. Please type them again.</string> + + + <!-- HTTP proxy settings --> + <string name="proxy_clear_text">Clear</string> + <string name="proxy_port_label">Port</string> + <string name="proxy_defaultView_text">Restore defaults</string> + <string name="proxy_action_text">Save</string> + <string name="proxy_hostname_label">Hostname</string> + <string name="proxy_error">Attention</string> + <string name="proxy_error_dismiss">OK</string> + <string name="proxy_error_invalid_host">The hostname you typed is not valid.</string> + <string name="proxy_error_empty_port">You must complete the port field.</string> + <string name="proxy_error_empty_host_set_port">The port field must be empty if the host field is empty.</string> + <string name="proxy_error_invalid_port">The port you typed is not valid.</string> + + <string name="radio_info_signal_location_label">Location:</string> + <string name="radio_info_neighboring_location_label">Neighboring CID:</string> + <string name="radio_info_data_attempts_label">Data attempts:</string> + <string name="radio_info_imsi_label">IMSI:</string> + <string name="radio_info_gprs_service_label">GPRS service:</string> + <string name="radio_info_roaming_label">Roaming:</string> + <string name="radio_info_imei_label">IMEI:</string> + <string name="radio_info_call_redirect_label">Call redirect:</string> + <string name="radio_info_ppp_resets_label">Number of PPP reset since boot:</string> + <string name="radio_info_gsm_disconnects_label">GSM disconnects:</string> + <string name="radio_info_current_network_label">Current network:</string> + <string name="radio_info_data_successes_label">Data successes:</string> + <string name="radio_info_ppp_received_label">PPP received:</string> + <string name="radio_info_gsm_service_label">GSM service:</string> + <string name="radio_info_signal_strength_label">Signal strength:</string> + <string name="radio_info_call_status_label">Call status:</string> + <string name="radio_info_ppp_sent_label">PPP sent:</string> + <string name="radio_info_radio_resets_label">Radio resets:</string> + <string name="radio_info_message_waiting_label">Message waiting:</string> + <string name="radio_info_phone_number_label">Phone number:</string> + <string name="radio_info_band_mode_label">Select radio band</string> + <string name="radio_info_network_type_label">Network type:</string> + <string name="radio_info_set_perferred_label">Set preferred network type:</string> + <string name="radio_info_ping_ipaddr">Ping IpAddr:</string> + <string name="radio_info_ping_hostname">Ping Hostname(www.google.com):</string> + <string name="radio_info_http_client_test">HTTP Client test:</string> + <string name="radio_info_toggle_ciph_label">Toggle ciphering</string> + <string name="ping_test_label">Run ping test</string> + <string name="radio_info_smsc_label">SMSC:</string> + <string name="radio_info_smsc_update_label">Update</string> + <string name="radio_info_smsc_refresh_label">Refresh</string> + + <!-- Band Mode Selection --> + <string name="band_mode_title">Set GSM/UMTS band</string> + <string name="band_mode_loading">Loading band list\u2026</string> + <string name="band_mode_set">Set</string> + <string name="band_mode_failed">Unsuccessful</string> + <string name="band_mode_succeeded">Successful</string> + + + <string name="ringer_volume_ringer_mode_label">Ringer mode</string> + <string name="ringer_volume_screen_increasing_text">Increasing ring</string> + <string name="ringer_volume_ringtone_label">Ringtone</string> + <string name="ringer_volume_instructions">Use volume buttons to adjust ringer volume</string> + + <string name="sdcard_changes_instructions">Changes take effect when USB cable is reconnected</string> + <string name="sdcard_settings_screen_mass_storage_text">Enable USB mass storage</string> + <string name="sdcard_settings_total_bytes_label">Total bytes:</string> + <string name="sdcard_settings_not_present_status">No SD card</string> + <string name="sdcard_settings_available_bytes_label">Available bytes:</string> + <string name="sdcard_settings_mass_storage_status">SD card is being used as a mass storage device</string> + <string name="sdcard_settings_unmounted_status">It is now safe to remove the SD card</string> + <string name="sdcard_settings_bad_removal_status">SD card was removed while still in use!</string> + <string name="sdcard_settings_used_bytes_label">Used bytes:</string> + <string name="sdcard_settings_scanning_status">Scanning SD card for media\u2026</string> + <string name="sdcard_settings_read_only_status">SD card mounted read-only</string> + + <string name="sdcard_removal_alert_title">Unsafe SD card removal!</string> + <string name="sdcard_removal_alert_scolding">The SD card was removed while still in use! + To avoid card corruption, use the SD card Settings screen to unmount the card before removal.</string> + <string name="sdcard_removal_alert_ok">OK</string> + + <string name="sdcard_unmountable_alert_title">SD card unreadable</string> + <string name="sdcard_unmountable_message">The SD card could not be read. + The file system may be corrupted or the card may be defective.</string> + <string name="sdcard_unmountable_alert_ok">OK</string> + + <string name="telephony_user_label">User:</string> + <string name="telephony_server_label">Server:</string> + <string name="telephony_name_label">Name:</string> + <string name="telephony_mmsc_label">MMSC:</string> + <string name="telephony_apn_label">APN:</string> + <string name="telephony_mcc_label">MCC:</string> + <string name="telephony_port_label">Port:</string> + <string name="telephony_password_label">Password:</string> + <string name="telephony_proxy_label">Proxy:</string> + <string name="telephony_mnc_label">MNC:</string> + <string name="telephony_mmsproxy_label">MMS proxy:</string> + <string name="telephony_mmsport_label">MMS port:</string> + + <string name="wifi_screen_netmask_text">255.255.255.0</string> + <string name="wifi_screen_status_text">Wi-Fi is working</string> + <string name="wifi_screen_dns_text">209.81.59.2</string> + <string name="wifi_screen_gateway_text">192.168.20.1</string> + <string name="wifi_screen_test_text">Test</string> + <string name="wifi_gateway_label">gateway:</string> + <string name="wifi_netmask_label">netmask:</string> + <string name="wifi_screen_dhcp_text">automatic</string> + <string name="wifi_host_ip">host ip:</string> + <string name="wifi_screen_activate_text">Activate</string> + <string name="wifi_wlan_id">wlan id:</string> + <string name="wifi_screen_ip_text">192.168.20.10</string> + <string name="wifi_screen_manual_text">manual</string> + <string name="wifi_dns_label">dns:</string> + + + <!-- SetupWizard strings used by DateTimeSettingsSetupWizard --> + <string name="next_label">Next</string> + + <!-- LocalePicker --> + <string name="language_picker_title">Locale</string> + <string name="select_your_language">Select your language</string> + + <!-- TODO: 881807 --> + <!-- Settings chooser --> + <string name="settings_chooser_pick_string"> + Settings icon should forward to: + </string> + + <string name="wallpaper_label">Wallpaper</string> + <string name="activity_picker_label">Select activity</string> + <string name="underdeveloped_settings_label">Underdeveloped settings</string> + <string name="debug_intent_sender_label">Debug intent sender</string> + <string name="device_info_label">Device info</string> + <string name="battery_info_label">Battery info</string> + <string name="display_label">Display</string> + <string name="phone_info_label">Phone info</string> + <string name="sd_card_settings_label">SD card</string> + <string name="favorites_label">Favorites</string> + <string name="apn_label">APN</string> + <string name="proxy_settings_label">Proxy settings</string> + + <!-- ======================================================================================= --> + <!-- NEW STUFF --> + <!-- ======================================================================================= --> + + <!-- Widgets --> + <string name="done">OK</string> + <string name="cancel">Cancel</string> + + <!-- Main Settings screen title --> + <string name="settings_label">Settings</string> + <string name="basic_settings_title">Phone basics</string> + <!-- Wireless controls settings screen, setting check box label --> + <string name="airplane_mode">Airplane mode</string> + <!-- Wireless controls settings screen, setting option summary text --> + <string name="airplane_mode_summary">Select to disable all wireless connections</string> + <!-- Wireless controls settings screen, setting option summary text as check box is selected --> + <string name="airplane_mode_turning_on">Disabling wireless connections\u2026</string> + <!-- Wireless controls settings screen, setting option summary text as check box is cleared --> + <string name="airplane_mode_turning_off">Enabling wireless connections\u2026</string> + <!-- Main Settings screen settings title --> + <string name="radio_controls_title">Wireless controls</string> + <!-- Main Settings screen settings summary text --> + <string name="radio_controls_summary">Manage Wi-Fi, Bluetooth, airplane mode, & mobile networks</string> + <string name="networks_title">Network settings</string> + + <!-- mobile network settings screen, setting check box title --> + <string name="roaming">Data roaming</string> + <!-- mobile network settings screen, setting option summary text when check box is selected --> + <string name="roaming_enable">Connect to data services when roaming</string> + <!-- mobile network settings screen, setting option summary text when check box is clear --> + <string name="roaming_disable">Connect to data services when roaming</string> + <!-- mobile network settings screen, dialog message when you are roaming and clear the "Data roaming" check box --> + <string name="roaming_reenable_message">You have lost data connectivity because you left your home network with data roaming turned off.</string> + <!-- mobile network settings screen, button on dialog box that appears when you are roaming and clear the "Data roaming" check box --> + <string name="roaming_turn_it_on_button">Turn it on</string> + <!-- mobile network settings screen, message in dialog box that appears when you select the "Data roaming" check box --> + <string name="roaming_warning">Allow data roaming? You may incur significant roaming charges!</string> + <!-- mobile network settings screen, title of dialog box that appears when you select the "Data roaming" check box --> + <string name="roaming_reenable_title">Attention</string> + <!-- mobile network settings screen, setting option name --> + <string name="networks">Operator selection</string> + <!-- mobile network settings screen, setting option summary text --> + <string name="sum_carrier_select">Select a network operator</string> + + <!-- Date and time settings --> + <!-- Main Settings screen setting option name --> + <string name="date_and_time_settings_title">Date & time</string> + <!-- Main Settings screen setting option summary text --> + <string name="date_and_time_settings_summary">Set date, time, time zone & formats</string> + <!-- Date & time setting screen setting check box title --> + <string name="date_time_auto">Automatic</string> + <!-- Date & time setting screen setting option summary text when Automatic check box is selected --> + <string name="date_time_auto_summaryOn">Use network-provided values</string> + <!-- Date & time setting screen setting option summary text when Automatic check box is clear --> + <string name="date_time_auto_summaryOff">Use network-provided values</string> + <!-- Date & time setting screen setting check box title --> + <string name="date_time_24hour">Use 24-hour format</string> + <!-- Date & time setting screen setting option name --> + <string name="date_time_set_time">Set time</string> + <!-- Date & time setting screen setting option name --> + <string name="date_time_set_timezone">Set time zone</string> + <!-- Date & time setting screen setting option name --> + <string name="date_time_set_date">Set date</string> + <!-- Date & time setting screen setting option name --> + <string name="date_time_date_format">Select date format</string> + <!-- Menu item on Select time zone screen --> + <string name="zone_list_menu_sort_alphabetically">Sort alphabetically</string> + <!-- Menu item on Select time zone screen --> + <string name="zone_list_menu_sort_by_timezone">Sort by time zone</string> + + <!-- Security and data settings --> + <string name="security_and_data_label">Security & data</string> + <!-- Main Settings screen setting option name --> + <string name="security_settings_title">Security & location</string> + <!-- Main Settings screen setting option summary text --> + <string name="security_settings_summary">My Location, screen unlock, SIM card lock</string> + <string name="data_settings">Data settings</string> + <string name="data_settings_title">Data</string> + <string name="data_settings_summary">SD card & phone storage, data sync</string> + <string name="security_passwords_title">Passwords</string> + + <!-- Bluetooth settings --> + <!-- Bluetooth settings check box title on Main Settings screen; probably unused now --> + <string name="bluetooth_quick_toggle_title">Bluetooth</string> + <string name="bluetooth_quick_toggle_summary">Select to turn on Bluetooth</string> + <!--Used as title on second screen after selecting Bluetooth settings --> + <string name="bluetooth_settings">Bluetooth settings</string> + <!--Wireless controls screen, settings title --> + <string name="bluetooth_settings_title">Bluetooth settings</string> + <!--Wireless controls screen, settings summary --> + <string name="bluetooth_settings_summary">Manage connections, set device name & discoverability</string> + + <string name="bluetooth_pin_entry">Bluetooth PIN entry</string> + <string name="bluetooth_device_info">Bluetooth device info</string> + + <string name="bluetooth_pairing_msg">Pairing\u2026</string> + <string name="bluetooth_enter_pin_msg">Type PIN for\u0020</string> + + <string name="bluetooth_new_data">Type new data</string> + <string name="bluetooth_new_data_confirm">OK</string> + <string name="bluetooth_new_data_cancel">Cancel</string> + + <string name="bluetooth_scan_for_new_devices">Scanning for new devices\u2026</string> + + <string name="bluetooth_device_info_alias">Device alias</string> + <string name="bluetooth_device_info_no_alias">Type alias here\u2026</string> + <string name="bluetooth_device_info_delete">Remove this device</string> + <string name="bluetooth_device_info_sdp">List supported services</string> + + <string name="bluetooth_discoverability_panel_title">Make me\u2026</string> + <string name="bluetooth_discoverable">Discoverable for %1$s seconds</string> + <string name="bluetooth_connectable">Connectable only</string> + <string name="bluetooth_neither">Neither discoverable nor connectable</string> + <string name="bluetooth_unknown">Unknown</string> + + <!-- Wi-Fi settings --> + <!-- Used in the 2nd-level settings screen to turn on Wi-Fi --> + <string name="wifi">Wi-Fi</string> + <!-- Used in the 1st-level settings screen to turn on Wi-Fi --> + <string name="wifi_quick_toggle_title">Wi-Fi</string> + <!-- Used in the 1st-level settings screen as the turn-on summary --> + <string name="wifi_quick_toggle_summary">Select to turn on Wi-Fi</string> + <!-- Used in the 1st-level settings screen to go to the 2nd-level settings screen --> + <string name="wifi_settings">Wi-Fi settings</string> + <string name="wifi_settings_category">Wi-Fi settings</string> + <!--Wireless controls setting screen, Wi-Fi settings summary text --> + <string name="wifi_settings_summary">Set up & manage wireless access points</string> + <string name="forget_network">Forget</string> + <string name="wifi_status">Status</string> + <string name="wifi_link_speed">Speed</string> + <string name="wifi_signal_3">Excellent</string> + <string name="wifi_signal_2">Good</string> + <string name="wifi_signal_1">Fair</string> + <string name="wifi_signal_0">Poor</string> + <string name="security">Security</string> + <string name="wifi_security_open">Open</string> + <string name="wifi_security_wep">WEP</string> + <string name="wifi_security_wpa">WPA</string> + <string name="wifi_security_wpa2">WPA2</string> + <string name="wifi_security_unknown">Unknown</string> + <string name="wifi_security_verbose_open">Open network</string> + <string name="wifi_security_verbose_wep">Secured with WEP</string> + <string name="wifi_security_verbose_wpa">Secured with WPA</string> + <string name="wifi_security_verbose_wpa2">Secured with WPA2</string> + <string name="ip_address">IP address</string> + <string name="signal">Signal strength</string> + <!--Wireless controls setting screen, Wi-Fi check box summary text when turning Wi-Fi on --> + <string name="wifi_starting">Turning on\u2026</string> + <!--Wireless controls setting screen, Wi-Fi check box summary text when turning Wi-Fi off --> + <string name="wifi_stopping">Turning off\u2026</string> + <string name="wifi_error">Error</string> + <string name="error_starting">Unable to start Wi-Fi</string> + <string name="error_stopping">Unable to stop Wi-Fi</string> + <string name="error_scanning">Unable to scan for networks</string> + <string name="error_connecting">Unable to connect to the network</string> + <string name="error_saving">Unable to save the network</string> + <string name="connect">Connect</string> + <string name="connect_to_blank">Connect to <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="please_type_passphrase">Wireless password</string> + <!--Wi-Fi settings screen, connect to network dialog box, field label and hint text --> + <string name="please_type_hex_key">WEP hex key (0-9, A-F)</string> + <!--Wi-Fi settings screen, connect to network dialog box, check box label --> + <string name="wifi_show_password">Show password.</string> + <!--Wi-Fi settings screen menu option --> + <string name="scan_wifi">Scan</string> + <string name="summary_not_in_range">Not in range</string> + <string name="summary_remembered">Remembered</string> + <string name="summary_connection_failed">Connection unsuccessful, select to try again</string> + <string name="wifi_prefer_wifi">Prefer Wi-Fi</string> + <string name="wifi_access_points">Wi-Fi networks</string> + <string name="wifi_type_ssid">Type the network SSID:</string> + <string name="wifi_security">Security</string> + <string name="wifi_save_config">Save</string> + <string name="wifi_password_unchanged">(unchanged)</string> + <string name="wifi_add_other_network">Add a Wi-Fi network</string> + <string name="wifi_notify_open_networks">Network notification</string> + <string name="wifi_notify_open_networks_summary">Notify me when an open network is available</string> + <!-- This dialog will use the error_title as the title. --> + <string name="wifi_dhcp_timeout_error">There is a problem obtaining an IP address.</string> + <!-- This dialog will use the error_title as the title. --> + <string name="wifi_password_incorrect_error">The network password you typed is not correct. Please try again.</string> + <string name="wifi_generic_connection_error">There is a problem connecting to the network. Please try again.</string> + <!--Wi-Fi settings screen menu option --> + <string name="wifi_menu_advanced">Advanced</string> + <string name="wifi_ip_settings_titlebar">IP settings</string> + <string name="wifi_ip_settings_menu_save">Save</string> + <string name="wifi_ip_settings_menu_cancel">Cancel</string> + <string name="wifi_ip_settings_invalid_ip">Please type a valid IP address.</string> + <string name="wifi_use_static_ip">Use static IP</string> + <string name="wifi_ip_address">IP address</string> + <string name="wifi_dns1">DNS 1</string> + <string name="wifi_dns2">DNS 2</string> + <string name="wifi_dns3">DNS 3</string> + <string name="wifi_gateway">Gateway</string> + <string name="wifi_netmask">Netmask</string> + <!--Wi-Fi settings screen, network context menu item --> + <string name="wifi_context_menu_connect">Connect to network</string> + <!--Wi-Fi settings screen, network context menu item --> + <string name="wifi_context_menu_forget">Forget network</string> + <!--Wi-Fi settings screen, network context menu item --> + <string name="wifi_context_menu_change_password">Change password</string> + + <!-- These fragment_status_* will have the network name substituted in --> + <string name="fragment_status_scanning">Scanning\u2026</string> + <string name="fragment_status_connecting">Connecting to <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_authenticating">Authenticating with <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_obtaining_ip">Obtaining IP address from <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_connected">Connected to <xliff:g id="network_name">%1$s</xliff:g></string> + <string name="fragment_status_disconnecting">Disconnecting from <xliff:g id="network_name">%1$s</xliff:g>\u2026</string> + <string name="fragment_status_disconnected">Disconnected</string> + <string name="fragment_status_failed">Unsuccessful</string> + <!-- These status_* will only be the status --> + <string name="status_scanning">Scanning\u2026</string> + <string name="status_connecting">Connecting\u2026</string> + <string name="status_authenticating">Authenticating\u2026</string> + <!--Wi-Fi settings screen, summary text for network when connecting --> + <string name="status_obtaining_ip">Obtaining address\u2026</string> + <!--Wi-Fi settings screen, summary text for network when connected --> + <string name="status_connected">Connected</string> + <string name="status_disconnecting">Disconnecting\u2026</string> + <string name="status_disconnected">Disconnected</string> + <string name="status_failed">Unsuccessful</string> + + <!-- Sound and alerts settings --> + <!-- Main Settings screen setting option name --> + <string name="sound_and_display_settings">Sound & display</string> + <!-- Sound settings screen heading --> + <string name="sound_settings">Sound settings</string> + <!-- Main Settings screen setting option summary text --> + <string name="sound_and_display_settings_summary">Set ringtones, notifications, screen brightness</string> + <!-- Sound settings screen, setting option name --> + <string name="silent_mode_title">Silent mode</string> + <!-- Sound settings screen, setting option summary text --> + <string name="silent_mode_summary">All sounds except media are silenced</string> + <!-- Sound settings screen, setting option name --> + <string name="ringtone_title">Phone ringtone</string> + <!-- Sound settings screen, setting option summary text --> + <string name="ringtone_summary">Set your default incoming call ringtone</string> + <!-- Sound settings screen, setting option name --> + <string name="ring_volume_title">Ringer volume</string> + <!-- Sound settings screen, setting option summary text --> + <string name="ring_volume_summary">Set volume for incoming calls</string> + <!-- Sound settings screen, setting option name --> + <string name="vibrate_title">Phone vibrate</string> + <!-- Sound settings screen, setting option summary text --> + <string name="vibrate_summary">Vibrate phone for incoming calls</string> + <!-- Sound settings screen, setting option name --> + <string name="notification_sound_title">Notification ringtone</string> + <!-- Sound settings screen, setting option summary text --> + <string name="notification_sound_summary">Set your default notification ringtone</string> + <!-- Sound settings screen, unused --> + <string name="notification_sound_dialog_title">Select notification ringtone</string> + <!-- Sound settings screen, setting option name --> + <string name="media_volume_title">Media volume</string> + <!-- Sound settings screen, setting option summary text --> + <string name="media_volume_summary">Set volume for music and videos</string> + <!-- Sound settings screen, setting check box label --> + <string name="dtmf_tone_enable_title">Audible touch tones</string> + <!-- Sound settings screen, setting option summary text when check box is selected --> + <string name="dtmf_tone_enable_summary_on">Play tones when using dial pad</string> + <!-- Sound settings screen, setting option summary text when check box is clear --> + <string name="dtmf_tone_enable_summary_off">Play tones when using dial pad</string> + <!-- Sound settings screen, setting check box label --> + <string name="sound_effects_enable_title">Audible selection</string> + <!-- Sound settings screen, setting option summary text when check box is selected --> + <string name="sound_effects_enable_summary_on">Play sound when making screen selection</string> + <!-- Sound settings screen, setting option summary text when check box is clear --> + <string name="sound_effects_enable_summary_off">Play sound when making screen selection</string> + + <!-- Sync settings --> + <!-- Main Settings screen setting option name --> + <string name="sync_settings">Data synchronization</string> + <!-- Main Settings screen setting option summary text --> + <string name="sync_settings_summary">Select which applications are synchronized</string> + <string name="sync_too_many_deletes">Delete limit exceeded</string> + <!-- Data synchronization settings screen, setting option name --> + <string name="sync_automatically">Auto-sync</string> + <!-- Data synchronization settings screen, setting option summary text when check box is selected --> + <string name="sync_enabled">Automatically sync data</string> + <!-- Data synchronization settings screen, setting option summary text when check box is clear --> + <string name="sync_disabled">Select to automatically sync data</string> + <!-- Data synchronization settings screen, menu option --> + <string name="sync_menu_sync_now">Sync now</string> + <!-- Data synchronization settings screen, menu option --> + <string name="sync_menu_sync_cancel">Cancel sync</string> + <!-- Data synchronization settings screen, setting option name --> + <string name="sync_gmail">Gmail</string> + <!-- Data synchronization settings screen, setting option name --> + <string name="sync_calendar">Calendar</string> + <!-- Data synchronization settings screen, setting option name --> + <string name="sync_contacts">Contacts</string> + <string name="sync_too_many_deletes_desc">There are %d deleted items for %s, account %s. What would you like to do?</string> + <string name="sync_really_delete">Delete the items.</string> + <string name="sync_undo_deletes">Undo the deletes.</string> + <string name="sync_do_nothing">Do nothing for now.</string> + <string name="sync_is_failing">Sync is currently experiencing problems. It will be back shortly.</string> + + <!-- Display settings --> + <!-- Sound & display settings screen, section header --> + <string name="display_settings">Display settings</string> + <!-- Sound & display settings screen, setting option name --> + <string name="brightness">Brightness</string> + <string name="autorotate">Auto-rotate</string> + <string name="autorotate_summary_on">Changing screen orientation rotates application</string> + <string name="autorotate_summary_off">Changing screen orientation does not rotate application</string> + <!-- Sound & display settings screen, setting option name --> + <string name="screen_timeout">Screen timeout</string> + <string name="dim_screen">Dim screen</string> + + <!-- SIM lock settings --> + <string name="sim_lock_settings">SIM card lock settings</string> + <!-- Security & location settings screen, setting option name --> + <string name="sim_lock_settings_category">Set up SIM card lock</string> + <!-- Security & location settings screen, section heading --> + <string name="sim_lock_settings_title">SIM card lock</string> + <!-- SIM card lock settings screen, setting check box label & resulting dialog box title --> + <string name="sim_pin_toggle">Lock SIM card</string> + <!-- SIM card lock settings screen, setting option summary text when check box is selected --> + <string name="sim_lock_on">Require PIN to use phone</string> + <!-- SIM card lock settings screen, setting option summary text when check box is clear --> + <string name="sim_lock_off">Require PIN to use phone</string> + <!-- SIM card lock settings screen, setting option name --> + <string name="sim_pin_change">Change PIN code</string> + <!-- SIM card lock settings screen, SIM PIN dialog title --> + <string name="sim_enter_pin">Type SIM PIN</string> + <!-- SIM card lock settings screen, SIM PIN dialog title --> + <string name="sim_enable_sim_lock">Enable SIM card lock</string> + <!-- SIM card lock settings screen, SIM PIN dialog title --> + <string name="sim_disable_sim_lock">Disable SIM card lock</string> + <!-- SIM card lock settings screen, SIM PIN dialog message instruction --> + <string name="sim_enter_old">Type old PIN</string> + <!-- SIM card lock settings screen, SIM PIN dialog message instruction --> + <string name="sim_enter_new">Type new PIN</string> + <!-- SIM card lock settings screen, SIM PIN dialog message instruction --> + <string name="sim_reenter_new">Re-type new PIN</string> + <string name="sim_change_pin">Change SIM PIN</string> + <string name="sim_bad_pin">Incorrect PIN!</string> + <string name="sim_pins_dont_match">PINs don\'t match!</string> + <!-- SIM card lock settings screen, toast after not entering correct SIM PIN --> + <string name="sim_change_failed">Unable to change PIN.\nPossibly incorrect PIN.</string> + <string name="sim_change_succeeded">SIM PIN changed successfully</string> + <!-- SIM card lock settings screen, toast after not entering correct SIM PIN --> + <string name="sim_lock_failed">Unable to change SIM card lock state.\nPossibly incorrect PIN.</string> + <!-- SIM card lock settings screen, SIM PIN dialog button labels: --> + <string name="sim_enter_ok">OK</string> + <string name="sim_enter_cancel">Cancel</string> + + <!-- Device info settings --> + <string name="device_info_settings">Phone status</string> + + <string name="software_version">Software version</string> + <!-- About phone screen, setting option name --> + <string name="firmware_version">Firmware version</string> + <!-- About phone screen, setting option name --> + <string name="model_number">Model number</string> + <!-- About phone screen, setting option name --> + <string name="baseband_version">Baseband version</string> + <string name="bootloader_version">Boot loader version</string> + <!-- About phone screen, setting option name --> + <string name="kernel_version">Kernel version</string> + <!-- About phone screen, setting option name --> + <string name="build_number">Build number</string> + + <string name="device_info_not_available">Not available</string> + <!-- About phone screen, setting option name --> + <string name="device_status">Status</string> + <!-- About phone screen, setting option summary text --> + <string name="device_status_summary">IMEI, phone number, signal, etc.</string> + <string name="storage_settings_title">SD card & phone storage</string> + <string name="storage_settings_summary">Unmount SD card, view available storage</string> + <!-- About phone, Status screen option title --> + <string name="status_imei">IMEI</string> + <!-- About phone, Status screen option title --> + <string name="status_imei_sv">IMEI SV</string> + <!-- About phone, Status screen option title --> + <string name="status_imsi">IMSI</string> + <!-- About phone, Status screen option title --> + <string name="status_number">Phone number</string> + <!-- About phone, Status screen option title --> + <string name="status_network_type">Network type</string> + <!-- About phone, Status screen option title --> + <string name="status_data_state">Data access</string> + <!-- About phone, Status screen option title --> + <string name="status_service_state">Service state</string> + <!-- About phone, Status screen option title --> + <string name="status_signal_strength">Signal strength</string> + <string name="status_roaming">Roaming</string> + <!-- About phone, Status screen option title --> + <string name="status_operator">Network</string> + <string name="status_wifi_mac_address">Wi-Fi MAC address</string> + <!-- About phone, Status screen option title --> + <string name="status_bt_address">Bluetooth address</string> + <!-- About phone, Status screen option summary text --> + <string name="status_unavailable">Unavailable</string> + <!-- About phone, Status screen option title --> + <string name="status_up_time">Up time</string> + <!-- About phone, Status screen option title --> + <string name="status_awake_time">Awake time</string> + <!-- SD card & phone storage settings screen heading --> + <string name="internal_memory">Internal phone storage</string> + <!-- SD card & phone storage settings screen heading --> + <string name="sd_memory">SD card</string> + <!-- SD card & phone storage settings title --> + <string name="memory_available">Available space</string> + <!-- SD card & phone storage settings screen heading --> + <string name="memory_size">Total space</string> + <!-- SD card & phone storage settings screen heading --> + <string name="sd_eject">Unmount/eject SD card</string> + <string name="sd_unavailable">Unavailable</string> + <string name="read_only">\u0020(Read-only)</string> + <string name="mass_storage">Use for USB storage</string> + <!-- Phone info screen, section titles: --> + <string name="battery_status_title">Battery status</string> + <string name="battery_level_title">Battery level</string> + + <!-- APN Settings --> + <!-- APN settings screen title --> + <string name="apn_settings">APNs</string> + <!-- Screen title after user selects APNs setting option --> + <string name="apn_edit">Edit access point</string> + <!-- Edit access point label summary text when no value has been set --> + <string name="apn_not_set"><Not set></string> + <!-- Edit access point labels: --> + <string name="apn_name">Name</string> + <string name="apn_apn">APN</string> + <string name="apn_http_proxy">Proxy</string> + <string name="apn_http_port">Port</string> + <string name="apn_user">Username</string> + <string name="apn_password">Password</string> + <string name="apn_server">Server</string> + <string name="apn_mmsc">MMSC</string> + <string name="apn_mms_proxy">MMS proxy</string> + <string name="apn_mms_port">MMS port</string> + <string name="apn_mcc">MCC</string> + <string name="apn_mnc">MNC</string> + <string name="apn_type">APN type</string> + <!-- Edit access point screen menu option --> + <string name="menu_delete">Delete APN</string> + <!-- APNs screen menu option --> + <string name="menu_new">New APN</string> + <!-- Edit access point screen menu option --> + <string name="menu_save">Save</string> + <!-- Edit access point screen menu option --> + <string name="menu_cancel">Discard</string> + <!-- APN error dialog title --> + <string name="error_title">Attention</string> + <!-- APN error dialog messages: --> + <string name="error_name_empty">The Name field cannot be empty.</string> + <string name="error_apn_empty">The APN cannot be empty.</string> + <string name="error_mcc_not3">MCC field must be 3 digits.</string> + <string name="error_mnc_not23">MNC field must be 2 or 3 digits.</string> + + <!-- Master Clear --> + <!-- SD card & phone storage settings screen, setting option name under Internal phone storage heading. Also screen title after user selects this setting --> + <string name="master_clear_title">Factory data reset</string> + <!-- SD card & phone storage settings screen, setting option summary text under Internal phone storage heading --> + <string name="master_clear_summary">Erases all data on phone</string> + <!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset --> + <string name="master_clear_desc">This action will reset the phone to its initial factory state, erasing all data and downloaded applications!</string> + <!-- SD card & phone storage settings screen, button on screen after user selects Factory data reset --> + <string name="master_clear_button_text">Reset phone</string> + <!-- SD card & phone storage settings screen, message on screen after user selects Reset phone button --> + <string name="master_clear_final_desc">Reset phone, erasing all your data and applications? Action cannot be reversed!</string> + <!-- SD card & phone storage settings screen, button on screen after user selects Reset phone button --> + <string name="master_clear_final_button_text">Erase everything</string> + <string name="master_clear_gesture_prompt">Please draw your unlock pattern:</string> + <string name="master_clear_gesture_explanation">You must draw your unlock pattern to confirm a phone reset.</string> + <string name="master_clear_failed">No reset was performed because the System Clear service is not available.</string> + + <!-- Main settings screen, Call settings title --> + <string name="call_settings_title">Call settings</string> + <!-- Main settings screen, Call settings message --> + <string name="call_settings_summary">Set up voicemail, call forwarding, call waiting, caller ID</string> + + <!-- Network settings --> + <string name="network_settings_title">Mobile networks</string> + <string name="network_settings_summary">Set options for roaming, networks, APNs</string> + + <!-- Location Source Settings --> + <string name="location_source">My Location</string> + <string name="location_source_summary">Select sources for determining location</string> + <!-- Security & location settings screen, section header --> + <string name="location_title">My Location sources</string> + <!-- Security & location settings screen, setting check box label --> + <string name="location_network_based">Use wireless networks</string> + <!-- Security & location settings screen, setting summary when Use wireless networks check box is clear --> + <string name="location_networks_disabled">See location in applications (such as Maps) using wireless networks</string> + <!-- Security & location settings screen, setting summary when Use wireless networks check box is selected --> + <string name="location_neighborhood_level">Location determined by Wi-Fi and/or mobile networks</string> + <!-- Security & location settings screen, setting check box label --> + <string name="location_gps">Enable GPS satellites</string> + <!-- Security & location settings screen, setting summary when Enable GPS satellites check box is selected --> + <string name="location_street_level">When locating, accurate to street level (deselect to conserve battery)</string> + <!-- Security & location settings screen, setting summary when Enable GPS satellites check box is clear --> + <string name="location_gps_disabled">Locate to street-level (requires more battery plus view of sky)</string> + <string name="location_label">Location provider:</string> + <string name="location_status">Status:</string> + + <!-- About --> + <!-- Main settings screen, setting option name --> + <string name="about_settings">About phone</string> + <!-- Main settings screen, setting summary --> + <string name="about_settings_summary">View legal info, phone status, software version</string> + <!-- About phone settings screen, setting option name --> + <string name="legal_information">Legal information</string> + <string name="legal_information_summary">View terms & conditions</string> + <!-- About phone settings screen, setting option name --> + <string name="contributors_title">Contributors</string> + <string name="team_title">Team</string> + <!-- Note: this may be replaced by a more-specific title of the activity that will get launched --> + <string name="copyright_title">Copyright</string> + <!-- Note: this may be replaced by a more-specific title of the activity that will get launched --> + <string name="license_title">License</string> + <!-- Note: this may be replaced by a more-specific title of the activity that will get launched --> + <string name="terms_title">Terms and conditions</string> + + <!-- Title for actual Settings license activity. --> + <!-- About phone settings, Legal information setting option name and title of dialog box holding license info --> + <string name="settings_license_activity_title">Open source licenses</string> + <!-- About phone settings screen, Open source license dialog message when licenses cannot be loaded --> + <string name="settings_license_activity_unavailable">There is a problem loading the licenses.</string> + <!-- About phone settings screen, Open source license dialog title until license is fully loaded --> + <string name="settings_license_activity_loading">Loading\u2026</string> + + <!-- Lock Pattern settings --> + <!-- Security & location settings screen, header --> + <string name="lock_settings_title">Screen unlock pattern</string> + <!-- Security & location settings screen, setting option name --> + <string name="lockpattern_change_lock_pattern_label">Change unlock pattern</string> + <!-- Security & location settings screen, change unlock pattern screen instruction --> + <string name="lockpattern_need_to_unlock">Confirm saved pattern:</string> + <string name="lockpattern_need_to_unlock_footer"></string> + <!-- Security & location settings screen, change unlock pattern screen instruction if user draws incorrect pattern --> + <string name="lockpattern_need_to_unlock_wrong">Sorry, try again:</string> + <string name="lockpattern_need_to_unlock_wrong_footer"></string> + <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen --> + <string name="lockpattern_recording_intro_header">Draw an unlock pattern:</string> + <!-- Security & location settings screen, change unlock pattern screen hint on bottom of screen --> + <string name="lockpattern_recording_intro_footer">Press Menu for help.</string> + <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen while drawing pattern --> + <string name="lockpattern_recording_inprogress">Release finger when done.</string> + <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen if user doesn't connect enough dots --> + <string name="lockpattern_recording_incorrect_too_short">Connect at least <xliff:g id="number">%d</xliff:g> dots. Try again:</string> + <!-- Security & location settings screen, change unlock pattern screen message on top of screen after drawing pattern --> + <string name="lockpattern_pattern_entered_header">Pattern recorded!</string> + <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen to confirm pattern --> + <string name="lockpattern_need_to_confirm">Draw pattern again to confirm:</string> + <string name="lockpattern_pattern_confirmed_header">Your new unlock pattern:</string> + <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen --> + <string name="lockpattern_confirm_button_text">Confirm</string> + <string name="lockpattern_restart_button_text">Redraw</string> + <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen --> + <string name="lockpattern_retry_button_text">Retry</string> + <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen --> + <string name="lockpattern_continue_button_text">Continue</string> + <string name="lockpattern_settings_title">Unlock pattern</string> + <!-- Security & location settings screen, setting check box title --> + <string name="lockpattern_settings_enable_title">Require pattern</string> + <!-- Security & location settings screen, setting summary --> + <string name="lockpattern_settings_enable_summary">Must draw pattern to unlock screen</string> + <!-- Security & location settings screen, setting check box title --> + <string name="lockpattern_settings_enable_visible_pattern_title">Use visible pattern</string> + <!-- Security & location settings screen, setting option name when user has never set an unlock pattern --> + <string name="lockpattern_settings_choose_lock_pattern">Set unlock pattern</string> + <!-- Security & location settings screen, setting option name when user has previously set an unlock pattern --> + <string name="lockpattern_settings_change_lock_pattern">Change unlock pattern</string> + <string name="lockpattern_settings_help_how_to_record">How to draw an unlock pattern:</string> + <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen after too many incorrect attempts --> + <string name="lockpattern_too_many_failed_confirmation_attempts_header">Too many incorrect attempts!</string> + <!-- Security & location settings screen, change unlock pattern screen countdown hint on bottom of screen after too many incorrect attempts --> + <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Try again in <xliff:g id="number">%d</xliff:g> seconds.</string> + + <!-- ChooseLockPatternTutorial --> + <!-- ChooseLockPatternTutorial, button labels: --> + <string name="skip_button_label">Cancel</string> + <string name="next_button_label">Next</string> + <!-- ChooseLockPatternTutorial, tutorial screen title --> + <string name="lock_title">Securing your phone</string> + <!-- ChooseLockPatternTutorial, tutorial screen text --> + <string name="lock_intro_message"><font size="17">Protect your phone from unauthorized use by creating a personal screen unlock pattern. + \n<font height="17">\n</font><b>1</b>\u00A0 On the next screen, watch while an example pattern is drawn. + \n<font height="17">\n</font><b>2</b>\u00A0 When ready, draw your own personal unlock pattern. Experiment with different patterns but connect at least four dots. + \n<font height="17">\n</font><b>3</b>\u00A0 Redraw your pattern to confirm. + \n<font height="17">\n</font><b>Ready to start? Select \u201CNext\u201D</b>. + \n<font height="3">\n</font>To leave your phone unprotected, select \u201CCancel\u201D.</font> + </string> + + <!-- ChooseLockPatternExample --> + <!-- ChooseLockPatternExample, screen title --> + <string name="lock_example_title">Example pattern</string> + <!-- ChooseLockPatternExample, screen hint text at bottom of screen. --> + <string name="lock_example_message">Connect at least four dots.\n + \nSelect \u201CNext\u201D when you\u2019re ready to draw your own pattern. + </string> + <!-- ChooseLockPatternExample, screen instruction text at top of screen. --> + <string name="set_lock_pattern_label">Draw your unlock pattern:</string> + + <!-- Applications Settings --> + <!-- Applications settings screen, setting option name --> + <string name="manageapplications_settings_title">Manage applications</string> + <!-- Applications settings title, on main settings screen --> + <string name="applications_settings">Applications</string> + <!-- Applications settings summary, on main settings screen --> + <string name="applications_settings_summary">Manage applications, set up quick launch shortcuts</string> + <!-- Applications settings screen heading--> + <string name="applications_settings_header">Application settings</string> + <!-- Applications settings screen, setting check box title --> + <string name="install_applications">Unknown sources</string> + <!-- Applications settings screen, setting check box summary --> + <string name="install_unknown_applications">Allow install of non-Market applications</string> + <!-- Applications settings screen, message text of alert that appears if user selects the "Unknown applications" check box --> + <string name="install_all_warning">Your phone and personal data are more vulnerable to attack by applications + from unknown sources. You agree that you are solely responsible for any + damage to your phone or loss of data that may result from using + these applications.</string> + <!-- Manage applications settings screen, screen title --> + <string name="manage_applications_title">Manage applications</string> + <!-- Manage applications, individual application info screen title --> + <string name="application_info_label">Application info</string> + <!-- Manage applications, individual application info heading --> + <string name="storage_label">Storage</string> + <!-- Manage applications, individual application info heading --> + <string name="auto_launch_label">Launch by default</string> + <!-- Manage applications, individual application info heading --> + <string name="permissions_label">Permissions</string> + <!-- Manage applications, individual application info label under Storage heading--> + <string name="total_size_label">Total</string> + <!-- Manage applications, individual application info label under Storage heading--> + <string name="application_size_label">Application</string> + <!-- Manage applications, individual application info label under Storage heading--> + <string name="data_size_label">Data</string> + <!-- Manage applications, individual application button label under Storage heading--> + <string name="uninstall_text">Uninstall</string> + <!-- Manage applications, individual application button label under Storage heading--> + <string name="clear_user_data_text">Clear data</string> + <!-- Manage applications, individual application screen, text under Launch by default heading --> + <string name="auto_launch_enable_text">You have selected to launch this application by default for some actions.</string> + <!-- Manage applications, individual application screen, text under Launch by default heading --> + <string name="auto_launch_disable_text">No defaults set.</string> + <!-- Manage applications, individual application button label under Launch by default heading--> + <string name="clear_activities">Clear defaults</string> + <!-- Unknown context --> + <string name="unknown">Unknown</string> + <!-- Manage applications screen, menu item --> + <string name="sort_order_alpha">Sort alphabetically</string> + <!-- Manage applications screen, menu item --> + <string name="sort_order_size">Sort by size (descending)</string> + <string name="manage_space_text">Manage space</string> + <string name="computing_size">Computing application sizes\u2026</string> + <string name="recompute_size">Recomputing size\u2026</string> + <!-- Manage applications, individual application confirmation dialog title. Displays when user selects to "Clear data". --> + <string name="clear_data_dlg_title">Delete</string> + <!-- Manage applications, individual application confirmation dialog message. Displays when user selects to "Clear data". --> + <string name="clear_data_dlg_text">All information you\'ve saved in this application will be deleted permanently.</string> + <!-- Manage applications, individual application confirmation dialog button. Displays when user selects to "Clear data". --> + <string name="dlg_ok">OK</string> + <!-- Manage applications, individual application confirmation dialog button. Displays when user selects to "Clear data". --> + <string name="dlg_cancel">Cancel</string> + <!-- Manage applications, individual application dialog box title. --> + <string name="app_not_found_dlg_title">Application not found</string> + <!-- Manage applications, individual application dialog box message. --> + <string name="app_not_found_dlg_text"> The application was not +found in the list of installed applications.</string> + <string name="uninstall_failed">Unable to uninstall application.</string> + <string name="clear_data_failed">Unable to clear application data.</string> + <string name="b_text">B</string> + <string name="kb_text">KB</string> + <string name="mb_text">MB</string> + <!-- Manage applications, individual application info screen, text that appears under the "Permissions" heading. --> + <string name="security_settings_desc">Here\'s what this application can access on your phone:</string> + + <!-- Language Settings --> + <!-- Title of setting on main settings screen --> + <string name="language_settings">Text</string> + <!-- Summary of setting on main settings screen --> + <string name="language_settings_summary">Select text auto-correction options</string> + <!-- On Text & language settings screen, heading --> + <string name="language_category">Language setting</string> + <!-- On Text & language settings screen, heading --> + <string name="text_category">Text settings</string> + <!-- On Text & language settings screen, setting option name --> + <string name="phone_language">Select language</string> + <!-- On Text & language settings screen, setting option name --> + <string name="auto_replace">Auto-replace</string> + <!-- On Text & language settings screen, setting summary --> + <string name="auto_replace_summary">Correct mistyped words</string> + <!-- On Text & language settings screen, setting option name --> + <string name="auto_caps">Auto-cap</string> + <!-- On Text & language settings screen, setting summary --> + <string name="auto_caps_summary">Capitalize first letter in sentences</string> + <!-- On Text & language settings screen, setting option name --> + <string name="auto_punctuate">Auto-punctuate</string> + <!-- On Text & language settings screen, setting summary --> + <string name="auto_punctuate_summary">Press Space key twice to insert \u0022.\u0022</string> + <!-- On Security & location settings screen, setting check box name --> + <string name="show_password">Visible passwords</string> + <!-- On Security & location settings screen, setting check box summary --> + <string name="show_password_summary">Show password as you type</string> + + <!-- Testing --> + <string name="testing">Testing</string> + <string name="testing_phone_info">Phone information</string> + <string name="testing_battery_info">Battery information</string> + <string name="testing_sim_toolkit">SIM toolkit</string> + + <!-- Quick launch settings --> + <string name="quick_launch_title">Quick launch</string> + <string name="quick_launch_summary">Set keyboard shortcuts to launch applications</string> + <!-- On the Quick launch settings screen, title for letters that are not assigned. --> + <string name="quick_launch_assign_application">Assign application</string> + <!-- On the Quick launch settings screen, summary text for letters that are not assigned. --> + <string name="quick_launch_no_shortcut">No shortcut</string> + <!-- On the Quick launch settings screen, summary text under each assigned letter. --> + <string name="quick_launch_shortcut">Search + <xliff:g id="shortcut_letter">%1$s</xliff:g></string> + <!-- On the Quick launch settings screen, title of "Clear shortcut" confirmation dialog. --> + <string name="quick_launch_clear_dialog_title">Clear</string> + <!-- On the Quick launch settings screen, message in the "Clear shortcut" confirmation dialog. --> + <string name="quick_launch_clear_dialog_message">Your shortcut for <xliff:g id="shortcut_letter">%1$s</xliff:g> (<xliff:g id="application_name">%2$s</xliff:g>) will be cleared.</string> + <!-- Clear dialog box button labels: --> + <string name="quick_launch_clear_ok_button">OK</string> + <string name="quick_launch_clear_cancel_button">Cancel</string> + <string name="quick_launch_display_mode_applications">Applications</string> + <string name="quick_launch_display_mode_shortcuts">Shortcuts</string> + + <!-- Development Settings --> + <string name="development_settings_title">Development</string> + <string name="development_settings_summary">Settings for application development</string> + <string name="enable_adb">USB debugging</string> + <string name="enable_adb_summary">Debug mode when USB is connected</string> + <string name="keep_screen_on">Stay awake</string> + <string name="keep_screen_on_summary">Screen will never sleep while charging</string> + +</resources> diff --git a/res/values/styles.xml b/res/values/styles.xml new file mode 100644 index 0000000..88a991f --- /dev/null +++ b/res/values/styles.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/Preferences/assets/res/any/styles.xml +** +** Copyright 2006, 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. +*/ +--> +<resources> + + <style name="info_label"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:textAppearance">@style/TextAppearance.info_label</item> + <item name="android:paddingRight">4dip</item> + </style> + + <style name="info_value"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:textAppearance">@style/TextAppearance.info_value</item> + </style> + + <style name="info_small"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:textAppearance">@style/TextAppearance.info_small</item> + </style> + + <style name="info_layout"> + <item name="android:orientation">vertical</item> + <item name="android:paddingLeft">10dip</item> + <item name="android:paddingTop">10dip</item> + <item name="android:paddingRight">10dip</item> + <item name="android:paddingBottom">10dip</item> + <item name="android:layout_width">fill_parent</item> + <item name="android:layout_height">fill_parent</item> + </style> + + <style name="entry_layout"> + <item name="android:orientation">horizontal</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + </style> + + <style name="form_label"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">fill_parent</item> + <item name="android:textAppearance">@style/TextAppearance.form_label</item> + </style> + + <style name="form_value"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">fill_parent</item> + </style> + + <style name="form_layout"> + <item name="android:orientation">vertical</item> + <item name="android:paddingLeft">10dip</item> + <item name="android:paddingTop">0dip</item> + <item name="android:paddingRight">10dip</item> + <item name="android:paddingBottom">0dip</item> + <item name="android:layout_width">fill_parent</item> + <item name="android:layout_height">fill_parent</item> + </style> + + + + <style name="TextAppearance" parent="android:TextAppearance"> + </style> + + <style name="TextAppearance.info_label"> + <item name="android:textSize">14sp</item> + <item name="android:textStyle">bold</item> + </style> + + <style name="TextAppearance.form_label"> + <item name="android:textStyle">bold</item> + </style> + + <style name="TextAppearance.info_small"> + <item name="android:textSize">12sp</item> + <item name="android:textStyle">normal</item> + </style> + + <style name="TextAppearance.info_value"> + <item name="android:textSize">14sp</item> + <item name="android:textStyle">normal</item> + </style> + <style name="SubCategoryHeader"> + <item name="android:background">@*android:drawable/title_bar</item> + <item name="android:singleLine">true</item> + <item name="android:textAppearance">@style/android:TextAppearance.WindowTitle</item> + <item name="android:shadowColor">#BB000000</item> + <item name="android:shadowRadius">2.75</item> + <item name="android:paddingBottom">3dip</item> + <item name="android:paddingTop">3dip</item> + <item name="android:paddingLeft">4dip</item> + </style> + +</resources> diff --git a/res/xml/apn_editor.xml b/res/xml/apn_editor.xml new file mode 100644 index 0000000..1ba01c5 --- /dev/null +++ b/res/xml/apn_editor.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + <PreferenceCategory android:title="@string/apn_edit"/> + <EditTextPreference + android:title="@string/apn_name" + android:dialogTitle="@string/apn_name" + android:key="apn_name" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_apn" + android:dialogTitle="@string/apn_apn" + android:key="apn_apn" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_http_proxy" + android:dialogTitle="@string/apn_http_proxy" + android:key="apn_http_proxy" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_http_port" + android:dialogTitle="@string/apn_http_port" + android:key="apn_http_port" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_user" + android:dialogTitle="@string/apn_user" + android:key="apn_user" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_password" + android:dialogTitle="@string/apn_password" + android:key="apn_password" + android:singleLine="true" + android:password="true" + /> + <EditTextPreference + android:title="@string/apn_server" + android:dialogTitle="@string/apn_server" + android:key="apn_server" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_mmsc" + android:dialogTitle="@string/apn_mmsc" + android:key="apn_mmsc" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_mms_proxy" + android:dialogTitle="@string/apn_mms_proxy" + android:key="apn_mms_proxy" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_mms_port" + android:dialogTitle="@string/apn_mms_port" + android:key="apn_mms_port" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_mcc" + android:dialogTitle="@string/apn_mcc" + android:key="apn_mcc" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_mnc" + android:dialogTitle="@string/apn_mnc" + android:key="apn_mnc" + android:singleLine="true" + /> + <EditTextPreference + android:title="@string/apn_type" + android:dialogTitle="@string/apn_type" + android:key="apn_type" + android:singleLine="true" + /> +</PreferenceScreen> diff --git a/res/xml/apn_settings.xml b/res/xml/apn_settings.xml new file mode 100644 index 0000000..abf268b --- /dev/null +++ b/res/xml/apn_settings.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + <PreferenceCategory android:title="@string/apn_settings" android:key="apn_list"/> +</PreferenceScreen> diff --git a/res/xml/application_settings.xml b/res/xml/application_settings.xml new file mode 100644 index 0000000..832adb2 --- /dev/null +++ b/res/xml/application_settings.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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/applications_settings" + android:summary="@string/applications_settings_summary" + android:key="applications_settings"> + + <PreferenceCategory + android:title="@string/applications_settings_header"/> + + <CheckBoxPreference + android:key="toggle_install_applications" + android:title="@string/install_applications" + android:summaryOff="@string/install_unknown_applications" + android:summaryOn="@string/install_unknown_applications" + android:persistent="false" /> + + <PreferenceScreen + android:title="@string/quick_launch_title" + android:summary="@string/quick_launch_summary"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.quicklaunch.QuickLaunchSettings" /> + </PreferenceScreen> + + <PreferenceScreen + android:title="@string/manage_applications_title"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.ManageApplications" /> + </PreferenceScreen> + + <PreferenceScreen + android:title="@string/development_settings_title" + android:summary="@string/development_settings_summary"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.DevelopmentSettings" /> + </PreferenceScreen> + +</PreferenceScreen> + diff --git a/res/xml/bluetooth_settings.xml b/res/xml/bluetooth_settings.xml new file mode 100644 index 0000000..83fb142 --- /dev/null +++ b/res/xml/bluetooth_settings.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/bluetooth_settings"/> + + <CheckBoxPreference android:key="bt_checkbox" + android:title="@string/bluetooth" + android:summaryOff="@string/bluetooth_disabled" + android:summaryOn="@string/bluetooth_enabled" + /> + + <CheckBoxPreference android:key="bt_visibility" + android:title="@string/bluetooth_visibility" + android:dependency="bt_checkbox" + android:summaryOn="@string/bluetooth_is_discoverable" + android:summaryOff="@string/bluetooth_not_discoverable" + android:persistent="false" + /> + + <EditTextPreference android:key="bt_name" + android:title="@string/bluetooth_device_name" + android:summary="@string/bluetooth_name_not_set" + android:dialogTitle="@string/bluetooth_device_name" + android:dependency="bt_checkbox" + android:singleLine="true"/> + <com.android.settings.ProgressCategory + android:key="bt_device_list" + android:title="@string/bluetooth_devices" + android:dependency="bt_checkbox"/> +</PreferenceScreen> diff --git a/res/xml/date_time_prefs.xml b/res/xml/date_time_prefs.xml new file mode 100644 index 0000000..641030f --- /dev/null +++ b/res/xml/date_time_prefs.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + <PreferenceCategory android:title="@string/date_and_time"/> + <CheckBoxPreference android:key="auto_time" + android:title="@string/date_time_auto" + android:summaryOn="@string/date_time_auto_summaryOn" + android:summaryOff="@string/date_time_auto_summaryOff" + /> + <Preference android:key="date" + android:title="@string/date_time_set_date" + android:summary="03/10/2008" + /> + <PreferenceScreen android:key="timezone" + android:title="@string/date_time_set_timezone" + android:summary="GMT-8:00" + /> + <Preference android:key="time" + android:title="@string/date_time_set_time" + android:summary="12:00am" + /> + <CheckBoxPreference android:key="24 hour" + android:title="@string/date_time_24hour" + android:summaryOn="13:00" + android:summaryOff="1:00 pm"/> + <ListPreference + android:key="date_format" + android:title="@string/date_time_date_format" + android:summary="mm/dd/yyyy"/> +</PreferenceScreen> diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml new file mode 100644 index 0000000..c64f07a --- /dev/null +++ b/res/xml/development_prefs.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/development_settings_title"/> + + <CheckBoxPreference + android:key="enable_adb" + android:title="@string/enable_adb" + android:summary="@string/enable_adb_summary"/> + + <CheckBoxPreference + android:key="keep_screen_on" + android:title="@string/keep_screen_on" + android:summary="@string/keep_screen_on_summary"/> + +</PreferenceScreen> diff --git a/res/xml/device_info_memory.xml b/res/xml/device_info_memory.xml new file mode 100644 index 0000000..0d90b95 --- /dev/null +++ b/res/xml/device_info_memory.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory android:title="@string/sd_memory"> + <Preference android:key="memory_sd_size" + style="?android:attr/preferenceInformationStyle" + android:title="@string/memory_size" + android:summary="00"/> + <Preference android:key="memory_sd_avail" + style="?android:attr/preferenceInformationStyle" + android:title="@string/memory_available" + android:summary="00"/> + <Preference android:key="memory_sd_unmount" + android:title="@string/sd_eject"/> + </PreferenceCategory> + + <PreferenceCategory android:title="@string/internal_memory"> + <Preference android:key="memory_internal_avail" + style="?android:attr/preferenceInformationStyle" + android:title="@string/memory_available" + android:summary="00"/> + <PreferenceScreen + android:title="@string/master_clear_title" + android:summary="@string/master_clear_summary"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.MasterClear" /> + </PreferenceScreen> + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml new file mode 100644 index 0000000..c39d51e --- /dev/null +++ b/res/xml/device_info_settings.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + <PreferenceCategory android:title="@string/about_settings"> + + <!-- Device status - launches activity --> + <PreferenceScreen android:key="status_info" + android:title="@string/device_status" + android:summary="@string/device_status_summary"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.deviceinfo.Status" /> + </PreferenceScreen> + + <!-- Legal Information --> + <PreferenceScreen + android:key="container" + android:title="@string/legal_information"> + + <!-- Title for this other screen --> + <PreferenceCategory android:title="@string/legal_information" /> + + <!-- Note: The titles given here probably won't be used. Instead, we programmatically + fill the title with the label of the activity with the corresponding action. + If there is not an activity for an action, the item will be removed from the + list. --> + + <!-- Copyright information --> + <PreferenceScreen + android:key="copyright" + android:title="@string/copyright_title"> + <intent android:action="android.settings.COPYRIGHT" /> + </PreferenceScreen> + + <!-- License information --> + <PreferenceScreen + android:key="license" + android:title="@string/license_title"> + <intent android:action="android.settings.LICENSE" /> + </PreferenceScreen> + + <!-- Terms and conditions --> + <PreferenceScreen + android:key="terms" + android:title="@string/terms_title"> + <intent android:action="android.settings.TERMS" /> + </PreferenceScreen> + + </PreferenceScreen> + + <!-- Contributors --> + <PreferenceScreen + android:key="contributors" + android:title="@string/contributors_title"> + <intent android:action="android.settings.TEAM" /> + </PreferenceScreen> + + <!-- Device hardware model --> + <Preference android:key="device_model" + style="?android:preferenceInformationStyle" + android:title="@string/model_number" + android:summary="@string/device_info_default"/> + + <!-- Device firmware version --> + <Preference android:key="firmware_version" + style="?android:preferenceInformationStyle" + android:title="@string/firmware_version" + android:summary="@string/device_info_default"/> + + <!-- Device Baseband version --> + <Preference android:key="baseband_version" + style="?android:preferenceInformationStyle" + android:title="@string/baseband_version" + android:summary="@string/device_info_default"/> + + <!-- Device Kernel version --> + <Preference android:key="kernel_version" + style="?android:preferenceInformationStyle" + android:title="@string/kernel_version" + android:summary="@string/device_info_default"/> + + <!-- Detailed build version --> + <Preference android:key="build_number" + style="?android:preferenceInformationStyle" + android:title="@string/build_number" + android:summary="@string/device_info_default"/> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/device_info_status.xml b/res/xml/device_info_status.xml new file mode 100644 index 0000000..da4cdca --- /dev/null +++ b/res/xml/device_info_status.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + <PreferenceCategory android:title="@string/device_status"/> + + <Preference android:key="battery_status" + style="?android:attr/preferenceInformationStyle" + android:title="@string/battery_status_title" + android:summary="@string/device_info_not_available"/> + <Preference android:key="battery_level" + style="?android:attr/preferenceInformationStyle" + android:title="@string/battery_level_title" + android:summary="@string/device_info_not_available"/> + <Preference android:key="number" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_number" + android:summary="@string/device_info_not_available"/> + <Preference android:key="operator_name" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_operator" + android:summary="@string/device_info_not_available"/> + <Preference android:key="signal_strength" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_signal_strength" + android:summary="@string/device_info_not_available"/> + <Preference android:key="network_type" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_network_type" + android:summary="@string/device_info_not_available"/> + <Preference android:key="service_state" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_service_state" + android:summary="@string/device_info_not_available"/> + <Preference android:key="roaming_state" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_roaming" + android:summary="@string/device_info_not_available"/> + <Preference android:key="data_state" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_data_state" + android:summary="@string/device_info_not_available"/> + <Preference android:key="imei" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_imei" + android:summary="@string/device_info_not_available"/> + <Preference android:key="imei_sv" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_imei_sv" + android:summary="@string/device_info_not_available"/> + <Preference android:key="imsi" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_imsi" + android:summary="@string/device_info_not_available"/> + <Preference android:key="wifi_mac_address" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_wifi_mac_address" + android:summary="@string/device_info_not_available"/> + <Preference android:key="bt_address" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_bt_address" + android:summary="@string/device_info_not_available"/> + <Preference android:key="up_time" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_up_time" + android:summary="@string/device_info_not_available"/> + <Preference android:key="awake_time" + style="?android:attr/preferenceInformationStyle" + android:title="@string/status_awake_time" + android:summary="@string/device_info_not_available"/> + +</PreferenceScreen> diff --git a/res/xml/ip_settings.xml b/res/xml/ip_settings.xml new file mode 100644 index 0000000..3c958a8 --- /dev/null +++ b/res/xml/ip_settings.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/wifi_ip_settings_titlebar" + /> + + <CheckBoxPreference + android:key="use_static_ip" + android:title="@string/wifi_use_static_ip" + android:persistent="false" + /> + + <EditTextPreference + android:dependency="use_static_ip" + android:key="ip_address" + android:title="@string/wifi_ip_address" + android:persistent="false" + android:singleLine="true" + /> + + <EditTextPreference + android:dependency="use_static_ip" + android:key="gateway" + android:title="@string/wifi_gateway" + android:persistent="false" + android:singleLine="true" + /> + + <EditTextPreference + android:dependency="use_static_ip" + android:key="netmask" + android:title="@string/wifi_netmask" + android:persistent="false" + android:singleLine="true" + /> + + <EditTextPreference + android:dependency="use_static_ip" + android:key="dns1" + android:title="@string/wifi_dns1" + android:persistent="false" + android:singleLine="true" + /> + + <EditTextPreference + android:dependency="use_static_ip" + android:key="dns2" + android:title="@string/wifi_dns2" + android:persistent="false" + android:singleLine="true" + /> + +</PreferenceScreen> diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml new file mode 100644 index 0000000..5d3010c --- /dev/null +++ b/res/xml/language_settings.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + + <PreferenceCategory + android:key="language_category" + android:title="@string/language_category"> + <!-- + <ListPreference + android:title="@string/phone_language"/> + --> + + + <PreferenceScreen + android:title="@string/phone_language"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.LocalePicker"/> + </PreferenceScreen> + </PreferenceCategory> + + <PreferenceCategory + android:title="@string/text_category" /> + <CheckBoxPreference + android:key="auto_replace" + android:title="@string/auto_replace" + android:summaryOn="@string/auto_replace_summary" + android:summaryOff="@string/auto_replace_summary" + android:persistent="false"/> + <CheckBoxPreference + android:key="auto_caps" + android:title="@string/auto_caps" + android:summaryOn="@string/auto_caps_summary" + android:summaryOff="@string/auto_caps_summary" + android:persistent="false"/> + <CheckBoxPreference + android:key="auto_punctuate" + android:title="@string/auto_punctuate" + android:summaryOn="@string/auto_punctuate_summary" + android:summaryOff="@string/auto_punctuate_summary" + android:persistent="false"/> +</PreferenceScreen> diff --git a/res/xml/quick_launch_settings.xml b/res/xml/quick_launch_settings.xml new file mode 100644 index 0000000..15950ac --- /dev/null +++ b/res/xml/quick_launch_settings.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:key="shortcut_category" + android:title="@string/quick_launch_title"> + + <!-- Preferences will be filled here. --> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/security_settings.xml b/res/xml/security_settings.xml new file mode 100644 index 0000000..788aae3 --- /dev/null +++ b/res/xml/security_settings.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/location_title"> + + <CheckBoxPreference + android:key="location_network" + android:title="@string/location_network_based" + android:summaryOn="@string/location_neighborhood_level" + android:summaryOff="@string/location_networks_disabled"/> + + <CheckBoxPreference + android:key="location_gps" + android:title="@string/location_gps" + android:summaryOn="@string/location_street_level" + android:summaryOff="@string/location_gps_disabled"/> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/settings.xml b/res/xml/settings.xml new file mode 100644 index 0000000..e484e86 --- /dev/null +++ b/res/xml/settings.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory android:title="@string/settings_label" + android:key="parent"> + + <PreferenceScreen + android:title="@string/radio_controls_title" + android:summary="@string/radio_controls_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.WirelessSettings" /> + </PreferenceScreen> + + <PreferenceScreen + android:key="call_settings" + android:title="@string/call_settings_title" + android:summary="@string/call_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.phone" + android:targetClass="com.android.phone.CallFeaturesSetting" /> + </PreferenceScreen> + + <!-- Sound and Display --> + + <PreferenceScreen + android:title="@string/sound_and_display_settings" + android:summary="@string/sound_and_display_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.SoundAndDisplaySettings" /> + </PreferenceScreen> + + <!-- Data Sync. The settings activity will ensure this is resolved to an + activity on the system image, otherwise it will remove this + preference. --> + + <PreferenceScreen + android:title="@string/sync_settings" + android:summary="@string/sync_settings_summary" + android:key="sync_settings"> + <intent android:action="android.settings.SYNC_SETTINGS" /> + </PreferenceScreen> + + <!-- Security & Privacy --> + + <PreferenceScreen + android:title="@string/security_settings_title" + android:summary="@string/security_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.SecuritySettings" /> + </PreferenceScreen> + + <!-- Application Settings --> + + <PreferenceScreen + android:title="@string/applications_settings" + android:summary="@string/applications_settings_summary" + android:key="applications_settings"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.ApplicationSettings" /> + </PreferenceScreen> + + <!-- Storage --> + + <PreferenceScreen + android:title="@string/storage_settings_title" + android:summary="@string/storage_settings_summary"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.deviceinfo.Memory" /> + </PreferenceScreen> + + <!-- Date & Time --> + + <PreferenceScreen + android:title="@string/date_and_time_settings_title" + android:summary="@string/date_and_time_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.DateTimeSettings" /> + </PreferenceScreen> + + <!-- Language --> + + <PreferenceScreen + android:title="@string/language_settings" + android:summary="@string/language_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.LanguageSettings" /> + </PreferenceScreen> + + <!-- About Device --> + + <PreferenceScreen + android:title="@string/about_settings" + android:summary="@string/about_settings_summary"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.DeviceInfoSettings" /> + </PreferenceScreen> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/sim_lock_settings.xml b/res/xml/sim_lock_settings.xml new file mode 100644 index 0000000..a784cc1 --- /dev/null +++ b/res/xml/sim_lock_settings.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + + <PreferenceCategory + android:title="@string/sim_lock_settings"/> + + <CheckBoxPreference + android:key="sim_toggle" + android:title="@string/sim_pin_toggle" + android:summaryOn="@string/sim_lock_on" + android:summaryOff="@string/sim_lock_off"/> + <com.android.settings.EditPinPreference + android:key="sim_pin" + android:title="@string/sim_pin_change" + android:dialogTitle="@string/sim_change_pin" + android:dialogMessage="@string/sim_enter_old" + android:positiveButtonText="@string/sim_enter_ok" + android:negativeButtonText="@string/sim_enter_cancel"/> +</PreferenceScreen> diff --git a/res/xml/sound_and_display_settings.xml b/res/xml/sound_and_display_settings.xml new file mode 100644 index 0000000..065f50b --- /dev/null +++ b/res/xml/sound_and_display_settings.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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" + xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"> + + <PreferenceCategory + android:title="@string/sound_settings"> + + <CheckBoxPreference + android:key="silent" + android:title="@string/silent_mode_title" + android:summary="@string/silent_mode_summary" + android:persistent="false" + android:disableDependentsState="true" /> + + <VolumePreference + android:key="ring_volume" + android:title="@string/ring_volume_title" + android:summary="@string/ring_volume_summary" + android:dialogTitle="@string/ring_volume_title" + android:persistent="false" + android:dependency="silent" + android:streamType="ring" /> + + <VolumePreference + android:key="media_volume" + android:title="@string/media_volume_title" + android:summary="@string/media_volume_summary" + android:dialogTitle="@string/media_volume_title" + android:persistent="false" + android:dependency="silent" + android:streamType="music" /> + + <com.android.settings.DefaultRingtonePreference + android:key="ringtone" + android:title="@string/ringtone_title" + android:summary="@string/ringtone_summary" + android:dialogTitle="@string/ringtone_title" + android:persistent="false" + android:dependency="silent" + android:ringtoneType="ringtone" /> + + <CheckBoxPreference + android:key="vibrate" + android:title="@string/vibrate_title" + android:summary="@string/vibrate_summary" + android:persistent="false" + android:dependency="silent" /> + + <com.android.settings.DefaultRingtonePreference + android:key="notification_sound" + android:title="@string/notification_sound_title" + android:summary="@string/notification_sound_summary" + android:dialogTitle="@string/notification_sound_dialog_title" + android:dependency="silent" + android:persistent="false" + android:ringtoneType="notification" /> + + <CheckBoxPreference + android:key="dtmf_tone" + android:title="@string/dtmf_tone_enable_title" + android:summaryOn="@string/dtmf_tone_enable_summary_on" + android:summaryOff="@string/dtmf_tone_enable_summary_off" + android:dependency="silent" + android:defaultValue="true" /> + + <CheckBoxPreference + android:key="sound_effects" + android:title="@string/sound_effects_enable_title" + android:summaryOn="@string/sound_effects_enable_summary_on" + android:summaryOff="@string/sound_effects_enable_summary_off" + android:dependency="silent" + android:defaultValue="true" /> + + </PreferenceCategory> + + <PreferenceCategory + android:title="@string/display_settings"> + + <com.android.settings.BrightnessPreference + android:key="brightness" + android:title="@string/brightness" + android:dialogIcon="@drawable/ic_popup_brightness" + android:dialogTitle="@string/brightness" /> + + <ListPreference + android:key="screen_timeout" + android:title="@string/screen_timeout" + android:persistent="false" + android:entries="@array/screen_timeout_entries" + android:entryValues="@array/screen_timeout_values" /> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/res/xml/testing_settings.xml b/res/xml/testing_settings.xml new file mode 100644 index 0000000..aaa5c0d --- /dev/null +++ b/res/xml/testing_settings.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/testing" /> + + <PreferenceScreen + android:title="@string/testing_phone_info"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.RadioInfo" /> + </PreferenceScreen> + + <PreferenceScreen + android:title="@string/testing_battery_info"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.BatteryInfo" /> + </PreferenceScreen> + + <!-- + <PreferenceScreen + android:title="@string/testing_sim_toolkit"> + <intent android:action="android.intent.action.MAIN" + android:targetPackage="com.android.stk" + android:targetClass="com.android.stk.StkSettings" /> + </PreferenceScreen> + --> + +</PreferenceScreen> + diff --git a/res/xml/timezones.xml b/res/xml/timezones.xml new file mode 100644 index 0000000..e515f16 --- /dev/null +++ b/res/xml/timezones.xml @@ -0,0 +1,84 @@ +<timezones> + <timezone id="Pacific/Majuro">Marshall Islands</timezone> + <timezone id="Pacific/Midway">Midway Island</timezone> + <timezone id="Pacific/Honolulu">Hawaii</timezone> + <timezone id="America/Anchorage">Alaska</timezone> + <timezone id="America/Los_Angeles">Pacific Time</timezone> + <timezone id="America/Tijuana">Tijuana</timezone> + <timezone id="America/Phoenix">Arizona</timezone> + <timezone id="America/Chihuahua">Chihuahua</timezone> + <timezone id="America/Denver">Mountain Time</timezone> + <timezone id="America/Costa_Rica">Central America</timezone> + <timezone id="America/Chicago">Central Time</timezone> + <timezone id="America/Mexico_City">Mexico City</timezone> + <timezone id="America/Regina">Saskatchewan</timezone> + <timezone id="America/Bogota">Bogota</timezone> + <timezone id="America/New_York">Eastern Time</timezone> + <timezone id="America/Caracas">Venezuela</timezone> + <timezone id="America/Barbados">Atlantic Time</timezone> + <timezone id="America/Manaus">Manaus</timezone> + <timezone id="America/Santiago">Santiago</timezone> + <timezone id="America/St_Johns">Newfoundland</timezone> + <timezone id="America/Araguaina">Brasilia</timezone> + <timezone id="America/Argentina/Buenos_Aires">Buenos Aires</timezone> + <timezone id="America/Godthab">Greenland</timezone> + <timezone id="America/Montevideo">Montevideo</timezone> + <timezone id="Atlantic/South_Georgia">Mid-Atlantic</timezone> + <timezone id="Atlantic/Azores">Azores</timezone> + <timezone id="Atlantic/Cape_Verde">Cape Verde Islands</timezone> + <timezone id="Africa/Casablanca">Casablanca</timezone> + <timezone id="Europe/London">London, Dublin</timezone> + <timezone id="Europe/Amsterdam">Amsterdam, Berlin</timezone> + <timezone id="Europe/Belgrade">Belgrade</timezone> + <timezone id="Europe/Brussels">Brussels</timezone> + <timezone id="Europe/Sarajevo">Sarajevo</timezone> + <timezone id="Africa/Windhoek">Windhoek</timezone> + <timezone id="Africa/Brazzaville">W. Africa Time</timezone> + <timezone id="Asia/Amman">Amman, Jordan</timezone> + <timezone id="Europe/Athens">Athens, Istanbul</timezone> + <timezone id="Asia/Beirut">Beirut, Lebanon</timezone> + <timezone id="Africa/Cairo">Cairo</timezone> + <timezone id="Europe/Helsinki">Helsinki</timezone> + <timezone id="Asia/Jerusalem">Jerusalem</timezone> + <timezone id="Europe/Minsk">Minsk</timezone> + <timezone id="Africa/Harare">Harare</timezone> + <timezone id="Asia/Baghdad">Baghdad</timezone> + <timezone id="Europe/Moscow">Moscow</timezone> + <timezone id="Asia/Kuwait">Kuwait</timezone> + <timezone id="Africa/Nairobi">Nairobi</timezone> + <timezone id="Asia/Tehran">Tehran</timezone> + <timezone id="Asia/Baku">Baku</timezone> + <timezone id="Asia/Tbilisi">Tbilisi</timezone> + <timezone id="Asia/Yerevan">Yerevan</timezone> + <timezone id="Asia/Dubai">Dubai</timezone> + <timezone id="Asia/Kabul">Kabul</timezone> + <timezone id="Asia/Karachi">Islamabad, Karachi</timezone> + <timezone id="Asia/Oral">Ural'sk</timezone> + <timezone id="Asia/Yekaterinburg">Yekaterinburg</timezone> + <timezone id="Asia/Calcutta">Kolkata</timezone> + <timezone id="Asia/Colombo">Sri Lanka</timezone> + <timezone id="Asia/Katmandu">Kathmandu</timezone> + <timezone id="Asia/Almaty">Astana</timezone> + <timezone id="Asia/Rangoon">Yangon</timezone> + <timezone id="Asia/Krasnoyarsk">Krasnoyarsk</timezone> + <timezone id="Asia/Bangkok">Bangkok</timezone> + <timezone id="Asia/Hong_Kong">Beijing, Hong Kong</timezone> + <timezone id="Asia/Irkutsk">Irkutsk</timezone> + <timezone id="Asia/Kuala_Lumpur">Kuala Lumpur</timezone> + <timezone id="Australia/Perth">Perth</timezone> + <timezone id="Asia/Taipei">Taipei</timezone> + <timezone id="Asia/Seoul">Seoul</timezone> + <timezone id="Asia/Tokyo">Tokyo, Osaka</timezone> + <timezone id="Asia/Yakutsk">Yakutsk</timezone> + <timezone id="Australia/Adelaide">Adelaide</timezone> + <timezone id="Australia/Darwin">Darwin</timezone> + <timezone id="Australia/Brisbane">Brisbane</timezone> + <timezone id="Australia/Hobart">Hobart</timezone> + <timezone id="Australia/Sydney">Sydney, Canberra</timezone> + <timezone id="Asia/Vladivostok">Vladivostok</timezone> + <timezone id="Pacific/Guam">Guam</timezone> + <timezone id="Asia/Magadan">Magadan</timezone> + <timezone id="Pacific/Auckland">Auckland</timezone> + <timezone id="Pacific/Fiji">Fiji</timezone> + <timezone id="Pacific/Tongatapu">Tonga</timezone> +</timezones> diff --git a/res/xml/wifi_settings.xml b/res/xml/wifi_settings.xml new file mode 100644 index 0000000..7b70621 --- /dev/null +++ b/res/xml/wifi_settings.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/wifi_settings_category"> + + <CheckBoxPreference + android:key="wifi_enabled" + android:title="@string/wifi" + android:summary="@string/wifi_quick_toggle_summary" + android:persistent="false" /> + + <CheckBoxPreference + android:key="open_network_notifications_enabled" + android:dependency="wifi_enabled" + android:title="@string/wifi_notify_open_networks" + android:summary="@string/wifi_notify_open_networks_summary" + android:persistent="false" /> + + </PreferenceCategory> + + <com.android.settings.ProgressCategory + android:key="access_points" + android:dependency="wifi_enabled" + android:title="@string/wifi_access_points" + android:persistent="false" /> + + <Preference + android:key="add_other_network" + android:dependency="wifi_enabled" + android:title="@string/wifi_add_other_network" + android:persistent="false" /> + +</PreferenceScreen> diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml new file mode 100644 index 0000000..555a570 --- /dev/null +++ b/res/xml/wireless_settings.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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"> + + <PreferenceCategory + android:title="@string/radio_controls_title"> + + <!-- Programmatically will have dynamic summary, but we provide the fallback summary. --> + <CheckBoxPreference + android:key="toggle_wifi" + android:title="@string/wifi_quick_toggle_title" + android:summary="@string/wifi_quick_toggle_summary" + android:persistent="false" + android:dependency="toggle_airplane" /> + + <PreferenceScreen + android:title="@string/wifi_settings" + android:summary="@string/wifi_settings_summary" + android:dependency="toggle_airplane"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.wifi.WifiSettings" /> + </PreferenceScreen> + + <CheckBoxPreference + android:key="toggle_bluetooth" + android:title="@string/bluetooth_quick_toggle_title" + android:summary="@string/bluetooth_quick_toggle_summary" + android:persistent="false" + android:dependency="toggle_airplane" /> + + <PreferenceScreen + android:title="@string/bluetooth_settings_title" + android:summary="@string/bluetooth_settings_summary" + android:dependency="toggle_airplane"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.settings" + android:targetClass="com.android.settings.BluetoothSettings" /> + </PreferenceScreen> + + <CheckBoxPreference + android:key="toggle_airplane" + android:title="@string/airplane_mode" + android:summary="@string/airplane_mode_summary" + android:persistent="false" + android:disableDependentsState="true" /> + + <PreferenceScreen + android:title="@string/network_settings_title" + android:summary="@string/network_settings_summary" + android:dependency="toggle_airplane"> + <intent + android:action="android.intent.action.MAIN" + android:targetPackage="com.android.phone" + android:targetClass="com.android.phone.Settings" /> + </PreferenceScreen> + + </PreferenceCategory> + +</PreferenceScreen> diff --git a/src/com/android/settings/AirplaneModeEnabler.java b/src/com/android/settings/AirplaneModeEnabler.java new file mode 100644 index 0000000..f47d679 --- /dev/null +++ b/src/com/android/settings/AirplaneModeEnabler.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import com.android.internal.telephony.PhoneStateIntentReceiver; + +import android.content.Context; +import android.content.Intent; +import android.os.Handler; +import android.os.Message; +import android.preference.CheckBoxPreference; +import android.preference.Preference; +import android.provider.Settings; +import android.telephony.ServiceState; + +public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListener { + + private final Context mContext; + + private PhoneStateIntentReceiver mPhoneStateReceiver; + + private final CheckBoxPreference mCheckBoxPref; + + private static final int EVENT_SERVICE_STATE_CHANGED = 3; + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case EVENT_SERVICE_STATE_CHANGED: + onAirplaneModeChanged(); + break; + } + } + }; + + public AirplaneModeEnabler(Context context, CheckBoxPreference airplaneModeCheckBoxPreference) { + + mContext = context; + mCheckBoxPref = airplaneModeCheckBoxPreference; + + airplaneModeCheckBoxPreference.setPersistent(false); + + mPhoneStateReceiver = new PhoneStateIntentReceiver(mContext, mHandler); + mPhoneStateReceiver.notifyServiceState(EVENT_SERVICE_STATE_CHANGED); + } + + public void resume() { + + // This is the widget enabled state, not the preference toggled state + mCheckBoxPref.setEnabled(true); + mCheckBoxPref.setChecked(isAirplaneModeOn()); + + mPhoneStateReceiver.registerIntent(); + mCheckBoxPref.setOnPreferenceChangeListener(this); + } + + public void pause() { + mPhoneStateReceiver.unregisterIntent(); + mCheckBoxPref.setOnPreferenceChangeListener(null); + } + + private boolean isAirplaneModeOn() { + return Settings.System.getInt(mContext.getContentResolver(), + Settings.System.AIRPLANE_MODE_ON, 0) != 0; + } + + private void setAirplaneModeOn(boolean enabling) { + + mCheckBoxPref.setEnabled(false); + mCheckBoxPref.setSummary(enabling ? R.string.airplane_mode_turning_on + : R.string.airplane_mode_turning_off); + + // Change the system setting + Settings.System.putInt(mContext.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, + enabling ? 1 : 0); + + // Post the intent + Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); + intent.putExtra("state", enabling); + mContext.sendBroadcast(intent); + } + + /** + * Called when we've received confirmation that the airplane mode was set. + */ + private void onAirplaneModeChanged() { + ServiceState serviceState = mPhoneStateReceiver.getServiceState(); + boolean isPhoneOff = serviceState.getState() == ServiceState.STATE_POWER_OFF; + mCheckBoxPref.setChecked(isPhoneOff); + mCheckBoxPref.setSummary(R.string.airplane_mode_summary); + mCheckBoxPref.setEnabled(true); + } + + /** + * Called when someone clicks on the checkbox preference. + */ + public boolean onPreferenceChange(Preference preference, Object newValue) { + setAirplaneModeOn((Boolean) newValue); + return true; + } + +} diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java new file mode 100644 index 0000000..9b74eea --- /dev/null +++ b/src/com/android/settings/ApnEditor.java @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.AlertDialog; +import android.content.ContentUris; +import android.content.ContentValues; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.res.Resources; +import android.database.Cursor; +import android.net.Uri; +import android.os.Bundle; +import android.os.SystemProperties; +import android.preference.EditTextPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.provider.Telephony; +import com.android.internal.telephony.TelephonyProperties; +import android.util.Log; +import android.view.KeyEvent; +import android.view.Menu; +import android.view.MenuItem; + + +public class ApnEditor extends PreferenceActivity + implements SharedPreferences.OnSharedPreferenceChangeListener { + + + private final static String TAG = ApnEditor.class.getSimpleName(); + + private final static String SAVED_POS = "pos"; + + private static final int MENU_DELETE = Menu.FIRST; + private static final int MENU_SAVE = Menu.FIRST + 1; + private static final int MENU_CANCEL = Menu.FIRST + 2; + + private static String sNotSet; + private EditTextPreference mName; + private EditTextPreference mApn; + private EditTextPreference mProxy; + private EditTextPreference mPort; + private EditTextPreference mUser; + private EditTextPreference mServer; + private EditTextPreference mPassword; + private EditTextPreference mMmsc; + private EditTextPreference mMcc; + private EditTextPreference mMnc; + private EditTextPreference mMmsProxy; + private EditTextPreference mMmsPort; + private EditTextPreference mApnType; + + private Uri mUri; + private Cursor mCursor; + private boolean mNewApn; + private boolean mFirstTime; + private Resources mRes; + + /** + * Standard projection for the interesting columns of a normal note. + */ + private static final String[] sProjection = new String[] { + Telephony.Carriers._ID, // 0 + Telephony.Carriers.NAME, // 1 + Telephony.Carriers.APN, // 2 + Telephony.Carriers.PROXY, // 3 + Telephony.Carriers.PORT, // 4 + Telephony.Carriers.USER, // 5 + Telephony.Carriers.SERVER, // 6 + Telephony.Carriers.PASSWORD, // 7 + Telephony.Carriers.MMSC, // 8 + Telephony.Carriers.MCC, // 9 + Telephony.Carriers.MNC, // 10 + Telephony.Carriers.NUMERIC, // 11 + Telephony.Carriers.MMSPROXY,// 12 + Telephony.Carriers.MMSPORT, // 13 + Telephony.Carriers.TYPE, // 14 + }; + + private static final int ID_INDEX = 0; + private static final int NAME_INDEX = 1; + private static final int APN_INDEX = 2; + private static final int PROXY_INDEX = 3; + private static final int PORT_INDEX = 4; + private static final int USER_INDEX = 5; + private static final int SERVER_INDEX = 6; + private static final int PASSWORD_INDEX = 7; + private static final int MMSC_INDEX = 8; + private static final int MCC_INDEX = 9; + private static final int MNC_INDEX = 10; + private static final int MMSPROXY_INDEX = 12; + private static final int MMSPORT_INDEX = 13; + private static final int TYPE_INDEX = 14; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.apn_editor); + + sNotSet = getResources().getString(R.string.apn_not_set); + mName = (EditTextPreference) findPreference("apn_name"); + mApn = (EditTextPreference) findPreference("apn_apn"); + mProxy = (EditTextPreference) findPreference("apn_http_proxy"); + mPort = (EditTextPreference) findPreference("apn_http_port"); + mUser = (EditTextPreference) findPreference("apn_user"); + mServer = (EditTextPreference) findPreference("apn_server"); + mPassword = (EditTextPreference) findPreference("apn_password"); + mMmsProxy = (EditTextPreference) findPreference("apn_mms_proxy"); + mMmsPort = (EditTextPreference) findPreference("apn_mms_port"); + mMmsc = (EditTextPreference) findPreference("apn_mmsc"); + mMcc = (EditTextPreference) findPreference("apn_mcc"); + mMnc = (EditTextPreference) findPreference("apn_mnc"); + mApnType = (EditTextPreference) findPreference("apn_type"); + + mRes = getResources(); + + final Intent intent = getIntent(); + final String action = intent.getAction(); + + mFirstTime = icicle == null; + + if (action.equals(Intent.ACTION_EDIT)) { + mUri = intent.getData(); + } else if (action.equals(Intent.ACTION_INSERT)) { + if (mFirstTime) { + mUri = getContentResolver().insert(intent.getData(), new ContentValues()); + } else { + mUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, + icicle.getInt(SAVED_POS)); + } + mNewApn = true; + // If we were unable to create a new note, then just finish + // this activity. A RESULT_CANCELED will be sent back to the + // original activity if they requested a result. + if (mUri == null) { + Log.w(TAG, "Failed to insert new telephony provider into " + + getIntent().getData()); + finish(); + return; + } + + // The new entry was created, so assume all will end well and + // set the result to be returned. + setResult(RESULT_OK, (new Intent()).setAction(mUri.toString())); + + } else { + finish(); + return; + } + + mCursor = managedQuery(mUri, sProjection, null, null); + mCursor.moveToFirst(); + + fillUi(); + } + + @Override + public void onResume() { + super.onResume(); + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); + } + + @Override + public void onPause() { + getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this); + super.onPause(); + } + + private void fillUi() { + if (mFirstTime) { + mFirstTime = false; + // Fill in all the values from the db in both text editor and summary + mName.setText(mCursor.getString(NAME_INDEX)); + mApn.setText(mCursor.getString(APN_INDEX)); + mProxy.setText(mCursor.getString(PROXY_INDEX)); + mPort.setText(mCursor.getString(PORT_INDEX)); + mUser.setText(mCursor.getString(USER_INDEX)); + mServer.setText(mCursor.getString(SERVER_INDEX)); + mPassword.setText(mCursor.getString(PASSWORD_INDEX)); + mMmsProxy.setText(mCursor.getString(MMSPROXY_INDEX)); + mMmsPort.setText(mCursor.getString(MMSPORT_INDEX)); + mMmsc.setText(mCursor.getString(MMSC_INDEX)); + mMcc.setText(mCursor.getString(MCC_INDEX)); + mMnc.setText(mCursor.getString(MNC_INDEX)); + mApnType.setText(mCursor.getString(TYPE_INDEX)); + if (mNewApn) { + String numeric = + SystemProperties.get(TelephonyProperties.PROPERTY_SIM_OPERATOR_NUMERIC); + // MCC is first 3 chars and then in 2 - 3 chars of MNC + if (numeric != null && numeric.length() > 4) { + // Country code + String mcc = numeric.substring(0, 3); + // Network code + String mnc = numeric.substring(3); + // Auto populate MNC and MCC for new entries, based on what SIM reports + mMcc.setText(mcc); + mMnc.setText(mnc); + } + } + } + + mName.setSummary(checkNull(mName.getText())); + mApn.setSummary(checkNull(mApn.getText())); + mProxy.setSummary(checkNull(mProxy.getText())); + mPort.setSummary(checkNull(mPort.getText())); + mUser.setSummary(checkNull(mUser.getText())); + mServer.setSummary(checkNull(mServer.getText())); + mPassword.setSummary(starify(mPassword.getText())); + mMmsProxy.setSummary(checkNull(mMmsProxy.getText())); + mMmsPort.setSummary(checkNull(mMmsPort.getText())); + mMmsc.setSummary(checkNull(mMmsc.getText())); + mMcc.setSummary(checkNull(mMcc.getText())); + mMnc.setSummary(checkNull(mMnc.getText())); + mApnType.setSummary(checkNull(mApnType.getText())); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); + // If it's a new APN, then cancel will delete the new entry in onPause + if (!mNewApn) { + menu.add(0, MENU_DELETE, 0, R.string.menu_delete) + .setIcon(android.R.drawable.ic_menu_delete); + } + menu.add(0, MENU_SAVE, 0, R.string.menu_save) + .setIcon(android.R.drawable.ic_menu_save); + menu.add(0, MENU_CANCEL, 0, R.string.menu_cancel) + .setIcon(android.R.drawable.ic_menu_close_clear_cancel); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case MENU_DELETE: + deleteApn(); + return true; + case MENU_SAVE: + if (validateAndSave(false)) { + finish(); + } + return true; + case MENU_CANCEL: + if (mNewApn) { + getContentResolver().delete(mUri, null, null); + } + finish(); + return true; + } + return super.onOptionsItemSelected(item); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + switch (keyCode) { + case KeyEvent.KEYCODE_BACK: { + if (validateAndSave(false)) { + finish(); + } + return true; + } + } + return super.onKeyDown(keyCode, event); + } + + @Override + protected void onSaveInstanceState(Bundle icicle) { + super.onSaveInstanceState(icicle); + validateAndSave(true); + icicle.putInt(SAVED_POS, mCursor.getInt(ID_INDEX)); + } + + /** + * Check the key fields' validity and save if valid. + * @param force save even if the fields are not valid, if the app is + * being suspended + * @return true if the data was saved + */ + private boolean validateAndSave(boolean force) { + String name = checkNotSet(mName.getText()); + String apn = checkNotSet(mApn.getText()); + String mcc = checkNotSet(mMcc.getText()); + String mnc = checkNotSet(mMnc.getText()); + + String errorMsg = null; + if (name.length() < 1) { + errorMsg = mRes.getString(R.string.error_name_empty); + } else if (apn.length() < 1) { + errorMsg = mRes.getString(R.string.error_apn_empty); + } else if (mcc.length() != 3) { + errorMsg = mRes.getString(R.string.error_mcc_not3); + } else if ((mnc.length() & 0xFFFE) != 2) { + errorMsg = mRes.getString(R.string.error_mnc_not23); + } + + if (errorMsg != null && !force) { + showErrorMessage(errorMsg); + return false; + } + + if (!mCursor.moveToFirst()) { + Log.w(TAG, + "Could not go to the first row in the Cursor when saving data."); + return false; + } + + ContentValues values = new ContentValues(); + + values.put(Telephony.Carriers.NAME, name); + values.put(Telephony.Carriers.APN, apn); + values.put(Telephony.Carriers.PROXY, checkNotSet(mProxy.getText())); + values.put(Telephony.Carriers.PORT, checkNotSet(mPort.getText())); + values.put(Telephony.Carriers.MMSPROXY, checkNotSet(mMmsProxy.getText())); + values.put(Telephony.Carriers.MMSPORT, checkNotSet(mMmsPort.getText())); + values.put(Telephony.Carriers.USER, checkNotSet(mUser.getText())); + values.put(Telephony.Carriers.SERVER, checkNotSet(mServer.getText())); + values.put(Telephony.Carriers.PASSWORD, checkNotSet(mPassword.getText())); + values.put(Telephony.Carriers.MMSC, checkNotSet(mMmsc.getText())); + values.put(Telephony.Carriers.TYPE, checkNotSet(mApnType.getText())); + + values.put(Telephony.Carriers.MCC, mcc); + values.put(Telephony.Carriers.MNC, mnc); + + values.put(Telephony.Carriers.NUMERIC, mcc + mnc); + + getContentResolver().update(mUri, values, null, null); + + return true; + } + + private void showErrorMessage(String message) { + new AlertDialog.Builder(this) + .setTitle(R.string.error_title) + .setMessage(message) + .setPositiveButton(android.R.string.ok, null) + .show(); + } + + private void deleteApn() { + getContentResolver().delete(mUri, null, null); + finish(); + } + + private String starify(String value) { + if (value == null || value.length() == 0) { + return sNotSet; + } else { + char[] password = new char[value.length()]; + for (int i = 0; i < password.length; i++) { + password[i] = '*'; + } + return new String(password); + } + } + + private String checkNull(String value) { + if (value == null || value.length() == 0) { + return sNotSet; + } else { + return value; + } + } + + private String checkNotSet(String value) { + if (value == null || value.equals(sNotSet)) { + return ""; + } else { + return value; + } + } + + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + Preference pref = findPreference(key); + if (pref != null) { + pref.setSummary(checkNull(sharedPreferences.getString(key, ""))); + } + } +} diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java new file mode 100644 index 0000000..ea13ee7 --- /dev/null +++ b/src/com/android/settings/ApnSettings.java @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.ContentUris; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.net.Uri; +import android.os.Bundle; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceCategory; +import android.preference.PreferenceScreen; +import android.provider.Telephony; +import android.view.Menu; +import android.view.MenuItem; + +public class ApnSettings extends PreferenceActivity { + + public static final String EXTRA_POSITION = "position"; + + private static final int ID_INDEX = 0; + private static final int NAME_INDEX = 1; + private static final int APN_INDEX = 2; + + private static final int MENU_NEW = Menu.FIRST; + + private Cursor mCursor; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.apn_settings); + } + + @Override + protected void onResume() { + super.onResume(); + + fillList(); + } + + private void fillList() { + mCursor = managedQuery(Telephony.Carriers.CONTENT_URI, new String[] { + "_id", "name", "apn"}, null, Telephony.Carriers.DEFAULT_SORT_ORDER); + + PreferenceCategory apnList = (PreferenceCategory) findPreference("apn_list"); + apnList.removeAll(); + + mCursor.moveToFirst(); + while (!mCursor.isAfterLast()) { + String name = mCursor.getString(NAME_INDEX); + String apn = mCursor.getString(APN_INDEX); + + Preference pref = new Preference((Context) this); + pref.setKey(mCursor.getString(ID_INDEX)); + pref.setTitle(name); + pref.setSummary(apn); + pref.setPersistent(false); + apnList.addPreference(pref); + mCursor.moveToNext(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); + menu.add(0, MENU_NEW, 0, + getResources().getString(R.string.menu_new)) + .setIcon(android.R.drawable.ic_menu_add); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case MENU_NEW: + addNewApn(); + return true; + } + return super.onOptionsItemSelected(item); + } + + private void addNewApn() { + startActivity(new Intent(Intent.ACTION_INSERT, Telephony.Carriers.CONTENT_URI)); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + int pos = Integer.parseInt(preference.getKey()); + Uri url = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, pos); + startActivity(new Intent(Intent.ACTION_EDIT, url)); + return true; + } +} diff --git a/src/com/android/settings/ApplicationSettings.java b/src/com/android/settings/ApplicationSettings.java new file mode 100644 index 0000000..0ee2789 --- /dev/null +++ b/src/com/android/settings/ApplicationSettings.java @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.preference.CheckBoxPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.provider.Settings; + +public class ApplicationSettings extends PreferenceActivity implements + DialogInterface.OnClickListener { + + private static final String KEY_TOGGLE_INSTALL_APPLICATIONS = "toggle_install_applications"; + + private CheckBoxPreference mToggleAppInstallation; + + private DialogInterface mWarnInstallApps; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.application_settings); + + mToggleAppInstallation = (CheckBoxPreference) findPreference(KEY_TOGGLE_INSTALL_APPLICATIONS); + mToggleAppInstallation.setChecked(isNonMarketAppsAllowed()); + + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mToggleAppInstallation) { + if (mToggleAppInstallation.isChecked()) { + mToggleAppInstallation.setChecked(false); + warnAppInstallation(); + } else { + setNonMarketAppsAllowed(false); + } + } + + return super.onPreferenceTreeClick(preferenceScreen, preference); + } + + public void onClick(DialogInterface dialog, int which) { + if (dialog == mWarnInstallApps && which == DialogInterface.BUTTON1) { + setNonMarketAppsAllowed(true); + mToggleAppInstallation.setChecked(true); + } + } + + private void setNonMarketAppsAllowed(boolean enabled) { + // Change the system setting + Settings.System.putInt(getContentResolver(), Settings.System.INSTALL_NON_MARKET_APPS, + enabled ? 1 : 0); + } + + private boolean isNonMarketAppsAllowed() { + return Settings.System.getInt(getContentResolver(), + Settings.System.INSTALL_NON_MARKET_APPS, 0) > 0; + } + + private void warnAppInstallation() { + mWarnInstallApps = new AlertDialog.Builder(this) + .setTitle(getString(R.string.error_title)) + .setIcon(com.android.internal.R.drawable.ic_dialog_alert) + .setMessage(getResources().getString(R.string.install_all_warning)) + .setPositiveButton(android.R.string.yes, this) + .setNegativeButton(android.R.string.no, null) + .show(); + } + + +} diff --git a/src/com/android/settings/BandMode.java b/src/com/android/settings/BandMode.java new file mode 100644 index 0000000..1297cad --- /dev/null +++ b/src/com/android/settings/BandMode.java @@ -0,0 +1,217 @@ +package com.android.settings; + +import android.app.Activity; +import android.app.AlertDialog; +import com.android.internal.telephony.Phone; +import com.android.internal.telephony.PhoneFactory; +import android.os.Bundle; +import android.os.Message; +import android.os.Handler; +import android.os.AsyncResult; +import android.util.Log; +import android.content.DialogInterface; +import android.view.View; +import android.view.WindowManager; +import android.view.Window; +import android.widget.ListView; +import android.widget.ArrayAdapter; +import android.widget.AdapterView; + + +/** + * Radio Band Mode Selection Class + * + * It will query baseband about all available band modes and display them + * in screen. It will display all six band modes if the query failed. + * + * After user select one band, it will send the selection to baseband. + * + * It will alter user the result of select operation and exit, no matter success + * or not. + * + */ +public class BandMode extends Activity { + private static final String LOG_TAG = "phone"; + private static final boolean DBG = false; + + private static final int EVENT_BAND_SCAN_COMPLETED = 100; + private static final int EVENT_BAND_SELECTION_DONE = 200; + + private static final String[] BAND_NAMES = new String[] { + "Automatic", + "EURO Band", + "USA Band", + "JAPAN Band", + "AUS Band", + "AUS2 Band" + }; + + private ListView mBandList; + private ArrayAdapter mBandListAdapter; + private BandListItem mTargetBand = null; + private DialogInterface mProgressPanel; + + private Phone mPhone = null; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); + + setContentView(R.layout.band_mode); + + setTitle(getString(R.string.band_mode_title)); + getWindow().setLayout(WindowManager.LayoutParams.FILL_PARENT, + WindowManager.LayoutParams.WRAP_CONTENT); + + mPhone = PhoneFactory.getDefaultPhone(); + + mBandList = (ListView) findViewById(R.id.band); + mBandListAdapter = new ArrayAdapter<BandListItem>(this, + android.R.layout.simple_list_item_1); + mBandList.setAdapter(mBandListAdapter); + mBandList.setOnItemClickListener(mBandSelectionHandler); + + + + loadBandList(); + } + + private AdapterView.OnItemClickListener mBandSelectionHandler = + new AdapterView.OnItemClickListener () { + public void onItemClick(AdapterView parent, View v, + int position, long id) { + + getWindow().setFeatureInt( + Window.FEATURE_INDETERMINATE_PROGRESS, + Window.PROGRESS_VISIBILITY_ON); + + mTargetBand = (BandListItem) parent.getAdapter().getItem(position); + + if (DBG) log("Select band : " + mTargetBand.toString()); + + Message msg = + mHandler.obtainMessage(EVENT_BAND_SELECTION_DONE); + mPhone.setBandMode(mTargetBand.getBand(), msg); + } + }; + + private class BandListItem { + private int mBandMode = Phone.BM_UNSPECIFIED; + + public BandListItem(int bm) { + mBandMode = bm; + } + + public int getBand() { + return mBandMode; + } + + public String toString() { + return BAND_NAMES[mBandMode]; + } + } + + private void loadBandList() { + String str = getString(R.string.band_mode_loading); + + if (DBG) log(str); + + + //ProgressDialog.show(this, null, str, true, true, null); + mProgressPanel = new AlertDialog.Builder(this) + .setMessage(str) + .show(); + + Message msg = mHandler.obtainMessage(EVENT_BAND_SCAN_COMPLETED); + mPhone.queryAvailableBandMode(msg); + + } + + private void bandListLoaded(AsyncResult result) { + if (DBG) log("network list loaded"); + + if (mProgressPanel != null) mProgressPanel.dismiss(); + + clearList(); + + boolean addBandSuccess = false; + BandListItem item; + + if (result.result != null) { + int bands[] = (int[])result.result; + int size = bands[0]; + + if (size > 0) { + for (int i=1; i<size; i++) { + item = new BandListItem(bands[i]); + mBandListAdapter.add(item); + if (DBG) log("Add " + item.toString()); + } + addBandSuccess = true; + } + } + + if (addBandSuccess == false) { + if (DBG) log("Error in query, add default list"); + for (int i=0; i<Phone.BM_BOUNDARY; i++) { + item = new BandListItem(i); + mBandListAdapter.add(item); + if (DBG) log("Add default " + item.toString()); + } + } + mBandList.requestFocus(); + } + + private void displayBandSelectionResult(Throwable ex) { + String status = getString(R.string.band_mode_set) + +" [" + mTargetBand.toString() + "] "; + + if (ex != null) { + status = status + getString(R.string.band_mode_failed); + } else { + status = status + getString(R.string.band_mode_succeeded); + } + + mProgressPanel = new AlertDialog.Builder(this) + .setMessage(status) + .setPositiveButton(android.R.string.ok, null).show(); + } + + private void clearList() { + while(mBandListAdapter.getCount() > 0) { + mBandListAdapter.remove( + mBandListAdapter.getItem(0)); + } + } + + private void log(String msg) { + Log.d(LOG_TAG, "[BandsList] " + msg); + } + + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + AsyncResult ar; + switch (msg.what) { + case EVENT_BAND_SCAN_COMPLETED: + ar = (AsyncResult) msg.obj; + + bandListLoaded(ar); + break; + + case EVENT_BAND_SELECTION_DONE: + ar = (AsyncResult) msg.obj; + + getWindow().setFeatureInt( + Window.FEATURE_INDETERMINATE_PROGRESS, + Window.PROGRESS_VISIBILITY_OFF); + + displayBandSelectionResult(ar.exception); + break; + } + } + }; + + +} diff --git a/src/com/android/settings/BatteryInfo.java b/src/com/android/settings/BatteryInfo.java new file mode 100644 index 0000000..ef60fc3 --- /dev/null +++ b/src/com/android/settings/BatteryInfo.java @@ -0,0 +1,208 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.BatteryManager; +import android.os.Bundle; +import android.os.Handler; +import android.os.IPowerManager; +import android.os.Message; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemClock; +import android.pim.DateUtils; +import android.widget.TextView; + +import com.android.internal.app.IBatteryStats; + +public class BatteryInfo extends Activity { + private TextView mStatus; + private TextView mLevel; + private TextView mScale; + private TextView mHealth; + private TextView mVoltage; + private TextView mTemperature; + private TextView mTechnology; + private TextView mUptime; + private TextView mAwakeBattery; + private TextView mAwakePlugged; + private TextView mScreenOn; + private IBatteryStats mBatteryStats; + private IPowerManager mScreenStats; + + private static final int EVENT_TICK = 1; + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case EVENT_TICK: + updateBatteryStats(); + sendEmptyMessageDelayed(EVENT_TICK, 1000); + break; + } + } + }; + + /** + * Format a number of tenths-units as a decimal string without using a + * conversion to float. E.g. 347 -> "34.7" + */ + private final String tenthsToFixedString(int x) { + int tens = x / 10; + return new String("" + tens + "." + (x - 10*tens)); + } + + /** + *Listens for intent broadcasts + */ + private IntentFilter mIntentFilter; + + private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (action.equals(Intent.ACTION_BATTERY_CHANGED)) { + int plugType = intent.getIntExtra("plugged", 0); + + mLevel.setText("" + intent.getIntExtra("level", 0)); + mScale.setText("" + intent.getIntExtra("scale", 0)); + mVoltage.setText("" + intent.getIntExtra("voltage", 0) + " " + + getString(R.string.battery_info_voltage_units)); + mTemperature.setText("" + tenthsToFixedString(intent.getIntExtra("temperature", 0)) + + getString(R.string.battery_info_temperature_units)); + mTechnology.setText("" + intent.getStringExtra("technology")); + + int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN); + String statusString; + if (status == BatteryManager.BATTERY_STATUS_CHARGING) { + statusString = getString(R.string.battery_info_status_charging); + if (plugType > 0) { + statusString = statusString + " " + getString( + (plugType == BatteryManager.BATTERY_PLUGGED_AC) + ? R.string.battery_info_status_charging_ac + : R.string.battery_info_status_charging_usb); + } + } else if (status == BatteryManager.BATTERY_STATUS_DISCHARGING) { + statusString = getString(R.string.battery_info_status_discharging); + } else if (status == BatteryManager.BATTERY_STATUS_NOT_CHARGING) { + statusString = getString(R.string.battery_info_status_not_charging); + } else if (status == BatteryManager.BATTERY_STATUS_FULL) { + statusString = getString(R.string.battery_info_status_full); + } else { + statusString = getString(R.string.battery_info_status_unknown); + } + mStatus.setText(statusString); + + int health = intent.getIntExtra("health", BatteryManager.BATTERY_HEALTH_UNKNOWN); + String healthString; + if (health == BatteryManager.BATTERY_HEALTH_GOOD) { + healthString = getString(R.string.battery_info_health_good); + } else if (health == BatteryManager.BATTERY_HEALTH_OVERHEAT) { + healthString = getString(R.string.battery_info_health_overheat); + } else if (health == BatteryManager.BATTERY_HEALTH_DEAD) { + healthString = getString(R.string.battery_info_health_dead); + } else if (health == BatteryManager.BATTERY_HEALTH_OVER_VOLTAGE) { + healthString = getString(R.string.battery_info_health_over_voltage); + } else if (health == BatteryManager.BATTERY_HEALTH_UNSPECIFIED_FAILURE) { + healthString = getString(R.string.battery_info_health_unspecified_failure); + } else { + healthString = getString(R.string.battery_info_health_unknown); + } + mHealth.setText(healthString); + } + } + }; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + setContentView(R.layout.battery_info); + + // create the IntentFilter that will be used to listen + // to battery status broadcasts + mIntentFilter = new IntentFilter(); + mIntentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); + } + + @Override + public void onResume() { + super.onResume(); + + mStatus = (TextView)findViewById(R.id.status); + mLevel = (TextView)findViewById(R.id.level); + mScale = (TextView)findViewById(R.id.scale); + mHealth = (TextView)findViewById(R.id.health); + mTechnology = (TextView)findViewById(R.id.technology); + mVoltage = (TextView)findViewById(R.id.voltage); + mTemperature = (TextView)findViewById(R.id.temperature); + mUptime = (TextView) findViewById(R.id.uptime); + mAwakeBattery = (TextView) findViewById(R.id.awakeBattery); + mAwakePlugged = (TextView) findViewById(R.id.awakePlugged); + mScreenOn = (TextView) findViewById(R.id.screenOn); + + // Get awake time plugged in and on battery + mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService("batteryinfo")); + mScreenStats = IPowerManager.Stub.asInterface(ServiceManager.getService(POWER_SERVICE)); + mHandler.sendEmptyMessageDelayed(EVENT_TICK, 1000); + + registerReceiver(mIntentReceiver, mIntentFilter); + } + + @Override + public void onPause() { + super.onPause(); + mHandler.removeMessages(EVENT_TICK); + + // we are no longer on the screen stop the observers + unregisterReceiver(mIntentReceiver); + } + + private void updateBatteryStats() { + long uptime = SystemClock.elapsedRealtime(); + mUptime.setText(DateUtils.formatElapsedTime(uptime / 1000)); + + if (mBatteryStats != null) { + try { + long awakeTimeBattery = mBatteryStats.getAwakeTimeBattery(); + long awakeTimePluggedIn = mBatteryStats.getAwakeTimePlugged(); + mAwakeBattery.setText(DateUtils.formatElapsedTime(awakeTimeBattery / 1000) + + " (" + (100 * awakeTimeBattery / uptime) + "%)"); + mAwakePlugged.setText(DateUtils.formatElapsedTime(awakeTimePluggedIn / 1000) + + " (" + (100 * awakeTimePluggedIn / uptime) + "%)"); + } catch (RemoteException re) { + mAwakeBattery.setText("Unknown"); + mAwakePlugged.setText("Unknown"); + } + } + if (mScreenStats != null) { + try { + long screenOnTime = mScreenStats.getScreenOnTime(); + mScreenOn.setText(DateUtils.formatElapsedTime(screenOnTime / 1000)); + } catch (RemoteException re) { + mScreenOn.setText("Unknown"); + } + } + } + +} diff --git a/src/com/android/settings/BluetoothDataEntry.java b/src/com/android/settings/BluetoothDataEntry.java new file mode 100644 index 0000000..1c7e0b6 --- /dev/null +++ b/src/com/android/settings/BluetoothDataEntry.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.KeyEvent; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.View.OnKeyListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; + +public class BluetoothDataEntry extends Activity implements OnKeyListener { + + private Bundle extras; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + setContentView(R.layout.bluetooth_data_entry); + + mDataLabel = (TextView)findViewById(R.id.dataLabel); + mDataEntry = (EditText)findViewById(R.id.dataEntry); + mConfirmButton = (Button)findViewById(R.id.confirmButton); + mCancelButton = (Button)findViewById(R.id.cancelButton); + + mDataEntry.setOnKeyListener(this); + Intent intent = getIntent(); + String label = null; + { + String labelExtra = intent.getStringExtra("label"); + if (labelExtra != null) { + label = labelExtra; + } + } + extras = intent.getBundleExtra("extras"); + if (label != null && label.length() > 0) { + mDataLabel.setText(label); + } + + mConfirmButton.setOnClickListener(new ConfirmButtonListener()); + mCancelButton.setOnClickListener(new CancelButtonListener()); + } + + private class ConfirmButtonListener implements OnClickListener { + public void onClick(View v) { + activityResult(RESULT_OK, mDataEntry.getText().toString(), extras); + } + } + + private class CancelButtonListener implements OnClickListener { + public void onClick(View v) { + activityResult(RESULT_CANCELED, null, null); + } + } + + protected void activityResult(int result, String data, Bundle extras) { + setResult(result, (new Intent()).setAction(data).putExtras(extras)); + finish(); + } + + public boolean onKey(View v, int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER + || keyCode == KeyEvent.KEYCODE_ENTER) { + activityResult(RESULT_OK, mDataEntry.getText().toString(), extras); + return true; + } + return false; + } + + protected TextView mDataLabel; + protected EditText mDataEntry; + protected Button mConfirmButton; + protected Button mCancelButton; +} diff --git a/src/com/android/settings/BluetoothListItem.java b/src/com/android/settings/BluetoothListItem.java new file mode 100644 index 0000000..c75be13 --- /dev/null +++ b/src/com/android/settings/BluetoothListItem.java @@ -0,0 +1,72 @@ +package com.android.settings; + +import android.content.Context; +import android.preference.Preference; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; + +import java.util.Map; + +/** + * This class extends Preference to display bluetooth status icons. One + * icon specifies the connection/pairing status that is right-aligned. + * An optional headset icon can be added to its left as well. + */ +public class BluetoothListItem extends Preference { + + private boolean mIsHeadset; + private int mWeight; + + public BluetoothListItem(Context context, AttributeSet attrs) { + super(context, attrs); + setWidgetLayoutResource(R.layout.preference_widget_btdevice_status); + } + + private void updateIcons(View view) { + ImageView headsetView = (ImageView) view.findViewById(R.id.device_headset); + headsetView.setVisibility(mIsHeadset ? View.VISIBLE : View.GONE); + } + + @Override + public void onBindView(View view) { + super.onBindView(view); + updateIcons(view); + } + + /** + * Set whether the device is of headset type + * @param headset whether or not the headset icon should be shown + */ + public void setHeadset(boolean headset) { + mIsHeadset = headset; + notifyChanged(); + } + + /** + * Sets the weight for ordering by signal strength or importance + * @param weight the ordering weight + */ + public void setWeight(int weight) { + mWeight = weight; + } + + /** + * Returns the currently set ordering weight + * @return the current ordering weight + */ + public int getWeight() { + return mWeight; + } + + @Override + public int compareTo(Preference another) { + int diff = ((BluetoothListItem)another).mWeight - mWeight; + // Let the new one be after the old one, if they are the same weight + // TODO: Implement a more reliable way to consistently order items of + // the same weight + if (diff == 0) diff = 1; + return diff; + } +} diff --git a/src/com/android/settings/BluetoothPINEntry.java b/src/com/android/settings/BluetoothPINEntry.java new file mode 100644 index 0000000..8933c03 --- /dev/null +++ b/src/com/android/settings/BluetoothPINEntry.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.NotificationManager; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothIntent; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; + +public class BluetoothPINEntry extends BluetoothDataEntry { + private BluetoothDevice mBluetooth; + private String mAddress; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + Intent intent = getIntent(); + if (!intent.getAction().equals(BluetoothIntent.PAIRING_REQUEST_ACTION)) + { + Log.e(this.getClass().getName(), + "Error: this activity may be started only with intent " + + BluetoothIntent.PAIRING_REQUEST_ACTION); + finish(); + } + + // Cancel the notification, if any + NotificationManager manager = (NotificationManager) + getSystemService(Context.NOTIFICATION_SERVICE); + manager.cancel(0xb100ceee); + + mAddress = intent.getStringExtra(BluetoothIntent.ADDRESS); + + mBluetooth = (BluetoothDevice)getSystemService(BLUETOOTH_SERVICE); + + String remoteName = mBluetooth.getRemoteName(mAddress); + if (remoteName == null) { + remoteName = mAddress; + } + + mDataLabel.setText(getString(R.string.bluetooth_enter_pin_msg) + remoteName); + } + + @Override + public void activityResult(int result, String data, Bundle extras) { + switch (result) { + case RESULT_OK: + byte[] pin = BluetoothDevice.convertPinToBytes(mDataEntry.getText().toString()); + if (pin == null) { + return; + } + mBluetooth.setPin(mAddress, pin); + break; + case RESULT_CANCELED: + mBluetooth.cancelPin(mAddress); + break; + } + finish(); + } +} diff --git a/src/com/android/settings/BluetoothPinRequest.java b/src/com/android/settings/BluetoothPinRequest.java new file mode 100644 index 0000000..d6a12f3 --- /dev/null +++ b/src/com/android/settings/BluetoothPinRequest.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.app.Notification; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothIntent; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.res.Resources; + +/** + * This class handles the Bluetooth pairing PIN request from the bluetooth service + * It checks if the BluetoothSettings activity is currently visible and lets that + * activity handle the request. Otherwise it puts a Notification in the status bar, + * which can be clicked to bring up the PIN entry dialog. + */ +public class BluetoothPinRequest extends BroadcastReceiver { + + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals(BluetoothIntent.PAIRING_REQUEST_ACTION)) { + if (BluetoothSettings.isRunning()) { + // Let the BluetoothSettings activity handle it + return; + } else { + Resources res = context.getResources(); + String address = intent.getStringExtra(BluetoothIntent.ADDRESS); + Notification pair = new Notification( + android.R.drawable.stat_sys_data_bluetooth, + res.getString(R.string.bluetooth_notif_ticker), + System.currentTimeMillis()); + + Intent pinIntent = new Intent(); + pinIntent.setClass(context, BluetoothPINEntry.class); + pinIntent.putExtra(BluetoothIntent.ADDRESS, address); + pinIntent.setAction(BluetoothIntent.PAIRING_REQUEST_ACTION); + PendingIntent pending = PendingIntent.getActivity(context, 0, + pinIntent, PendingIntent.FLAG_ONE_SHOT); + + String name = intent.getStringExtra(BluetoothIntent.NAME); + + if (name == null) { + BluetoothDevice bluetooth = + (BluetoothDevice)context.getSystemService(Context.BLUETOOTH_SERVICE); + name = bluetooth.getRemoteName(address); + if (name == null) { + name = address; + } + } + + pair.setLatestEventInfo(context, + res.getString(R.string.bluetooth_notif_title), + res.getString(R.string.bluetooth_notif_message) + name, + pending); + + NotificationManager manager = (NotificationManager) + context.getSystemService(Context.NOTIFICATION_SERVICE); + manager.notify(0xb100ceee, pair); + } + } + } +} diff --git a/src/com/android/settings/BluetoothSettings.java b/src/com/android/settings/BluetoothSettings.java new file mode 100644 index 0000000..6a19ec4 --- /dev/null +++ b/src/com/android/settings/BluetoothSettings.java @@ -0,0 +1,1035 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.app.AlertDialog; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHeadset; +import android.bluetooth.BluetoothIntent; +import android.bluetooth.DeviceClass; +import android.bluetooth.IBluetoothDeviceCallback; +import android.bluetooth.IBluetoothHeadsetCallback; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.content.SharedPreferences.OnSharedPreferenceChangeListener; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.os.SystemProperties; +import android.preference.CheckBoxPreference; +import android.preference.EditTextPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.provider.Settings; +import android.text.method.PasswordTransformationMethod; +import android.util.Log; +import android.view.ContextMenu; +import android.view.KeyEvent; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ContextMenu.ContextMenuInfo; +import android.view.View.OnKeyListener; +import android.widget.AdapterView; +import android.widget.EditText; +import android.widget.Toast; +import android.widget.AdapterView.AdapterContextMenuInfo; + +import java.util.HashMap; + +public class BluetoothSettings + extends PreferenceActivity + implements OnSharedPreferenceChangeListener, OnKeyListener, + View.OnCreateContextMenuListener { + + private static final String TAG = "BluetoothSettings"; + + private static final int MENU_SCAN_ID = Menu.FIRST; + private static final int MENU_CLEAR_ID = Menu.FIRST + 1; + + private static final int MENU_CONNECT = ContextMenu.FIRST; + private static final int MENU_DISCONNECT = ContextMenu.FIRST + 1; + private static final int MENU_PAIR = ContextMenu.FIRST + 2; + private static final int MENU_UNPAIR = ContextMenu.FIRST + 3; + + private static final String BT_ENABLE = "bt_checkbox"; + private static final String BT_VISIBILITY = "bt_visibility"; + private static final String BT_NAME = "bt_name"; + + private static final String BT_KEY_PREFIX = "bt_dev_"; + private static final int BT_KEY_LENGTH = BT_KEY_PREFIX.length(); + private static final String FREEZE_ADDRESSES = "addresses"; + private static final String FREEZE_TYPES = "types"; + private static final String FREEZE_PIN = "pinText"; + private static final String FREEZE_PIN_ADDRESS = "pinAddress"; + private static final String FREEZE_RSSI = "rssi"; + private static final String FREEZE_DISCOVERABLE_START = "dstart"; + + private static final int HANDLE_FAILED_TO_CONNECT = 1; + private static final int HANDLE_CONNECTING = 2; + private static final int HANDLE_CONNECTED = 3; + private static final int HANDLE_DISCONNECTED = 4; + private static final int HANDLE_PIN_REQUEST = 5; + private static final int HANDLE_DISCOVERABLE_TIMEOUT = 6; + private static final int HANDLE_INITIAL_SCAN = 7; + private static final int HANDLE_PAIRING_FAILED = 8; + private static final int HANDLE_PAIRING_PASSED = 9; + private static final int HANDLE_PAUSE_TIMEOUT = 10; + + + + private static String STR_CONNECTED; + private static String STR_PAIRED; + private static String STR_PAIRED_NOT_NEARBY; + private static String STR_NOT_CONNECTED; + private static String STR_CONNECTING; + private static String STR_PAIRING; + + private static final int WEIGHT_CONNECTED = 1; + private static final int WEIGHT_PAIRED = 0; + private static final int WEIGHT_UNKNOWN = -1; + + private CheckBoxPreference mBTToggle; + private CheckBoxPreference mBTVisibility; + private EditTextPreference mBTName; + private ProgressCategory mBTDeviceList; + private AlertDialog mPinDialog; + private String mPinAddress; + private EditText mPinEdit; + private View mPinButton1; + private String mDisconnectAddress; + + private BluetoothDevice mBluetooth; + private BluetoothHeadset mBluetoothHeadset; + private boolean mIsEnabled; + private String mLastConnected; + private static boolean sIsRunning; + private static DeviceCallback sDeviceCallback; + private IntentFilter mIntentFilter; + private Resources mRes; + private long mDiscoverableStartTime; + private int mDiscoverableTime; + private static final String DISCOVERABLE_TIME = "debug.bt.discoverable_time"; + private static final int DISCOVERABLE_TIME_DEFAULT = 120; + private boolean mAutoDiscovery; + // After a few seconds after a pause, if the user doesn't restart the + // BT settings, then we need to cleanup a few things in the message handler + private static final int PAUSE_TIMEOUT = 3000; + + private boolean mStartScan; + private static final String AUTO_DISCOVERY = "debug.bt.auto_discovery"; + private HashMap<String,Preference> mDeviceMap; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.bluetooth_settings); + + // Deal with restarted activities by passing a static callback object to + // the Bluetooth service + if (sDeviceCallback == null) { + sDeviceCallback = new DeviceCallback(); + } + sDeviceCallback.setHandler(mHandler); + + mDiscoverableTime = SystemProperties.getInt(DISCOVERABLE_TIME, -1); + if (mDiscoverableTime <= 0) { + mDiscoverableTime= DISCOVERABLE_TIME_DEFAULT; + } + mAutoDiscovery = SystemProperties.getBoolean(AUTO_DISCOVERY, true); + + if (!initBluetoothAPI()) { + finish(); + return; + } + initUI(); + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); + + mDeviceMap = new HashMap<String,Preference>(); + if (icicle != null && icicle.containsKey(FREEZE_ADDRESSES)) { + addDevices(icicle.getStringArray(FREEZE_ADDRESSES), + icicle.getStringArray(FREEZE_TYPES), + icicle.getIntArray(FREEZE_RSSI)); + if (icicle.containsKey(FREEZE_PIN)) { + String savedPin = icicle.getString(FREEZE_PIN); + String pinAddress = icicle.getString(FREEZE_PIN_ADDRESS); + mPinDialog = showPinDialog(savedPin, pinAddress); + } + mDiscoverableStartTime = icicle.getLong(FREEZE_DISCOVERABLE_START); + } else { + mStartScan = true; + } + } + + private void initUI() { + mBTToggle = (CheckBoxPreference) findPreference(BT_ENABLE); + mBTVisibility = (CheckBoxPreference) findPreference(BT_VISIBILITY); + mBTName = (EditTextPreference) findPreference(BT_NAME); + mBTDeviceList = (ProgressCategory) findPreference("bt_device_list"); + mBTDeviceList.setOrderingAsAdded(false); + mRes = getResources(); + if (mIsEnabled) { + String name = mBluetooth.getName(); + if (name != null) { + mBTName.setSummary(name); + } + } + mBTVisibility.setEnabled(mIsEnabled); + mBTName.setEnabled(mIsEnabled); + STR_CONNECTED = mRes.getString(R.string.bluetooth_connected); + STR_PAIRED = mRes.getString(R.string.bluetooth_paired); + STR_PAIRED_NOT_NEARBY = + mRes.getString(R.string.bluetooth_paired_not_nearby); + STR_CONNECTING = mRes.getString(R.string.bluetooth_connecting); + STR_PAIRING = mRes.getString(R.string.bluetooth_pairing); + STR_NOT_CONNECTED = mRes.getString(R.string.bluetooth_not_connected); + getListView().setOnCreateContextMenuListener(this); + } + + private boolean initBluetoothAPI() { + mIntentFilter = + new IntentFilter(BluetoothIntent.REMOTE_DEVICE_CONNECTED_ACTION); + mIntentFilter.addAction(BluetoothIntent.REMOTE_DEVICE_DISCONNECTED_ACTION); + mIntentFilter.addAction(BluetoothIntent.BONDING_CREATED_ACTION); + mIntentFilter.addAction(BluetoothIntent.ENABLED_ACTION); + mIntentFilter.addAction(BluetoothIntent.DISABLED_ACTION); + mIntentFilter.addAction(BluetoothIntent.REMOTE_DEVICE_FOUND_ACTION); + mIntentFilter.addAction(BluetoothIntent.REMOTE_DEVICE_DISAPPEARED_ACTION); + mIntentFilter.addAction(BluetoothIntent.REMOTE_NAME_UPDATED_ACTION); + mIntentFilter.addAction(BluetoothIntent.PAIRING_REQUEST_ACTION); + mIntentFilter.addAction(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION); + mIntentFilter.addAction(BluetoothIntent.DISCOVERY_COMPLETED_ACTION); + mIntentFilter.addAction(BluetoothIntent.DISCOVERY_STARTED_ACTION); + mIntentFilter.addAction(BluetoothIntent.MODE_CHANGED_ACTION); + + mBluetooth = (BluetoothDevice)getSystemService(BLUETOOTH_SERVICE); + mBluetoothHeadset = new BluetoothHeadset(this); + if (mBluetooth == null) { // If the environment doesn't support BT + return false; + } + mIsEnabled = mBluetooth.isEnabled(); + return true; + } + + @Override + protected void onResume() { + super.onResume(); + + sIsRunning = true; + mHandler.removeMessages(HANDLE_PAUSE_TIMEOUT); + registerReceiver(mReceiver, mIntentFilter); + + mIsEnabled = mBluetooth.isEnabled(); + updateStatus(); + final boolean discoverable = mBluetooth.getMode() == + BluetoothDevice.MODE_DISCOVERABLE; + mBTDeviceList.setProgress(mIsEnabled && mBluetooth.isDiscovering()); + mBTVisibility.setChecked(mIsEnabled && discoverable); + + if (discoverable) { + mHandler.sendMessage( + mHandler.obtainMessage(HANDLE_DISCOVERABLE_TIMEOUT)); + } + + if (mIsEnabled && mStartScan) { + // First attempt after 100ms + mHandler.sendMessageDelayed( + mHandler.obtainMessage(HANDLE_INITIAL_SCAN, 1), 100); + } + mStartScan = false; + + // Check if headset status changed since we paused + String connected = mBluetoothHeadset.getHeadsetAddress(); + if (connected != null) { + updateRemoteDeviceStatus(connected); + } + if (mLastConnected != null) { + updateRemoteDeviceStatus(mLastConnected); + } + } + + @Override + protected void onPause() { + sIsRunning = false; + + unregisterReceiver(mReceiver); + + // Wait for a few seconds and cleanup any pending requests, states + mHandler.sendMessageDelayed( + mHandler.obtainMessage(HANDLE_PAUSE_TIMEOUT, + new Object[] { mBluetooth, mPinAddress }), + PAUSE_TIMEOUT); + super.onPause(); + } + + @Override + protected void onDestroy() { + mBluetoothHeadset.close(); + sDeviceCallback.setHandler(null); + + super.onDestroy(); + } + + @Override + public void onConfigurationChanged(Configuration c) { + super.onConfigurationChanged(c); + // Don't do anything on keyboardHidden/orientation change, as we need + // to make sure that we don't lose pairing request intents. + } + + public static boolean isRunning() { + return sIsRunning; + } + + @Override + protected void onSaveInstanceState(Bundle icicle) { + int deviceCount = mBTDeviceList.getPreferenceCount(); + String [] addresses = new String[deviceCount]; + String [] states = new String[deviceCount]; + int [] weights = new int[deviceCount]; + for (int i = 0; i < deviceCount; i++) { + BluetoothListItem p = (BluetoothListItem) mBTDeviceList.getPreference(i); + CharSequence summary = p.getSummary(); + if (summary != null) { + states[i] = summary.toString(); + } else { + states[i] = STR_NOT_CONNECTED; + } + addresses[i] = getAddressFromKey(p.getKey()); + weights[i] = p.getWeight(); + } + icicle.putStringArray(FREEZE_ADDRESSES, addresses); + icicle.putStringArray(FREEZE_TYPES, states); + icicle.putIntArray(FREEZE_RSSI, weights); + icicle.putLong(FREEZE_DISCOVERABLE_START, mDiscoverableStartTime); + if (mPinDialog != null && mPinDialog.isShowing()) { + icicle.putString(FREEZE_PIN, mPinEdit.getText().toString()); + icicle.putString(FREEZE_PIN_ADDRESS, mPinAddress); + } + super.onSaveInstanceState(icicle); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); + menu.add(0, MENU_SCAN_ID, 0, + mRes.getString(R.string.bluetooth_scan_for_devices)) + .setIcon(R.drawable.ic_menu_scan_bluetooth); + menu.add(0, MENU_CLEAR_ID, 0, + mRes.getString(R.string.bluetooth_clear_list)) + .setIcon(android.R.drawable.ic_menu_close_clear_cancel); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case MENU_SCAN_ID: + startScanning(); + return true; + case MENU_CLEAR_ID: + clearDevices(); + return true; + } + return super.onOptionsItemSelected(item); + } + + @Override + public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) { + if (!(menuInfo instanceof AdapterContextMenuInfo)) { + return; + } + int position = ((AdapterContextMenuInfo)menuInfo).position; + Preference pref = (Preference) getPreferenceScreen().getRootAdapter().getItem(position); + if (!(pref instanceof BluetoothListItem)) { + return; + } + String address = getAddressFromKey(pref.getKey()); + // Setup the menu header + String name = mBluetooth.getRemoteName(address); + menu.setHeaderTitle(name != null? name : address); + int n = 0; + if (mBluetoothHeadset.isConnected(address)) { + menu.add(0, MENU_DISCONNECT, n++, R.string.bluetooth_disconnect); + } else { + menu.add(0, MENU_CONNECT, n++, R.string.bluetooth_connect); + } + if (mBluetooth.hasBonding(address)) { + menu.add(0, MENU_UNPAIR, n++, R.string.bluetooth_unpair); + } else { + menu.add(0, MENU_PAIR, n++, R.string.bluetooth_pair); + } + } + + @Override + public boolean onContextItemSelected(MenuItem item) { + AdapterView.AdapterContextMenuInfo info; + if (!(item.getMenuInfo() instanceof AdapterContextMenuInfo)) { + return false; + } + info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); + Preference pref = (Preference) getPreferenceScreen().getRootAdapter(). + getItem(info.position); + String address = getAddressFromKey(pref.getKey()); + mBluetooth.cancelDiscovery(); + switch (item.getItemId()) { + case MENU_DISCONNECT: + if (mBluetoothHeadset.isConnected(address)) { + mBluetoothHeadset.disconnectHeadset(); + } + break; + case MENU_CONNECT: + if (!mBluetoothHeadset.isConnected(address)) { + updateRemoteDeviceStatus(address, STR_CONNECTING); + connect(pref, address); + } + break; + case MENU_UNPAIR: + if (mBluetooth.hasBonding(address)) { + mBluetooth.removeBonding(address); + updateRemoteDeviceStatus(address); + } + break; + case MENU_PAIR: + if (!mBluetooth.hasBonding(address)) { + pair(pref, address); + } + break; + } + return true; + } + + private void startScanning() { + if (mIsEnabled && mBluetooth.isDiscovering()) { + return; + } + resetDeviceListUI(); + if (mIsEnabled) { + mBluetooth.startDiscovery(); + } + } + + private void clearDevices() { + String [] addresses = mBluetooth.listBondings(); + if (addresses != null) { + for (int i = 0; i < addresses.length; i++) { + unbond(addresses[i]); + } + } + resetDeviceListUI(); + } + + /* Update the Bluetooth toggle and visibility summary */ + private void updateStatus() { + boolean started = mIsEnabled; + mBTToggle.setChecked(started); + } + + private void updateRemoteDeviceStatus(String address) { + if (address != null) { + Preference device = mDeviceMap.get(address); + if (device == null) { + // This device is not in our discovered list + // Let's add the device, if BT is not shut down already + if (mIsEnabled) { + addDeviceToUI(address, null, null, WEIGHT_PAIRED); + } + return; + } + device.setEnabled(true); + if (address.equals(mBluetoothHeadset.getHeadsetAddress())) { + int state = mBluetoothHeadset.getState(); + switch (state) { + case BluetoothHeadset.STATE_CONNECTED: + device.setSummary(STR_CONNECTED); + mLastConnected = address; + break; + case BluetoothHeadset.STATE_CONNECTING: + device.setSummary(STR_CONNECTING); + break; + case BluetoothHeadset.STATE_DISCONNECTED: + if (mBluetooth.hasBonding(address)) { + device.setSummary(STR_PAIRED); + } + break; + } + } else if (mBluetooth.hasBonding(address)) { + device.setSummary(STR_PAIRED); + } else { + device.setSummary(STR_NOT_CONNECTED); + } + } + } + + private void updateRemoteDeviceStatus(String address, String summary) { + Preference device = mDeviceMap.get(address); + if (device != null) { + device.setEnabled(true); + device.setSummary(summary); + } + } + + public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (key.equals(BT_NAME)) { + String name = sharedPreferences.getString(key, null); + if (name == null) { + return; + } + if (mBluetooth.setName(name)) { + mBTName.setSummary(name); + } + } + } + + private String getAddressFromKey(String key) { + if (key != null) { + return key.substring(BT_KEY_LENGTH); + } + return ""; + } + + private void sendPin(String pin) { + byte[] pinBytes = BluetoothDevice.convertPinToBytes(pin); + if (pinBytes == null) { + mBluetooth.cancelPin(mPinAddress); + } else { + mBluetooth.setPin(mPinAddress, pinBytes); + } + mPinAddress = null; + } + + private AlertDialog showPinDialog(String savedPin, String pinAddress) { + if (mPinDialog != null) { + return mPinDialog; + } + View view = LayoutInflater.from(this).inflate( + R.layout.bluetooth_pin_entry, null); + mPinEdit = (EditText) view.findViewById(R.id.text); + mPinEdit.setTransformationMethod(PasswordTransformationMethod.getInstance()); + mPinEdit.setOnKeyListener(this); + mPinAddress = pinAddress; + + if (savedPin != null) { + mPinEdit.setText(savedPin); + } + + String remoteName = mBluetooth.getRemoteName(mPinAddress); + if (remoteName == null) { + remoteName = mPinAddress; + } + + AlertDialog ad = new AlertDialog.Builder(this) + .setTitle(getString(R.string.bluetooth_notif_title)) + .setMessage(getString(R.string.bluetooth_enter_pin_msg) + remoteName) + .setView(view) + .setPositiveButton(android.R.string.ok, mDisconnectListener) + .setNegativeButton(android.R.string.cancel, mDisconnectListener) + .setOnCancelListener(mCancelListener) + .show(); + ad.setCanceledOnTouchOutside(false); + // Making an assumption here that the dialog buttons have the ids starting + // with ...button1 as below + mPinButton1 = ad.findViewById(com.android.internal.R.id.button1); + if (mPinButton1 != null) { + mPinButton1.setEnabled(savedPin != null? savedPin.length() > 0 : false); + } + return ad; + } + + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mBTToggle) { + toggleBT(); + return false; + } else if (preference == mBTVisibility) { + boolean vis = mBTVisibility.isChecked(); + if (!vis) { + // Cancel discoverability + mBluetooth.setMode(BluetoothDevice.MODE_CONNECTABLE); + mHandler.removeMessages(HANDLE_DISCOVERABLE_TIMEOUT); + } else { + mBluetooth.setMode(BluetoothDevice.MODE_DISCOVERABLE); + mBTVisibility.setSummaryOn( + getResources().getString(R.string.bluetooth_is_discoverable, + String.valueOf(mDiscoverableTime))); + mDiscoverableStartTime = SystemClock.elapsedRealtime(); + mHandler.sendMessageDelayed( + mHandler.obtainMessage(HANDLE_DISCOVERABLE_TIMEOUT), 1000); + } + } else { + String key = preference.getKey(); + if (key.startsWith(BT_KEY_PREFIX)) { + // Extract the device address from the key + String address = getAddressFromKey(key); + if (mBluetoothHeadset.isConnected(address)) { + askDisconnect(address); + } else if (mBluetooth.hasBonding(address)) { + if (mIsEnabled) { + mBluetooth.cancelDiscovery(); + } + updateRemoteDeviceStatus(address, STR_CONNECTING); + connect(preference, address); + } else { + if (mIsEnabled) { + mBluetooth.cancelDiscovery(); + } + pair(preference, address); + } + } + } + return false; + } + + /* Handle the key input to the PIN entry dialog */ + public boolean onKey(View v, int keyCode, KeyEvent event) { + + if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER + || keyCode == KeyEvent.KEYCODE_ENTER) { + String pin = ((EditText)v).getText().toString(); + if (pin != null && pin.length() > 0) { + sendPin(pin); + mPinDialog.dismiss(); + return true; + } + } else if (mPinButton1 != null) { + boolean valid = + BluetoothDevice.convertPinToBytes(((EditText)v).getText().toString()) != null; + mPinButton1.setEnabled(valid); + } + return false; + } + + private void askDisconnect(String address) { + String name = mBluetooth.getRemoteName(address); + if (name == null) { + name = mRes.getString(R.string.bluetooth_device); + } + String message = mRes.getString(R.string.bluetooth_disconnect_blank, name); + + mDisconnectAddress = address; + + AlertDialog ad = new AlertDialog.Builder(this) + .setTitle(message) + .setPositiveButton(android.R.string.ok, mDisconnectListener) + .setNegativeButton(android.R.string.cancel, null) + .show(); + ad.setCanceledOnTouchOutside(false); + + } + + private void pairingDone(String address, boolean result) { + Preference pref = mDeviceMap.get(address); + if (pref != null) { + pref.setEnabled(true); + updateRemoteDeviceStatus(address); + } else if (result) { + // We've paired to a device that isn't in our list + addDeviceToUI(address, STR_PAIRED, mBluetooth.getRemoteName(address), + WEIGHT_PAIRED); + } + } + + private void pair(Preference pref, String address) { + pref.setEnabled(false); + pref.setSummary(STR_PAIRING); + mBluetooth.createBonding(address, sDeviceCallback); + } + + private void connect(Preference pref, String address) { + pref.setEnabled(false); + //TODO: Prompt the user to confirm they will disconnect current headset + disconnect(); + mBluetoothHeadset.connectHeadset(address, mHeadsetCallback); + } + + private void disconnect() { + int state = mBluetoothHeadset.getState(); + if (state == BluetoothHeadset.STATE_CONNECTING || + state == BluetoothHeadset.STATE_CONNECTED) { + mBluetoothHeadset.disconnectHeadset(); + } + } + + private void toggleBT() { + if (mIsEnabled) { + mBTToggle.setSummaryOn(mRes.getString(R.string.bluetooth_stopping)); + mBTDeviceList.setProgress(false); + // Force shutdown. + mBluetooth.cancelDiscovery(); + mBluetooth.disable(); + } else { + mBTToggle.setSummaryOff(mRes.getString(R.string.bluetooth_enabling)); + mBTToggle.setChecked(false); + mBTToggle.setEnabled(false); + if (!mBluetooth.enable()) { + mBTToggle.setEnabled(true); + } + } + } + + private void addDeviceToUI(String address, String summary, String name, + int rssi) { + + if (address == null) { + return; + } + + BluetoothListItem p; + if (mDeviceMap.containsKey(address)) { + p = (BluetoothListItem) mDeviceMap.get(address); + if (summary != null && summary.equals(STR_NOT_CONNECTED)) { + if (mBluetooth.hasBonding(address)) { + summary = STR_PAIRED; + } + } + CharSequence oldSummary = p.getSummary(); + if (oldSummary != null && oldSummary.equals(STR_CONNECTED)) { + summary = STR_CONNECTED; // Don't override connected with paired + mLastConnected = address; + } + } else { + p = new BluetoothListItem(this, null); + } + if (name == null) { + name = mBluetooth.getRemoteName(address); + } + if (name == null) { + name = address; + } + + p.setTitle(name); + p.setSummary(summary); + p.setKey(BT_KEY_PREFIX + address); + // Enable the headset icon if it is most probably a headset class device + if (DeviceClass.getMajorClass(mBluetooth.getRemoteClass(address)) == + DeviceClass.MAJOR_CLASS_AUDIO_VIDEO) { + p.setHeadset(true); + } + p.setWeight(rssi); + if (!mDeviceMap.containsKey(address)) { + mBTDeviceList.addPreference(p); + mDeviceMap.put(address, p); + } + } + + private void addDevices(String [] addresses, + String[] deviceStatus, int[] rssi) { + for (int i = 0; i < addresses.length; i++) { + String status = deviceStatus[i]; + String name = mBluetooth.getRemoteName(addresses[i]); + String address = addresses[i]; + // Query the status if it's not known + if (status == null) { + if (mBluetoothHeadset.isConnected(addresses[i])) { + status = STR_CONNECTED; + mLastConnected = address; + } else if (mBluetooth.hasBonding(addresses[i])) { + status = STR_PAIRED; + } else { + status = STR_NOT_CONNECTED; + } + } + addDeviceToUI(address, status, name, rssi[i]); + } + } + + private void removeDeviceFromUI(String address) { + Preference p = mDeviceMap.get(address); + if (p == null) { + return; + } + mBTDeviceList.removePreference(p); + mDeviceMap.remove(address); + } + + private void updateDeviceName(String address, String name) { + Preference p = mDeviceMap.get(address); + if (p != null) { + p.setTitle(name); + } + } + + private void resetDeviceListUI() { + mDeviceMap.clear(); + + while (mBTDeviceList.getPreferenceCount() > 0) { + mBTDeviceList.removePreference(mBTDeviceList.getPreference(0)); + } + if (!mIsEnabled) { + return; + } + + String connectedDevice = mBluetoothHeadset.getHeadsetAddress(); + if (connectedDevice != null && mBluetoothHeadset.isConnected(connectedDevice)) { + addDeviceToUI(connectedDevice, STR_CONNECTED, + mBluetooth.getRemoteName(connectedDevice), WEIGHT_CONNECTED); + } + String [] bondedDevices = mBluetooth.listBondings(); + if (bondedDevices != null) { + for (int i = 0; i < bondedDevices.length; i++) { + addDeviceToUI(bondedDevices[i], STR_PAIRED_NOT_NEARBY, + mBluetooth.getRemoteName(bondedDevices[i]), WEIGHT_PAIRED); + } + } + } + + private void unbond(String address) { + mBluetooth.removeBonding(address); + } + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + String address = intent.getStringExtra(BluetoothIntent.ADDRESS); + if (action.equals(BluetoothIntent.ENABLED_ACTION)) { + mIsEnabled = true; + mBTToggle.setChecked(true); + mBTToggle.setSummaryOn(mRes.getString(R.string.bluetooth_enabled)); + mBTToggle.setEnabled(true); + String name = mBluetooth.getName(); + if (name != null) { + mBTName.setSummary(name); + } + // save the "enabled" setting to database, so we can + // remember it on startup. + Settings.System.putInt(getContentResolver(), + Settings.System.BLUETOOTH_ON, 1); + resetDeviceListUI(); + if (mAutoDiscovery) { + mBluetooth.startDiscovery(); + } + } else if (action.equals(BluetoothIntent.DISABLED_ACTION)) { + mIsEnabled = false; + mBTToggle.setSummaryOff(mRes.getString(R.string.bluetooth_disabled)); + resetDeviceListUI(); + mBTVisibility.setChecked(false); + // save the "disabled" setting to database + Settings.System.putInt(getContentResolver(), + Settings.System.BLUETOOTH_ON, 0); + } else if (action.equals(BluetoothIntent.REMOTE_DEVICE_FOUND_ACTION)) { + if (address != null) { + int rssi = intent.getShortExtra(BluetoothIntent.RSSI, + (short) WEIGHT_UNKNOWN); + addDeviceToUI(address, STR_NOT_CONNECTED, null, rssi); + } + } else if (action.equals(BluetoothIntent.REMOTE_NAME_UPDATED_ACTION)) { + String name = intent.getStringExtra(BluetoothIntent.NAME); + updateDeviceName(address, name); + } else if (action.equals(BluetoothIntent.REMOTE_DEVICE_DISAPPEARED_ACTION)) { + removeDeviceFromUI(address); + } else if (action.equals(BluetoothIntent.PAIRING_REQUEST_ACTION)) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_PIN_REQUEST, address)); + } else if (action.equals(BluetoothIntent.HEADSET_STATE_CHANGED_ACTION)) { + int state = intent.getIntExtra(BluetoothIntent.HEADSET_STATE, + BluetoothHeadset.STATE_ERROR); + if (state == BluetoothHeadset.STATE_CONNECTED) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_CONNECTED, address)); + } else if (state == BluetoothHeadset.STATE_DISCONNECTED) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISCONNECTED, address)); + } else if (state == BluetoothHeadset.STATE_CONNECTING) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_CONNECTING, address)); + } + } else if (action.equals(BluetoothIntent.DISCOVERY_STARTED_ACTION)) { + mBTDeviceList.setProgress(true); + } else if (action.equals(BluetoothIntent.DISCOVERY_COMPLETED_ACTION)) { + mBTDeviceList.setProgress(false); + } else if (action.equals(BluetoothIntent.MODE_CHANGED_ACTION)) { + mBTVisibility.setChecked( + mBluetooth.getMode() == BluetoothDevice.MODE_DISCOVERABLE); + } else if (action.equals(BluetoothIntent.BONDING_CREATED_ACTION)) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_PAIRING_PASSED, address)); + } else if (action.equals(BluetoothIntent.REMOTE_DEVICE_CONNECTED_ACTION)) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_CONNECTED, address)); + } else if (action.equals(BluetoothIntent.REMOTE_DEVICE_DISCONNECTED_ACTION)) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISCONNECTED, address)); + } + } + }; + + + static class DeviceCallback extends IBluetoothDeviceCallback.Stub { + Handler messageHandler; + + public void setHandler(Handler handler) { + synchronized (this) { + messageHandler = handler; + } + } + + public void onCreateBondingResult(String address, int result) { + synchronized (this) { + if (messageHandler != null) { + if (result == BluetoothDevice.RESULT_FAILURE) { + messageHandler.sendMessage(messageHandler.obtainMessage( + HANDLE_PAIRING_FAILED, address)); + } else { + messageHandler.sendMessage(messageHandler.obtainMessage( + HANDLE_PAIRING_PASSED, address)); + } + } + } + } + + public void onEnableResult(int result) { } + public void onGetRemoteServiceChannelResult(String address, int channel) { } + }; + + private IBluetoothHeadsetCallback mHeadsetCallback = new IBluetoothHeadsetCallback.Stub() { + public void onConnectHeadsetResult(String address, int resultCode) { + if (resultCode == BluetoothHeadset.RESULT_SUCCESS) { + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_CONNECTED, address)); + } else { + // Make toast in UI thread + mHandler.sendMessage(mHandler.obtainMessage(HANDLE_FAILED_TO_CONNECT, resultCode, + -1, address)); + } + } + }; + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case HANDLE_CONNECTED: + case HANDLE_DISCONNECTED: + case HANDLE_CONNECTING: + updateRemoteDeviceStatus((String) msg.obj); + break; + case HANDLE_FAILED_TO_CONNECT: + updateRemoteDeviceStatus((String) msg.obj); + String name = mBluetooth.getRemoteName((String) msg.obj); + if (name == null) { + name = (String) msg.obj; + } + if (msg.arg1 == BluetoothHeadset.RESULT_FAILURE) { + Toast.makeText(BluetoothSettings.this, + mRes.getString(R.string.failed_to_connect, name), + Toast.LENGTH_SHORT).show(); + } + break; + case HANDLE_PIN_REQUEST: + mPinDialog = showPinDialog(null, (String) msg.obj); + break; + case HANDLE_DISCOVERABLE_TIMEOUT: + long nowTime = SystemClock.elapsedRealtime(); + int secondsLeft = mDiscoverableTime + - (int) (nowTime - mDiscoverableStartTime) / 1000; + if (secondsLeft > 0) { + mBTVisibility.setSummaryOn( + getResources().getString(R.string.bluetooth_is_discoverable, + String.valueOf(secondsLeft))); + sendMessageDelayed(obtainMessage(HANDLE_DISCOVERABLE_TIMEOUT), 1000); + } else { + mBluetooth.setMode(BluetoothDevice.MODE_CONNECTABLE); + mBTVisibility.setChecked(false); + } + break; + case HANDLE_INITIAL_SCAN: + if (mBluetoothHeadset.getState() == BluetoothHeadset.STATE_ERROR && + ((Integer)msg.obj).intValue() < 2) { + // Second attempt after another 100ms + sendMessageDelayed(obtainMessage(HANDLE_INITIAL_SCAN, 2), 100); + } else { + resetDeviceListUI(); + if (mAutoDiscovery) { + mBluetooth.cancelDiscovery(); + mBluetooth.startDiscovery(); + } + } + break; + case HANDLE_PAIRING_PASSED: + String addr = (String) msg.obj; + pairingDone(addr, true); + break; + case HANDLE_PAIRING_FAILED: + String address = (String) msg.obj; + pairingDone(address, false); + String pairName = mBluetooth.getRemoteName(address); + if (pairName == null) { + pairName = address; + } + Toast.makeText(BluetoothSettings.this, + mRes.getString(R.string.failed_to_pair, pairName), + Toast.LENGTH_SHORT).show(); + break; + case HANDLE_PAUSE_TIMEOUT: + // Possibility of race condition, but not really harmful + if (!sIsRunning) { + Object[] params = (Object[]) msg.obj; + BluetoothDevice bluetooth = (BluetoothDevice) params[0]; + if (bluetooth.isEnabled()) { + if (bluetooth.isDiscovering()) { + bluetooth.cancelDiscovery(); + } + if (params[1] != null) { + bluetooth.cancelBondingProcess((String) params[1]); + } + bluetooth.setMode(BluetoothDevice.MODE_CONNECTABLE); + } + } + break; + } + } + }; + + private DialogInterface.OnClickListener mDisconnectListener = + new DialogInterface.OnClickListener() { + + public void onClick(DialogInterface dialog, int which) { + if (dialog == mPinDialog) { + if (which == DialogInterface.BUTTON1) { + String pin = mPinEdit.getText().toString(); + if (pin != null && pin.length() > 0) { + sendPin(pin); + } else { + sendPin(null); + } + } else { + sendPin(null); + } + mPinDialog = null; + mPinEdit = null; + } else { + if (which == DialogInterface.BUTTON1) { + disconnect(); + } + } + } + }; + + private DialogInterface.OnCancelListener mCancelListener = + new DialogInterface.OnCancelListener() { + public void onCancel(DialogInterface dialog) { + if (dialog == mPinDialog) { + sendPin(null); + } + mPinDialog = null; + mPinEdit = null; + } + }; +} + diff --git a/src/com/android/settings/BrightnessPreference.java b/src/com/android/settings/BrightnessPreference.java new file mode 100644 index 0000000..a9851cc --- /dev/null +++ b/src/com/android/settings/BrightnessPreference.java @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.os.RemoteException; +import android.os.IHardwareService; +import android.os.ServiceManager; +import android.preference.SeekBarPreference; +import android.provider.Settings; +import android.provider.Settings.SettingNotFoundException; +import android.util.AttributeSet; +import android.util.Log; +import android.view.View; +import android.widget.SeekBar; + +import java.util.Map; + +public class BrightnessPreference extends SeekBarPreference implements + SeekBar.OnSeekBarChangeListener { + + private SeekBar mSeekBar; + + private int mOldBrightness; + + // Backlight range is from 0 - 255. Need to make sure that user + // doesn't set the backlight to 0 and get stuck + private static final int MINIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_DIM + 10; + private static final int MAXIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_ON; + + public BrightnessPreference(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onBindDialogView(View view) { + super.onBindDialogView(view); + + mSeekBar = getSeekBar(view); + mSeekBar.setOnSeekBarChangeListener(this); + mSeekBar.setMax(MAXIMUM_BACKLIGHT - MINIMUM_BACKLIGHT); + try { + mOldBrightness = Settings.System.getInt(getContext().getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS); + } catch (SettingNotFoundException snfe) { + mOldBrightness = MAXIMUM_BACKLIGHT; + } + mSeekBar.setProgress(mOldBrightness - MINIMUM_BACKLIGHT); + } + + public void onProgressChanged(SeekBar seekBar, int progress, + boolean fromTouch) { + setBrightness(progress + MINIMUM_BACKLIGHT); + } + + public void onStartTrackingTouch(SeekBar seekBar) { + // NA + } + + public void onStopTrackingTouch(SeekBar seekBar) { + // NA + } + + @Override + protected void onDialogClosed(boolean positiveResult) { + super.onDialogClosed(positiveResult); + + if (positiveResult) { + Settings.System.putInt(getContext().getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS, + mSeekBar.getProgress() + MINIMUM_BACKLIGHT); + } else { + setBrightness(mOldBrightness); + } + } + + private void setBrightness(int brightness) { + try { + IHardwareService hardware = IHardwareService.Stub.asInterface( + ServiceManager.getService("hardware")); + if (hardware != null) { + hardware.setScreenBacklight(brightness); + } + } catch (RemoteException doe) { + + } + } +} + diff --git a/src/com/android/settings/ChooseLockPattern.java b/src/com/android/settings/ChooseLockPattern.java new file mode 100644 index 0000000..973e655 --- /dev/null +++ b/src/com/android/settings/ChooseLockPattern.java @@ -0,0 +1,480 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import com.google.android.collect.Lists; + +import com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient; +import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternView; +import static com.android.internal.widget.LockPatternView.DisplayMode; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.KeyEvent; +import android.view.View; +import android.view.Window; +import android.widget.TextView; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * If the user has a lock pattern set already, makes them confirm the existing one. + * + * Then, prompts the user to choose a lock pattern: + * - prompts for initial pattern + * - asks for confirmation / restart + * - saves chosen password when confirmed + */ +public class ChooseLockPattern extends Activity implements View.OnClickListener{ + + // how long after a confirmation message is shown before moving on + static final int INFORMATION_MSG_TIMEOUT_MS = 3000; + + // how long we wait to clear a wrong pattern + private static final int WRONG_PATTERN_CLEAR_TIMEOUT_MS = 2000; + + private static final int ID_EMPTY_MESSAGE = -1; + + + protected TextView mHeaderText; + protected LockPatternView mLockPatternView; + protected TextView mFooterText; + private TextView mFooterLeftButton; + private TextView mFooterRightButton; + + protected List<LockPatternView.Cell> mChosenPattern = null; + + protected LockPatternUtils mLockPatternUtils; + + /** + * The patten used during the help screen to show how to draw a pattern. + */ + private final List<LockPatternView.Cell> mAnimatePattern = + Collections.unmodifiableList( + Lists.newArrayList( + LockPatternView.Cell.of(0, 0), + LockPatternView.Cell.of(0, 1), + LockPatternView.Cell.of(1, 1), + LockPatternView.Cell.of(2, 1) + )); + + + /** + * The pattern listener that responds according to a user choosing a new + * lock pattern. + */ + protected LockPatternView.OnPatternListener mChooseNewLockPatternListener = new LockPatternView.OnPatternListener() { + + public void onPatternStart() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + patternInProgress(); + } + + public void onPatternCleared() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + } + + public void onPatternDetected(List<LockPatternView.Cell> pattern) { + if (mUiStage == Stage.NeedToConfirm || mUiStage == Stage.ConfirmWrong) { + if (mChosenPattern == null) throw new IllegalStateException("null chosen pattern in stage 'need to confirm"); + if (mChosenPattern.equals(pattern)) { + updateStage(Stage.ChoiceConfirmed); + } else { + updateStage(Stage.ConfirmWrong); + } + } else if (mUiStage == Stage.Introduction || mUiStage == Stage.ChoiceTooShort){ + if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) { + updateStage(Stage.ChoiceTooShort); + } else { + mChosenPattern = new ArrayList<LockPatternView.Cell>(pattern); + updateStage(Stage.FirstChoiceValid); + } + } else { + throw new IllegalStateException("Unexpected stage " + mUiStage + " when " + + "entering the pattern."); + } + } + + private void patternInProgress() { + mHeaderText.setText(R.string.lockpattern_recording_inprogress); + mFooterText.setText(""); + mFooterLeftButton.setEnabled(false); + mFooterRightButton.setEnabled(false); + } + }; + + + /** + * The states of the left footer button. + */ + enum LeftButtonMode { + Cancel(R.string.cancel, true), + CancelDisabled(R.string.cancel, false), + Retry(R.string.lockpattern_retry_button_text, true), + RetryDisabled(R.string.lockpattern_retry_button_text, false), + Gone(ID_EMPTY_MESSAGE, false); + + + /** + * @param text The displayed text for this mode. + * @param enabled Whether the button should be enabled. + */ + LeftButtonMode(int text, boolean enabled) { + this.text = text; + this.enabled = enabled; + } + + final int text; + final boolean enabled; + } + + /** + * The states of the right button. + */ + enum RightButtonMode { + Continue(R.string.lockpattern_continue_button_text, true), + ContinueDisabled(R.string.lockpattern_continue_button_text, false), + Confirm(R.string.lockpattern_confirm_button_text, true), + ConfirmDisabled(R.string.lockpattern_confirm_button_text, false), + Ok(android.R.string.ok, true); + + /** + * @param text The displayed text for this mode. + * @param enabled Whether the button should be enabled. + */ + RightButtonMode(int text, boolean enabled) { + this.text = text; + this.enabled = enabled; + } + + final int text; + final boolean enabled; + } + + /** + * Keep track internally of where the user is in choosing a pattern. + */ + protected enum Stage { + + Introduction( + R.string.lockpattern_recording_intro_header, + LeftButtonMode.Cancel, RightButtonMode.ContinueDisabled, + R.string.lockpattern_recording_intro_footer, true), + HelpScreen( + R.string.lockpattern_settings_help_how_to_record, + LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false), + ChoiceTooShort( + R.string.lockpattern_recording_incorrect_too_short, + LeftButtonMode.Retry, RightButtonMode.ContinueDisabled, + ID_EMPTY_MESSAGE, true), + FirstChoiceValid( + R.string.lockpattern_pattern_entered_header, + LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false), + NeedToConfirm( + R.string.lockpattern_need_to_confirm, + LeftButtonMode.CancelDisabled, RightButtonMode.ConfirmDisabled, + ID_EMPTY_MESSAGE, true), + ConfirmWrong( + R.string.lockpattern_need_to_unlock_wrong, + LeftButtonMode.Cancel, RightButtonMode.ConfirmDisabled, + ID_EMPTY_MESSAGE, true), + ChoiceConfirmed( + R.string.lockpattern_pattern_confirmed_header, + LeftButtonMode.Cancel, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false); + + + /** + * @param headerMessage The message displayed at the top. + * @param leftMode The mode of the left button. + * @param rightMode The mode of the right button. + * @param footerMessage The footer message. + * @param patternEnabled Whether the pattern widget is enabled. + */ + Stage(int headerMessage, + LeftButtonMode leftMode, + RightButtonMode rightMode, + int footerMessage, boolean patternEnabled) { + this.headerMessage = headerMessage; + this.leftMode = leftMode; + this.rightMode = rightMode; + this.footerMessage = footerMessage; + this.patternEnabled = patternEnabled; + } + + final int headerMessage; + final LeftButtonMode leftMode; + final RightButtonMode rightMode; + final int footerMessage; + final boolean patternEnabled; + } + + private Stage mUiStage = Stage.Introduction; + + private Runnable mClearPatternRunnable = new Runnable() { + public void run() { + mLockPatternView.clearPattern(); + } + }; + + private static final String KEY_UI_STAGE = "uiStage"; + private static final String KEY_PATTERN_CHOICE = "chosenPattern"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + mLockPatternUtils = new LockPatternUtils(getContentResolver()); + + requestWindowFeature(Window.FEATURE_NO_TITLE); + + setupViews(); + + // make it so unhandled touch events within the unlock screen go to the + // lock pattern view. + final LinearLayoutWithDefaultTouchRecepient topLayout + = (LinearLayoutWithDefaultTouchRecepient) findViewById( + R.id.topLayout); + topLayout.setDefaultTouchRecepient(mLockPatternView); + + if (savedInstanceState == null) { + // first launch + updateStage(Stage.Introduction); + if (mLockPatternUtils.savedPatternExists()) { + confirmPattern(); + } + } else { + // restore from previous state + final String patternString = savedInstanceState.getString(KEY_PATTERN_CHOICE); + if (patternString != null) { + mChosenPattern = LockPatternUtils.stringToPattern(patternString); + } + updateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]); + } + } + + /** + * Keep all "find view" related stuff confined to this function since in + * case someone needs to subclass and customize. + */ + protected void setupViews() { + setContentView(R.layout.choose_lock_pattern); + + mHeaderText = (TextView) findViewById(R.id.headerText); + + mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern); + mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener); + + mFooterText = (TextView) findViewById(R.id.footerText); + + mFooterLeftButton = (TextView) findViewById(R.id.footerLeftButton); + mFooterRightButton = (TextView) findViewById(R.id.footerRightButton); + + mFooterLeftButton.setOnClickListener(this); + mFooterRightButton.setOnClickListener(this); + } + + public void onClick(View v) { + if (v == mFooterLeftButton) { + if (mUiStage.leftMode == LeftButtonMode.Retry) { + mChosenPattern = null; + mLockPatternView.clearPattern(); + updateStage(Stage.Introduction); + } else if (mUiStage.leftMode == LeftButtonMode.Cancel) { + finish(); + } else { + throw new IllegalStateException("left footer button pressed, but stage of " + + mUiStage + " doesn't make sense"); + } + } else if (v == mFooterRightButton) { + + if (mUiStage.rightMode == RightButtonMode.Continue) { + if (mUiStage != Stage.FirstChoiceValid) { + throw new IllegalStateException("expected ui stage " + Stage.FirstChoiceValid + + " when button is " + RightButtonMode.Continue); + } + updateStage(Stage.NeedToConfirm); + } else if (mUiStage.rightMode == RightButtonMode.Confirm) { + if (mUiStage != Stage.ChoiceConfirmed) { + throw new IllegalStateException("expected ui stage " + Stage.ChoiceConfirmed + + " when button is " + RightButtonMode.Confirm); + } + saveChosenPatternAndFinish(); + } else if (mUiStage.rightMode == RightButtonMode.Ok) { + if (mUiStage != Stage.HelpScreen) { + throw new IllegalStateException("Help screen is only mode with ok button, but " + + "stage is " + mUiStage); + } + mLockPatternView.clearPattern(); + mLockPatternView.setDisplayMode(DisplayMode.Correct); + updateStage(Stage.Introduction); + } + } + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { + if (mUiStage == Stage.HelpScreen) { + updateStage(Stage.Introduction); + return true; + } + } + if (keyCode == KeyEvent.KEYCODE_MENU && mUiStage == Stage.Introduction) { + updateStage(Stage.HelpScreen); + return true; + } + + return super.onKeyDown(keyCode, event); + } + + /** + * Launch screen to confirm the existing lock pattern. + * @see #onActivityResult(int, int, android.content.Intent) + */ + protected void confirmPattern() { + final Intent intent = new Intent(); + intent.setClassName("com.android.settings", "com.android.settings.ConfirmLockPattern"); + startActivityForResult(intent, 55); + } + + /** + * @see #confirmPattern + */ + @Override + protected void onActivityResult(int requestCode, int resultCode, + Intent data) { + super.onActivityResult(requestCode, resultCode, data); + + if (requestCode != 55) { + return; + } + + if (resultCode != Activity.RESULT_OK) { + finish(); + } + updateStage(Stage.Introduction); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + + outState.putInt(KEY_UI_STAGE, mUiStage.ordinal()); + if (mChosenPattern != null) { + outState.putString(KEY_PATTERN_CHOICE, LockPatternUtils.patternToString(mChosenPattern)); + } + } + + + /** + * Updates the messages and buttons appropriate to what stage the user + * is at in choosing a view. This doesn't handle clearing out the pattern; + * the pattern is expected to be in the right state. + * @param stage + */ + protected void updateStage(Stage stage) { + + mUiStage = stage; + + // header text, footer text, visibility and + // enabled state all known from the stage + if (stage == Stage.ChoiceTooShort) { + mHeaderText.setText( + getResources().getString( + stage.headerMessage, + LockPatternUtils.MIN_LOCK_PATTERN_SIZE)); + } else { + mHeaderText.setText(stage.headerMessage); + } + if (stage.footerMessage == ID_EMPTY_MESSAGE) { + mFooterText.setText(""); + } else { + mFooterText.setText(stage.footerMessage); + } + + if (stage.leftMode == LeftButtonMode.Gone) { + mFooterLeftButton.setVisibility(View.GONE); + } else { + mFooterLeftButton.setVisibility(View.VISIBLE); + mFooterLeftButton.setText(stage.leftMode.text); + mFooterLeftButton.setEnabled(stage.leftMode.enabled); + } + + mFooterRightButton.setText(stage.rightMode.text); + mFooterRightButton.setEnabled(stage.rightMode.enabled); + + // same for whether the patten is enabled + if (stage.patternEnabled) { + mLockPatternView.enableInput(); + } else { + mLockPatternView.disableInput(); + } + + // the rest of the stuff varies enough that it is easier just to handle + // on a case by case basis. + mLockPatternView.setDisplayMode(DisplayMode.Correct); + + switch (mUiStage) { + case Introduction: + mLockPatternView.clearPattern(); + break; + case HelpScreen: + mLockPatternView.setPattern(DisplayMode.Animate, mAnimatePattern); + break; + case ChoiceTooShort: + mLockPatternView.setDisplayMode(DisplayMode.Wrong); + postClearPatternRunnable(); + break; + case FirstChoiceValid: + break; + case NeedToConfirm: + mLockPatternView.clearPattern(); + break; + case ConfirmWrong: + mLockPatternView.setDisplayMode(DisplayMode.Wrong); + postClearPatternRunnable(); + break; + case ChoiceConfirmed: + break; + } + } + + + // clear the wrong pattern unless they have started a new one + // already + private void postClearPatternRunnable() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS); + } + + private void saveChosenPatternAndFinish() { + boolean patternExistedBefore = mLockPatternUtils.savedPatternExists(); + mLockPatternUtils.saveLockPattern(mChosenPattern); + + // if setting pattern for first time, enable the lock gesture. otherwise, + // keep the user's setting. + if (!patternExistedBefore) { + mLockPatternUtils.setLockPatternEnabled(true); + mLockPatternUtils.setVisiblePatternEnabled(true); + } + finish(); + } +} diff --git a/src/com/android/settings/ChooseLockPatternExample.java b/src/com/android/settings/ChooseLockPatternExample.java new file mode 100644 index 0000000..5feba4c --- /dev/null +++ b/src/com/android/settings/ChooseLockPatternExample.java @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.content.Intent; +import android.graphics.drawable.AnimationDrawable; +import android.os.Bundle; +import android.os.Handler; +import android.view.View; +import android.widget.ImageView; + +public class ChooseLockPatternExample extends Activity implements View.OnClickListener { + private static final long START_DELAY = 1000; + protected static final String TAG = "Settings"; + private View mNextButton; + private View mSkipButton; + private View mImageView; + private AnimationDrawable mAnimation; + private Handler mHandler = new Handler(); + private Runnable mRunnable = new Runnable() { + public void run() { + startAnimation(mAnimation); + } + }; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.choose_lock_pattern_example); + initViews(); + } + + @Override + protected void onResume() { + super.onResume(); + mHandler.postDelayed(mRunnable, START_DELAY); + } + + @Override + protected void onPause() { + super.onPause(); + stopAnimation(mAnimation); + } + + public void onClick(View v) { + if (v == mSkipButton) { + finish(); + } else if (v == mNextButton) { + stopAnimation(mAnimation); + Intent intent = new Intent(this, ChooseLockPattern.class); + startActivity(intent); + finish(); + } + } + + private void initViews() { + mNextButton = findViewById(R.id.next_button); + mNextButton.setOnClickListener(this); + + mSkipButton = findViewById(R.id.skip_button); + mSkipButton.setOnClickListener(this); + + mImageView = (ImageView) findViewById(R.id.lock_anim); + mImageView.setBackgroundResource(R.drawable.lock_anim); + mImageView.setOnClickListener(this); + mAnimation = (AnimationDrawable) mImageView.getBackground(); + } + + protected void startAnimation(final AnimationDrawable animation) { + if (animation != null && !animation.isRunning()) { + animation.run(); + } + } + + protected void stopAnimation(final AnimationDrawable animation) { + if (animation != null && animation.isRunning()) animation.stop(); + } +} + diff --git a/src/com/android/settings/ChooseLockPatternTutorial.java b/src/com/android/settings/ChooseLockPatternTutorial.java new file mode 100644 index 0000000..9687b55 --- /dev/null +++ b/src/com/android/settings/ChooseLockPatternTutorial.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import com.android.internal.widget.LockPatternUtils; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; + +public class ChooseLockPatternTutorial extends Activity implements View.OnClickListener { + protected View mNextButton; + protected View mSkipButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + // Don't show the tutorial if the user has seen it before. + LockPatternUtils lockPatternUtils = new LockPatternUtils(getContentResolver()); + if (savedInstanceState == null && lockPatternUtils.savedPatternExists()) { + Intent intent = new Intent(); + intent.setClassName("com.android.settings", "com.android.settings.ChooseLockPattern"); + startActivity(intent); + finish(); + } else { + initViews(); + } + } + + private void initViews() { + setContentView(R.layout.choose_lock_pattern_tutorial); + mNextButton = findViewById(R.id.next_button); + mNextButton.setOnClickListener(this); + mSkipButton = findViewById(R.id.skip_button); + mSkipButton.setOnClickListener(this); + } + + public void onClick(View v) { + if (v == mSkipButton) { + finish(); + } else if (v == mNextButton) { + startActivity(new Intent(this, ChooseLockPatternExample.class)); + finish(); + } + } +} + diff --git a/src/com/android/settings/ConfirmLockPattern.java b/src/com/android/settings/ConfirmLockPattern.java new file mode 100644 index 0000000..c94bbb2 --- /dev/null +++ b/src/com/android/settings/ConfirmLockPattern.java @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternView; +import com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient; + +import android.app.Activity; +import android.content.Intent; +import android.os.CountDownTimer; +import android.os.SystemClock; +import android.os.Bundle; +import android.widget.TextView; +import android.view.Window; + +import java.util.List; + +/** + * Launch this when you want the user to confirm their lock pattern. + * + * Sets an activity result of {@link Activity#RESULT_OK} when the user + * successfully confirmed their pattern. + */ +public class ConfirmLockPattern extends Activity { + + /** + * Names of {@link CharSequence} fields within the originating {@link Intent} + * that are used to configure the keyguard confirmation view's labeling. + * The view will use the system-defined resource strings for any labels that + * the caller does not supply. + */ + public static final String HEADER_TEXT = "com.android.settings.ConfirmLockPattern.header"; + public static final String FOOTER_TEXT = "com.android.settings.ConfirmLockPattern.footer"; + public static final String HEADER_WRONG_TEXT = "com.android.settings.ConfirmLockPattern.header_wrong"; + public static final String FOOTER_WRONG_TEXT = "com.android.settings.ConfirmLockPattern.footer_wrong"; + + // how long we wait to clear a wrong pattern + private static final int WRONG_PATTERN_CLEAR_TIMEOUT_MS = 2000; + + private static final String KEY_NUM_WRONG_ATTEMPTS = "num_wrong_attempts"; + + private LockPatternView mLockPatternView; + private LockPatternUtils mLockPatternUtils; + private int mNumWrongConfirmAttempts; + private CountDownTimer mCountdownTimer; + + private TextView mHeaderTextView; + private TextView mFooterTextView; + + // caller-supplied text for various prompts + private CharSequence mHeaderText; + private CharSequence mFooterText; + private CharSequence mHeaderWrongText; + private CharSequence mFooterWrongText; + + + private enum Stage { + NeedToUnlock, + NeedToUnlockWrong, + LockedOut + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + mLockPatternUtils = new LockPatternUtils(getContentResolver()); + + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.confirm_lock_pattern); + + mHeaderTextView = (TextView) findViewById(R.id.headerText); + mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern); + mFooterTextView = (TextView) findViewById(R.id.footerText); + + // make it so unhandled touch events within the unlock screen go to the + // lock pattern view. + final LinearLayoutWithDefaultTouchRecepient topLayout + = (LinearLayoutWithDefaultTouchRecepient) findViewById( + R.id.topLayout); + topLayout.setDefaultTouchRecepient(mLockPatternView); + + Intent intent = getIntent(); + if (intent != null) { + mHeaderText = intent.getCharSequenceExtra(HEADER_TEXT); + mFooterText = intent.getCharSequenceExtra(FOOTER_TEXT); + mHeaderWrongText = intent.getCharSequenceExtra(HEADER_WRONG_TEXT); + mFooterWrongText = intent.getCharSequenceExtra(FOOTER_WRONG_TEXT); + } + + mLockPatternView.setOnPatternListener(mConfirmExistingLockPatternListener); + updateStage(Stage.NeedToUnlock); + + if (savedInstanceState != null) { + mNumWrongConfirmAttempts = savedInstanceState.getInt(KEY_NUM_WRONG_ATTEMPTS); + } else { + // on first launch, if no lock pattern is set, then finish with + // success (don't want user to get stuck confirming something that + // doesn't exist). + if (!mLockPatternUtils.savedPatternExists()) { + setResult(RESULT_OK); + finish(); + } + } + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + // deliberately not calling super since we are managing this in full + outState.putInt(KEY_NUM_WRONG_ATTEMPTS, mNumWrongConfirmAttempts); + } + + @Override + protected void onPause() { + super.onPause(); + + if (mCountdownTimer != null) { + mCountdownTimer.cancel(); + } + } + + @Override + protected void onResume() { + super.onResume(); + + // if the user is currently locked out, enforce it. + long deadline = mLockPatternUtils.getLockoutAttemptDeadline(); + if (deadline != 0) { + handleAttemptLockout(deadline); + } + } + + private void updateStage(Stage stage) { + + switch (stage) { + case NeedToUnlock: + if (mHeaderText != null) { + mHeaderTextView.setText(mHeaderText); + } else { + mHeaderTextView.setText(R.string.lockpattern_need_to_unlock); + } + if (mFooterText != null) { + mFooterTextView.setText(mFooterText); + } else { + mFooterTextView.setText(R.string.lockpattern_need_to_unlock_footer); + } + + mLockPatternView.setEnabled(true); + mLockPatternView.enableInput(); + break; + case NeedToUnlockWrong: + if (mHeaderWrongText != null) { + mHeaderTextView.setText(mHeaderWrongText); + } else { + mHeaderTextView.setText(R.string.lockpattern_need_to_unlock_wrong); + } + if (mFooterWrongText != null) { + mFooterTextView.setText(mFooterWrongText); + } else { + mFooterTextView.setText(R.string.lockpattern_need_to_unlock_wrong_footer); + } + + mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong); + mLockPatternView.setEnabled(true); + mLockPatternView.enableInput(); + break; + case LockedOut: + mLockPatternView.clearPattern(); + // enabled = false means: disable input, and have the + // appearance of being disabled. + mLockPatternView.setEnabled(false); // appearance of being disabled + break; + } + } + + private Runnable mClearPatternRunnable = new Runnable() { + public void run() { + mLockPatternView.clearPattern(); + } + }; + + // clear the wrong pattern unless they have started a new one + // already + private void postClearPatternRunnable() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS); + } + + /** + * The pattern listener that responds according to a user confirming + * an existing lock pattern. + */ + private LockPatternView.OnPatternListener mConfirmExistingLockPatternListener = new LockPatternView.OnPatternListener() { + + public void onPatternStart() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + } + + public void onPatternCleared() { + mLockPatternView.removeCallbacks(mClearPatternRunnable); + } + + public void onPatternDetected(List<LockPatternView.Cell> pattern) { + if (mLockPatternUtils.checkPattern(pattern)) { + setResult(RESULT_OK); + finish(); + } else { + if (pattern.size() >= LockPatternUtils.MIN_LOCK_PATTERN_SIZE && + ++mNumWrongConfirmAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) { + long deadline = SystemClock.elapsedRealtime() + LockPatternUtils.FAILED_ATTEMPT_TIMEOUT_MS; + mLockPatternUtils.setLockoutAttemptDeadline(deadline); + handleAttemptLockout(deadline); + } else { + updateStage(Stage.NeedToUnlockWrong); + postClearPatternRunnable(); + } + } + } + }; + + + private void handleAttemptLockout(long elapsedRealtimeDeadline) { + updateStage(Stage.LockedOut); + long elapsedRealtime = SystemClock.elapsedRealtime(); + mCountdownTimer = new CountDownTimer( + elapsedRealtimeDeadline - elapsedRealtime, + LockPatternUtils.FAILED_ATTEMPT_COUNTDOWN_INTERVAL_MS) { + + @Override + public void onTick(long millisUntilFinished) { + mHeaderTextView.setText(R.string.lockpattern_too_many_failed_confirmation_attempts_header); + final int secondsCountdown = (int) (millisUntilFinished / 1000); + mFooterTextView.setText(getString( + R.string.lockpattern_too_many_failed_confirmation_attempts_footer, + secondsCountdown)); + } + + @Override + public void onFinish() { + mNumWrongConfirmAttempts = 0; + updateStage(Stage.NeedToUnlock); + } + }.start(); + } +} diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java new file mode 100644 index 0000000..ce9dd8c --- /dev/null +++ b/src/com/android/settings/DateTimeSettings.java @@ -0,0 +1,363 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.app.Dialog; +import android.app.DatePickerDialog; +import android.app.TimePickerDialog; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.SharedPreferences; +import android.content.SharedPreferences.OnSharedPreferenceChangeListener; +import android.os.Bundle; +import android.os.SystemClock; +import android.pim.DateFormat; +import android.preference.CheckBoxPreference; +import android.preference.ListPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.provider.Settings; +import android.provider.Settings.SettingNotFoundException; +import android.widget.DatePicker; +import android.widget.TimePicker; + +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + +public class DateTimeSettings + extends PreferenceActivity + implements OnSharedPreferenceChangeListener, + TimePickerDialog.OnTimeSetListener , DatePickerDialog.OnDateSetListener { + + private static final String HOURS_12 = "12"; + private static final String HOURS_24 = "24"; + + private Calendar mDummyDate; + private static final String KEY_DATE_FORMAT = "date_format"; + private static final String KEY_AUTO_TIME = "auto_time"; + + private static final int DIALOG_DATEPICKER = 0; + private static final int DIALOG_TIMEPICKER = 1; + + private CheckBoxPreference mAutoPref; + private Preference mTimePref; + private Preference mTime24Pref; + private Preference mTimeZone; + private Preference mDatePref; + private ListPreference mDateFormat; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.date_time_prefs); + + initUI(); + } + + private void initUI() { + boolean autoEnabled = getAutoState(); + + mDummyDate = Calendar.getInstance(); + mDummyDate.set(mDummyDate.get(Calendar.YEAR), 11, 31, 13, 0, 0); + + mAutoPref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME); + mAutoPref.setChecked(autoEnabled); + mTimePref = findPreference("time"); + mTime24Pref = findPreference("24 hour"); + mTimeZone = findPreference("timezone"); + mDatePref = findPreference("date"); + mDateFormat = (ListPreference) findPreference(KEY_DATE_FORMAT); + + int currentFormatIndex = -1; + String [] dateFormats = getResources().getStringArray(R.array.date_format_values); + String [] formattedDates = new String[dateFormats.length]; + String currentFormat = getDateFormat(); + // Initialize if DATE_FORMAT is not set in the system settings + // This can happen after a factory reset (or data wipe) + if (currentFormat == null) { + currentFormat = getResources().getString(R.string.default_date_format); + setDateFormat(currentFormat); + } + for (int i = 0; i < formattedDates.length; i++) { + formattedDates[i] = DateFormat.format(dateFormats[i], mDummyDate).toString(); + if (currentFormat.equals(dateFormats[i])) currentFormatIndex = i; + } + + mDateFormat.setEntries(formattedDates); + mDateFormat.setEntryValues(R.array.date_format_values); + mDateFormat.setValue(currentFormat); + + mTimePref.setEnabled(!autoEnabled); + mDatePref.setEnabled(!autoEnabled); + mTimeZone.setEnabled(!autoEnabled); + + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); + } + + + @Override + protected void onResume() { + super.onResume(); + + ((CheckBoxPreference)mTime24Pref).setChecked(is24Hour()); + + // Register for time ticks and other reasons for time change + IntentFilter filter = new IntentFilter(); + filter.addAction(Intent.ACTION_TIME_TICK); + filter.addAction(Intent.ACTION_TIME_CHANGED); + filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); + registerReceiver(mIntentReceiver, filter, null, null); + + updateTimeAndDateDisplay(); + } + + @Override + protected void onPause() { + super.onPause(); + unregisterReceiver(mIntentReceiver); + } + + private void updateTimeAndDateDisplay() { + java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(this); + Date now = Calendar.getInstance().getTime(); + Date dummyDate = mDummyDate.getTime(); + mTimePref.setSummary(DateFormat.getTimeFormat(this).format(now)); + mTimeZone.setSummary(getTimeZoneText()); + mDatePref.setSummary(shortDateFormat.format(now)); + mDateFormat.setSummary(shortDateFormat.format(dummyDate)); + } + + public void onDateSet(DatePicker view, int year, int month, int day) { + Calendar c = Calendar.getInstance(); + + c.set(Calendar.YEAR, year); + c.set(Calendar.MONTH, month); + c.set(Calendar.DAY_OF_MONTH, day); + long when = c.getTimeInMillis(); + + if (when / 1000 < Integer.MAX_VALUE) { + SystemClock.setCurrentTimeMillis(when); + } + updateTimeAndDateDisplay(); + } + + public void onTimeSet(TimePicker view, int hourOfDay, int minute) { + Calendar c = Calendar.getInstance(); + + c.set(Calendar.HOUR_OF_DAY, hourOfDay); + c.set(Calendar.MINUTE, minute); + long when = c.getTimeInMillis(); + + if (when / 1000 < Integer.MAX_VALUE) { + SystemClock.setCurrentTimeMillis(when); + } + updateTimeAndDateDisplay(); + timeUpdated(); + } + + public void onSharedPreferenceChanged(SharedPreferences preferences, String key) { + if (key.equals(KEY_DATE_FORMAT)) { + String format = preferences.getString(key, + getResources().getString(R.string.default_date_format)); + Settings.System.putString(getContentResolver(), + Settings.System.DATE_FORMAT, format); + updateTimeAndDateDisplay(); + } else if (key.equals(KEY_AUTO_TIME)) { + boolean autoEnabled = preferences.getBoolean(key, true); + Settings.System.putInt(getContentResolver(), + Settings.System.AUTO_TIME, + autoEnabled ? 1 : 0); + mTimePref.setEnabled(!autoEnabled); + mDatePref.setEnabled(!autoEnabled); + mTimeZone.setEnabled(!autoEnabled); + } + } + + public Dialog onCreateDialog(int id) { + Dialog d; + + switch (id) { + case DIALOG_DATEPICKER: { + final Calendar calendar = Calendar.getInstance(); + d = new DatePickerDialog( + this, + this, + calendar.get(Calendar.YEAR), + calendar.get(Calendar.MONTH), + calendar.get(Calendar.DAY_OF_MONTH)); + d.setTitle(getResources().getString(R.string.date_time_changeDate_text)); + break; + } + case DIALOG_TIMEPICKER: { + final Calendar calendar = Calendar.getInstance(); + d = new TimePickerDialog( + this, + this, + calendar.get(Calendar.HOUR_OF_DAY), + calendar.get(Calendar.MINUTE), + DateFormat.is24HourFormat(this)); + d.setTitle(getResources().getString(R.string.date_time_changeTime_text)); + break; + } + default: + d = null; + break; + } + + return d; + } + + public void onPrepareDialog(int id, Dialog d) { + switch (id) { + case DIALOG_DATEPICKER: { + DatePickerDialog datePicker = (DatePickerDialog)d; + final Calendar calendar = Calendar.getInstance(); + datePicker.updateDate( + calendar.get(Calendar.YEAR), + calendar.get(Calendar.MONTH), + calendar.get(Calendar.DAY_OF_MONTH)); + break; + } + case DIALOG_TIMEPICKER: { + TimePickerDialog timePicker = (TimePickerDialog)d; + final Calendar calendar = Calendar.getInstance(); + timePicker.updateTime( + calendar.get(Calendar.HOUR_OF_DAY), + calendar.get(Calendar.MINUTE)); + break; + } + default: + break; + } + } + + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mDatePref) { + showDialog(DIALOG_DATEPICKER); + } else if (preference == mTimePref) { + showDialog(DIALOG_TIMEPICKER); + } else if (preference == mTime24Pref) { + set24Hour(((CheckBoxPreference)mTime24Pref).isChecked()); + updateTimeAndDateDisplay(); + timeUpdated(); + } else if (preference == mTimeZone) { + Intent intent = new Intent(); + intent.setClass(this, ZoneList.class); + startActivityForResult(intent, 0); + } + return false; + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, + Intent data) { + updateTimeAndDateDisplay(); + } + + private void timeUpdated() { + Intent timeChanged = new Intent(Intent.ACTION_TIME_CHANGED); + sendBroadcast(timeChanged); + } + + /* Get & Set values from the system settings */ + + private boolean is24Hour() { + String setting = Settings.System.getString(getContentResolver(), + Settings.System.TIME_12_24); + return HOURS_24.equals(setting); + } + + private void set24Hour(boolean is24Hour) { + Settings.System.putString(getContentResolver(), + Settings.System.TIME_12_24, + is24Hour? HOURS_24 : HOURS_12); + } + + private String getDateFormat() { + return Settings.System.getString(getContentResolver(), + Settings.System.DATE_FORMAT); + } + + private boolean getAutoState() { + try { + return Settings.System.getInt(getContentResolver(), + Settings.System.AUTO_TIME) > 0; + } catch (SettingNotFoundException snfe) { + return true; + } + } + + private void setDateFormat(String format) { + Settings.System.putString(getContentResolver(), Settings.System.DATE_FORMAT, format); + } + + /* Helper routines to format timezone */ + + private String getTimeZoneText() { + TimeZone tz = java.util.Calendar.getInstance().getTimeZone(); + boolean daylight = tz.inDaylightTime(new Date()); + StringBuilder sb = new StringBuilder(); + + sb.append(formatOffset(tz.getRawOffset() + + (daylight ? tz.getDSTSavings() : 0))). + append(", "). + append(tz.getDisplayName(daylight, TimeZone.LONG)); + + return sb.toString(); + } + + private char[] formatOffset(int off) { + off = off / 1000 / 60; + + char[] buf = new char[9]; + buf[0] = 'G'; + buf[1] = 'M'; + buf[2] = 'T'; + + if (off < 0) { + buf[3] = '-'; + off = -off; + } else { + buf[3] = '+'; + } + + int hours = off / 60; + int minutes = off % 60; + + buf[4] = (char) ('0' + hours / 10); + buf[5] = (char) ('0' + hours % 10); + + buf[6] = ':'; + + buf[7] = (char) ('0' + minutes / 10); + buf[8] = (char) ('0' + minutes % 10); + + return buf; + } + + private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + updateTimeAndDateDisplay(); + } + }; +} diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java new file mode 100644 index 0000000..8dd970b --- /dev/null +++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.os.Bundle; +import android.view.View; +import android.view.Window; +import android.view.View.OnClickListener; +import android.widget.LinearLayout; + +public class DateTimeSettingsSetupWizard extends DateTimeSettings implements OnClickListener { + private View mNextButton; + + @Override + protected void onCreate(Bundle icicle) { + requestWindowFeature(Window.FEATURE_NO_TITLE); + super.onCreate(icicle); + setContentView(R.layout.date_time_settings_setupwizard); + mNextButton = findViewById(R.id.next_button); + mNextButton.setOnClickListener(this); + } + + public void onClick(View v) { + setResult(RESULT_OK); + finish(); + } +} diff --git a/src/com/android/settings/DebugIntentSender.java b/src/com/android/settings/DebugIntentSender.java new file mode 100644 index 0000000..9fed947 --- /dev/null +++ b/src/com/android/settings/DebugIntentSender.java @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.widget.EditText; +import android.widget.Button; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.text.TextUtils; +import android.text.Spannable; +import android.text.Selection; +import android.net.Uri; + +/** + * A simple activity that provides a UI for sending intents + */ +public class DebugIntentSender extends Activity { + private EditText mIntentField; + private EditText mDataField; + private EditText mAccountField; + private EditText mResourceField; + private Button mSendBroadcastButton; + private Button mStartActivityButton; + private View.OnClickListener mClicked = new View.OnClickListener() { + public void onClick(View v) { + if ((v == mSendBroadcastButton) || + (v == mStartActivityButton)) { + String intentAction = mIntentField.getText().toString(); + String intentData = mDataField.getText().toString(); + String account = mAccountField.getText().toString(); + String resource = mResourceField.getText().toString(); + + Intent intent = new Intent(intentAction); + if (!TextUtils.isEmpty(intentData)) { + intent.setData(Uri.parse(intentData)); + } + intent.putExtra("account", account); + intent.putExtra("resource", resource); + if (v == mSendBroadcastButton) { + sendBroadcast(intent); + } else { + startActivity(intent); + } + + setResult(RESULT_OK); + finish(); + } + } + }; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(R.layout.intent_sender); + + mIntentField = (EditText) findViewById(R.id.intent); + mIntentField.setText(Intent.ACTION_SYNC); + Selection.selectAll((Spannable) mIntentField.getText()); + + mDataField = (EditText) findViewById(R.id.data); + mDataField.setBackgroundResource(android.R.drawable.editbox_background); + + mAccountField = (EditText) findViewById(R.id.account); + mResourceField = (EditText) findViewById(R.id.resource); + + mSendBroadcastButton = (Button) findViewById(R.id.sendbroadcast); + mSendBroadcastButton.setOnClickListener(mClicked); + + mStartActivityButton = (Button) findViewById(R.id.startactivity); + mStartActivityButton.setOnClickListener(mClicked); + } +} diff --git a/src/com/android/settings/DefaultRingtonePreference.java b/src/com/android/settings/DefaultRingtonePreference.java new file mode 100644 index 0000000..8eed563 --- /dev/null +++ b/src/com/android/settings/DefaultRingtonePreference.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + + +import android.content.Context; +import android.content.Intent; +import android.media.RingtoneManager; +import android.net.Uri; +import android.preference.RingtonePreference; +import android.util.AttributeSet; +import android.util.Config; +import android.util.Log; + +public class DefaultRingtonePreference extends RingtonePreference { + private static final String TAG = "DefaultRingtonePreference"; + + public DefaultRingtonePreference(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + protected void onPrepareRingtonePickerIntent(Intent ringtonePickerIntent) { + super.onPrepareRingtonePickerIntent(ringtonePickerIntent); + + /* + * Since this preference is for choosing the default ringtone, it + * doesn't make sense to show a 'Default' item. + */ + ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, false); + + /* + * Similarly, 'Silent' shouldn't be shown here. + */ + ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false); + } + + @Override + protected void onSaveRingtone(Uri ringtoneUri) { + RingtoneManager.setActualDefaultRingtoneUri(getContext(), getRingtoneType(), ringtoneUri); + } + + @Override + protected Uri onRestoreRingtone() { + return RingtoneManager.getActualDefaultRingtoneUri(getContext(), getRingtoneType()); + } + +} diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java new file mode 100644 index 0000000..02b852b --- /dev/null +++ b/src/com/android/settings/DevelopmentSettings.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.os.Bundle; +import android.os.SystemProperties; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.preference.CheckBoxPreference; +import android.provider.Settings; +import android.text.TextUtils; + +/* + * Displays preferences for application developers. + */ +public class DevelopmentSettings extends PreferenceActivity { + + private static final String ENABLE_ADB = "enable_adb"; + private static final String KEEP_SCREEN_ON = "keep_screen_on"; + + private CheckBoxPreference mEnableAdb; + private CheckBoxPreference mKeepScreenOn; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.development_prefs); + + mEnableAdb = (CheckBoxPreference) findPreference(ENABLE_ADB); + mKeepScreenOn = (CheckBoxPreference) findPreference(KEEP_SCREEN_ON); + } + + @Override + protected void onResume() { + super.onResume(); + + mEnableAdb.setChecked(Settings.System.getInt(getContentResolver(), + Settings.System.ADB_ENABLED, 0) != 0); + mKeepScreenOn.setChecked(Settings.System.getInt(getContentResolver(), + Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0) != 0); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + + // Those monkeys kept committing suicide, so we add this property + // to disable this functionality + if (!TextUtils.isEmpty(SystemProperties.get("ro.monkey"))) { + return false; + } + + if (preference == mEnableAdb) { + Settings.System.putInt(getContentResolver(), Settings.System.ADB_ENABLED, + mEnableAdb.isChecked() ? 1 : 0); + } else if (preference == mKeepScreenOn) { + Settings.System.putInt(getContentResolver(), Settings.System.STAY_ON_WHILE_PLUGGED_IN, + mKeepScreenOn.isChecked() ? 1 : 0); + } + + return false; + } +} diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java new file mode 100644 index 0000000..58fc91e --- /dev/null +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.os.Bundle; +import android.os.SystemProperties; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceGroup; +import android.util.Config; +import android.util.Log; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class DeviceInfoSettings extends PreferenceActivity { + + private static final String TAG = "DeviceInfoSettings"; + private static final boolean LOGD = false || Config.LOGD; + + private static final String KEY_CONTAINER = "container"; + private static final String KEY_TEAM = "team"; + private static final String KEY_CONTRIBUTORS = "contributors"; + private static final String KEY_TERMS = "terms"; + private static final String KEY_LICENSE = "license"; + private static final String KEY_COPYRIGHT = "copyright"; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.device_info_settings); + + setSummary("firmware_version", "ro.build.version.release"); + setSummary("baseband_version", "gsm.version.baseband"); + setSummary("device_model", "ro.product.model"); + setSummary("build_number", "ro.build.description"); + findPreference("kernel_version").setSummary(getFormattedKernelVersion()); + + /* + * Settings is a generic app and should not contain any device-specific + * info. + */ + PreferenceGroup parentPreference = (PreferenceGroup) findPreference(KEY_CONTAINER); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_TERMS, + Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_LICENSE, + Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_CONTRIBUTORS, + Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_COPYRIGHT, + Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parentPreference, KEY_TEAM, + Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + } + + private void setSummary(String preference, String property) { + try { + findPreference(preference).setSummary( + SystemProperties.get(property, + getResources().getString(R.string.device_info_default))); + } catch (RuntimeException e) { + + } + } + + private String getFormattedKernelVersion() { + String procVersionStr; + + try { + BufferedReader reader = new BufferedReader(new FileReader("/proc/version"), 256); + try { + procVersionStr = reader.readLine(); + } finally { + reader.close(); + } + + final String PROC_VERSION_REGEX = + "\\w+\\s+" + /* ignore: Linux */ + "\\w+\\s+" + /* ignore: version */ + "([^\\s]+)\\s+" + /* group 1: 2.6.22-omap1 */ + "\\(([^\\s@]+(?:@[^\\s.]+)?)[^)]*\\)\\s+" + /* group 2: (xxxxxx@xxxxx.constant) */ + "\\([^)]+\\)\\s+" + /* ignore: (gcc ..) */ + "([^\\s]+)\\s+" + /* group 3: #26 */ + "(?:PREEMPT\\s+)?" + /* ignore: PREEMPT (optional) */ + "(.+)"; /* group 4: date */ + + Pattern p = Pattern.compile(PROC_VERSION_REGEX); + Matcher m = p.matcher(procVersionStr); + + if (!m.matches()) { + Log.e(TAG, "Regex did not match on /proc/version: " + procVersionStr); + return "Unavailable"; + } else if (m.groupCount() < 4) { + Log.e(TAG, "Regex match on /proc/version only returned " + m.groupCount() + + " groups"); + return "Unavailable"; + } else { + return (new StringBuilder(m.group(1)).append("\n").append( + m.group(2)).append(" ").append(m.group(3)).append("\n") + .append(m.group(4))).toString(); + } + } catch (IOException e) { + Log.e(TAG, + "IO Exception when getting kernel version for Device Info screen", + e); + + return "Unavailable"; + } + } + +} diff --git a/src/com/android/settings/Display.java b/src/com/android/settings/Display.java new file mode 100644 index 0000000..f90e0f0 --- /dev/null +++ b/src/com/android/settings/Display.java @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.app.ActivityManagerNative; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.content.res.TypedArray; +import android.os.Bundle; +import android.os.RemoteException; +import android.util.DisplayMetrics; +import android.util.TypedValue; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; +import android.widget.TextView; + + +public class Display extends Activity implements View.OnClickListener { + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + setContentView(R.layout.display); + + mFontSize = (Spinner) findViewById(R.id.fontSize); + mFontSize.setOnItemSelectedListener(mFontSizeChanged); + String[] states = new String[3]; + Resources r = getResources(); + states[0] = r.getString(R.string.small_font); + states[1] = r.getString(R.string.medium_font); + states[2] = r.getString(R.string.large_font); + ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, + android.R.layout.simple_spinner_item, states); + adapter.setDropDownViewResource( + android.R.layout.simple_spinner_dropdown_item); + mFontSize.setAdapter(adapter); + + mPreview = (TextView) findViewById(R.id.preview); + mPreview.setText(r.getText(R.string.font_size_preview_text)); + + Button save = (Button) findViewById(R.id.save); + save.setText(r.getText(R.string.font_size_save)); + save.setOnClickListener(this); + + mTextSizeTyped = new TypedValue(); + TypedArray styledAttributes = + obtainStyledAttributes(android.R.styleable.TextView); + styledAttributes.getValue(android.R.styleable.TextView_textSize, + mTextSizeTyped); + + DisplayMetrics metrics = getResources().getDisplayMetrics(); + mDisplayMetrics = new DisplayMetrics(); + mDisplayMetrics.density = metrics.density; + mDisplayMetrics.heightPixels = metrics.heightPixels; + mDisplayMetrics.scaledDensity = metrics.scaledDensity; + mDisplayMetrics.widthPixels = metrics.widthPixels; + mDisplayMetrics.xdpi = metrics.xdpi; + mDisplayMetrics.ydpi = metrics.ydpi; + + styledAttributes.recycle(); + } + + @Override + public void onResume() { + super.onResume(); + try { + mCurConfig.updateFrom( + ActivityManagerNative.getDefault().getConfiguration()); + } catch (RemoteException e) { + } + if (mCurConfig.fontScale < 1) { + mFontSize.setSelection(0); + } else if (mCurConfig.fontScale > 1) { + mFontSize.setSelection(2); + } else { + mFontSize.setSelection(1); + } + updateFontScale(); + } + + private void updateFontScale() { + mDisplayMetrics.scaledDensity = mDisplayMetrics.density * + mCurConfig.fontScale; + + float size = mTextSizeTyped.getDimension(mDisplayMetrics); + mPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); + } + + public void onClick(View v) { + try { + ActivityManagerNative.getDefault().updateConfiguration(mCurConfig); + } catch (RemoteException e) { + } + finish(); + } + + private Spinner.OnItemSelectedListener mFontSizeChanged + = new Spinner.OnItemSelectedListener() { + public void onItemSelected(android.widget.AdapterView av, View v, + int position, long id) { + if (position == 0) { + mCurConfig.fontScale = .75f; + } else if (position == 2) { + mCurConfig.fontScale = 1.25f; + } else { + mCurConfig.fontScale = 1.0f; + } + + updateFontScale(); + } + + public void onNothingSelected(android.widget.AdapterView av) { + } + }; + + private Spinner mFontSize; + private TextView mPreview; + private TypedValue mTextSizeTyped; + private DisplayMetrics mDisplayMetrics; + private Configuration mCurConfig = new Configuration(); +} diff --git a/src/com/android/settings/EditPinPreference.java b/src/com/android/settings/EditPinPreference.java new file mode 100644 index 0000000..ee3143c --- /dev/null +++ b/src/com/android/settings/EditPinPreference.java @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.preference.EditTextPreference; +import android.text.method.DigitsKeyListener; +import android.text.method.PasswordTransformationMethod; +import android.util.AttributeSet; +import android.view.View; +import android.widget.EditText; + +import java.util.Map; + +/** + * TODO: Add a soft dialpad for PIN entry. + */ +class EditPinPreference extends EditTextPreference { + + private boolean mDialogOpen; + + interface OnPinEnteredListener { + void onPinEntered(EditPinPreference preference, boolean positiveResult); + } + + private OnPinEnteredListener mPinListener; + + public EditPinPreference(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public EditPinPreference(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + public void setOnPinEnteredListener(OnPinEnteredListener listener) { + mPinListener = listener; + } + + @Override + protected void onBindDialogView(View view) { + super.onBindDialogView(view); + + final EditText editText = (EditText) view.findViewById(android.R.id.edit); + + if (editText != null) { + editText.setSingleLine(true); + editText.setTransformationMethod(PasswordTransformationMethod.getInstance()); + editText.setKeyListener(DigitsKeyListener.getInstance()); + } + } + + public boolean isDialogOpen() { + return mDialogOpen; + } + + @Override + protected void onDialogClosed(boolean positiveResult) { + super.onDialogClosed(positiveResult); + mDialogOpen = false; + if (mPinListener != null) { + mPinListener.onPinEntered(this, positiveResult); + } + } + + public void showPinDialog() { + mDialogOpen = true; + showDialog(null); + } +} diff --git a/src/com/android/settings/InstalledAppDetails.java b/src/com/android/settings/InstalledAppDetails.java new file mode 100644 index 0000000..712f94d --- /dev/null +++ b/src/com/android/settings/InstalledAppDetails.java @@ -0,0 +1,414 @@ + + +/** + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import com.android.settings.R; +import android.app.Activity; +import android.app.ActivityManager; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.ApplicationInfo; +import android.content.pm.IPackageDataObserver; +import android.content.pm.IPackageStatsObserver; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.content.pm.PackageStats; +import android.content.pm.PackageManager.NameNotFoundException; +import android.net.Uri; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Config; +import android.util.Log; +import java.util.ArrayList; +import java.util.List; +import android.content.ComponentName; +import android.view.View; +import android.widget.AppSecurityPermissions; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +/** + * Activity to display application information from Settings + * + */ +public class InstalledAppDetails extends Activity implements View.OnClickListener, DialogInterface.OnClickListener { + private static final String TAG="InstalledAppDetails"; + private static final int _UNKNOWN_APP=R.string.unknown; + //wait times used for the async package manager api + private ApplicationInfo mAppInfo; + private Button mUninstallButton; + private Button mActivitiesButton; + private boolean mSysPackage; + private boolean localLOGV=Config.LOGV || true; + private TextView mTotalSize; + private TextView mAppSize; + private TextView mDataSize; + PackageStats mSizeInfo; + private Button mManageSpaceButton; + private PackageManager mPm; + private String mBStr, mKbStr, mMbStr; + + //internal constants used in Handler + private static final int CLEAR_USER_DATA = 1; + private static final int OP_SUCCESSFUL = 1; + private static final int OP_FAILED = 2; + private static final int GET_PKG_SIZE = 2; + private static final String ATTR_PACKAGE_STATS="PackageStats"; + + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + switch (msg.what) { + case CLEAR_USER_DATA: + processClearMsg(msg); + break; + case GET_PKG_SIZE: + refreshSizeInfo(msg); + break; + default: + break; + } + } + }; + + private boolean isSystemPackage() { + if ((mAppInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0) { + return true; + } + return false; + } + + class ClearUserDataObserver extends IPackageDataObserver.Stub { + public void onRemoveCompleted(final String packageName, final boolean succeeded) { + final Message msg = mHandler.obtainMessage(CLEAR_USER_DATA); + msg.arg1 = succeeded?OP_SUCCESSFUL:OP_FAILED; + mHandler.sendMessage(msg); + } + } + + class PkgSizeObserver extends IPackageStatsObserver.Stub { + public int idx; + public void onGetStatsCompleted(PackageStats pStats, boolean succeeded) { + Message msg = mHandler.obtainMessage(GET_PKG_SIZE); + Bundle data = new Bundle(); + data.putParcelable(ATTR_PACKAGE_STATS, pStats); + msg.setData(data); + mHandler.sendMessage(msg); + + } + } + + private String getSizeStr(long size) { + String retStr = ""; + if(size < 1024) { + return String.valueOf(size)+mBStr; + } + long kb, mb, rem; + kb = size >> 10; + rem = size - (kb << 10); + if(kb < 1024) { + if(rem > 512) { + kb++; + } + retStr += String.valueOf(kb)+mKbStr; + return retStr; + } + mb = kb >> 10; + if(kb >= 512) { + //round off + mb++; + } + retStr += String.valueOf(mb)+ mMbStr; + return retStr; + } + + /** Called when the activity is first created. */ + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + //get package manager + mPm = getPackageManager(); + //get application's name from intent + Intent intent = getIntent(); + final String packageName = intent.getStringExtra(ManageApplications.APP_PKG_NAME); + mSizeInfo = intent.getParcelableExtra(ManageApplications.APP_PKG_SIZE); + long total = -1; + long code = -1; + long data = -1; + if(mSizeInfo != null) { + total = mSizeInfo.cacheSize+mSizeInfo.codeSize+mSizeInfo.dataSize; + code = mSizeInfo.codeSize; + data = mSizeInfo.dataSize+mSizeInfo.cacheSize; + } + String unknownStr = getString(_UNKNOWN_APP); + mBStr = getString(R.string.b_text); + mKbStr = getString(R.string.kb_text); + mMbStr = getString(R.string.mb_text); + String totalSizeStr = unknownStr; + if(total != -1) { + totalSizeStr = getSizeStr(total); + } + String appSizeStr = unknownStr; + if(code != -1) { + appSizeStr = getSizeStr(code); + } + String dataSizeStr = unknownStr; + if(data != -1) { + dataSizeStr = getSizeStr(data); + } + if(localLOGV) Log.i(TAG, "packageName:"+packageName+", total="+total+ + "code="+code+", data="+data); + try { + mAppInfo = mPm.getApplicationInfo(packageName, 0); + } catch (NameNotFoundException e) { + Throwable th = e.fillInStackTrace(); + Log.e(TAG, "Exception when retrieving package:"+packageName, e); + displayErrorDialog(R.string.app_not_found_dlg_text, true, true); + } + setContentView(R.layout.installed_app_details); + ((ImageView)findViewById(R.id.app_icon)).setImageDrawable(mPm. + getApplicationIcon(mAppInfo)); + //set application name TODO version + CharSequence appName = mPm.getApplicationLabel(mAppInfo); + if(appName == null) { + appName = getString(_UNKNOWN_APP); + } + ((TextView)findViewById(R.id.app_name)).setText(appName); + CharSequence appDesc = mAppInfo.loadDescription(mPm); + if(appDesc != null) { + ((TextView)findViewById(R.id.app_description)).setText(appDesc); + } + //TODO download str and download url + //set values on views + mTotalSize = (TextView)findViewById(R.id.total_size_text); + mTotalSize.setText(totalSizeStr); + mAppSize = (TextView)findViewById(R.id.application_size_text); + mAppSize.setText(appSizeStr); + mDataSize = (TextView)findViewById(R.id.data_size_text); + mDataSize.setText(dataSizeStr); + + mUninstallButton = ((Button)findViewById(R.id.uninstall_button)); + //determine if app is a system app + mSysPackage = isSystemPackage(); + if(localLOGV) Log.i(TAG, "Is systemPackage "+mSysPackage); + int btnText; + boolean btnClickable = true; + + if(mSysPackage) { + //app can clear user data + if((mAppInfo.flags & ApplicationInfo.FLAG_ALLOW_CLEAR_USER_DATA) + == ApplicationInfo.FLAG_ALLOW_CLEAR_USER_DATA) { + mUninstallButton.setText(R.string.clear_user_data_text); + //disable button if data is 0 + if(data == 0) { + mUninstallButton.setEnabled(false); + } else { + //enable button + mUninstallButton.setOnClickListener(this); + } + } else { + //hide button if diableClearUserData is set + mUninstallButton.setVisibility(View.GONE); + } + } else { + mUninstallButton.setText(R.string.uninstall_text); + mUninstallButton.setOnClickListener(this); + } + //clear activities + mActivitiesButton = (Button)findViewById(R.id.clear_activities_button); + List<ComponentName> prefActList = new ArrayList<ComponentName>(); + //intent list cannot be null. so pass empty list + List<IntentFilter> intentList = new ArrayList<IntentFilter>(); + mPm.getPreferredActivities(intentList, prefActList, packageName); + if(localLOGV) Log.i(TAG, "Have "+prefActList.size()+" number of activities in prefered list"); + TextView autoLaunchView = (TextView)findViewById(R.id.auto_launch); + if(prefActList.size() <= 0) { + //disable clear activities button + autoLaunchView.setText(R.string.auto_launch_disable_text); + mActivitiesButton.setEnabled(false); + } else { + autoLaunchView.setText(R.string.auto_launch_enable_text); + mActivitiesButton.setOnClickListener(this); + } + mManageSpaceButton = (Button)findViewById(R.id.manage_space_button); + if(mAppInfo.manageSpaceActivityName != null) { + mManageSpaceButton.setVisibility(View.VISIBLE); + mManageSpaceButton.setOnClickListener(this); + } + //security permissions section + AppSecurityPermissions asp = new AppSecurityPermissions(this); + PackageInfo pkgInfo; + try { + pkgInfo = mPm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS); + } catch (NameNotFoundException e) { + Log.w(TAG, "Couldnt retrieve permissions for package:"+packageName); + return; + } + asp.setSecurityPermissionsView(pkgInfo); + LinearLayout securityList = (LinearLayout) findViewById(R.id.security_settings_list); + securityList.addView(asp.getPermissionsView()); + } + + private void displayErrorDialog(int msgId, final boolean finish, final boolean changed) { + //display confirmation dialog + new AlertDialog.Builder(this) + .setTitle(getString(R.string.app_not_found_dlg_title)) + .setIcon(R.drawable.ic_dialog_alert) + .setMessage(getString(msgId)) + .setNeutralButton(getString(R.string.dlg_ok), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + //force to recompute changed value + setIntentAndFinish(finish, changed); + } + } + ) + .show(); + } + + private void setIntentAndFinish(boolean finish, boolean appChanged) { + if(localLOGV) Log.i(TAG, "appChanged="+appChanged); + Intent intent = new Intent(); + intent.putExtra(ManageApplications.APP_CHG, appChanged); + setResult(ManageApplications.RESULT_OK, intent); + mUninstallButton.setEnabled(false); + if(finish) { + finish(); + } + } + + /* + * Private method to handle get size info notification from observer when + * the async operation from PackageManager is complete. The current user data + * info has to be refreshed in the manage applications screen as well as the current screen. + */ + private void refreshSizeInfo(Message msg) { + boolean changed = false; + Intent intent = new Intent(); + PackageStats newPs = msg.getData().getParcelable(ATTR_PACKAGE_STATS); + long newTot = newPs.cacheSize+newPs.codeSize+newPs.dataSize; + long oldTot = mSizeInfo.cacheSize+mSizeInfo.codeSize+mSizeInfo.dataSize; + if(newTot != oldTot) { + mTotalSize.setText(getSizeStr(newTot)); + changed = true; + } + if(newPs.codeSize != mSizeInfo.codeSize) { + mAppSize.setText(getSizeStr(newPs.codeSize)); + changed = true; + } + if((newPs.dataSize != mSizeInfo.dataSize) || (newPs.cacheSize != mSizeInfo.cacheSize)) { + mDataSize.setText(getSizeStr(newPs.dataSize+newPs.cacheSize)); + changed = true; + } + if(changed) { + mUninstallButton.setText(R.string.clear_user_data_text); + mSizeInfo = newPs; + intent.putExtra(ManageApplications.APP_PKG_SIZE, mSizeInfo); + } + intent.putExtra(ManageApplications.APP_CHG, changed); + setResult(ManageApplications.RESULT_OK, intent); + } + + /* + * Private method to handle clear message notification from observer when + * the async operation from PackageManager is complete + */ + private void processClearMsg(Message msg) { + int result = msg.arg1; + String packageName = mAppInfo.packageName; + if(result == OP_SUCCESSFUL) { + Log.i(TAG, "Cleared user data for system package:"+packageName); + PkgSizeObserver observer = new PkgSizeObserver(); + mPm.getPackageSizeInfo(packageName, observer); + } else { + mUninstallButton.setText(R.string.clear_user_data_text); + mUninstallButton.setEnabled(true); + } + } + + /* + * Private method to initiate clearing user data when the user clicks the clear data + * button for a system package + */ + private void initiateClearUserDataForSysPkg() { + mUninstallButton.setEnabled(false); + //invoke uninstall or clear user data based on sysPackage + boolean recomputeSizes = false; + String packageName = mAppInfo.packageName; + Log.i(TAG, "Clearing user data for system package"); + ClearUserDataObserver observer = new ClearUserDataObserver(); + ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); + boolean res = am.clearApplicationUserData(packageName, observer); + if(!res) { + //doesnt initiate clear. some error. should not happen but just log error for now + Log.i(TAG, "Couldnt clear application user data for package:"+packageName); + displayErrorDialog(R.string.clear_data_failed, false, false); + } else { + mUninstallButton.setText(R.string.recompute_size); + } + } + + /* + * Method implementing functionality of buttons clicked + * @see android.view.View.OnClickListener#onClick(android.view.View) + */ + public void onClick(View v) { + String packageName = mAppInfo.packageName; + if(v == mUninstallButton) { + if(mSysPackage) { + //display confirmation dialog + new AlertDialog.Builder(this) + .setTitle(getString(R.string.clear_data_dlg_title)) + .setIcon(R.drawable.ic_dialog_alert) + .setMessage(getString(R.string.clear_data_dlg_text)) + .setPositiveButton(R.string.dlg_ok, this) + .setNegativeButton(R.string.dlg_cancel, this) + .show(); + } else { + //create new intent to launch Uninstaller activity + Uri packageURI = Uri.parse("package:"+packageName); + Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); + startActivity(uninstallIntent); + setIntentAndFinish(true, false); + } + } else if(v == mActivitiesButton) { + mPm.clearPackagePreferredActivities(packageName); + mActivitiesButton.setEnabled(false); + } else if(v == mManageSpaceButton) { + Intent intent = new Intent(Intent.ACTION_DEFAULT); + intent.setClassName(mAppInfo.packageName, mAppInfo.manageSpaceActivityName); + startActivityForResult(intent, -1); + } + } + + public void onClick(DialogInterface dialog, int which) { + if(which == AlertDialog.BUTTON1) { + //invoke uninstall or clear user data based on sysPackage + initiateClearUserDataForSysPkg(); + } else { + //cancel do nothing just retain existing screen + } + } +} + diff --git a/src/com/android/settings/LanguageSettings.java b/src/com/android/settings/LanguageSettings.java new file mode 100644 index 0000000..2777777 --- /dev/null +++ b/src/com/android/settings/LanguageSettings.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.ContentResolver; +import android.os.Bundle; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceGroup; +import android.preference.PreferenceScreen; +import android.preference.CheckBoxPreference; +import android.provider.Settings.System; + +public class LanguageSettings extends PreferenceActivity { + + private final String[] mSettingsUiKey = { + "auto_caps", + "auto_replace", + "auto_punctuate", + }; + + // Note: Order of this array should correspond to the order of the above array + private final String[] mSettingsSystemId = { + System.TEXT_AUTO_CAPS, + System.TEXT_AUTO_REPLACE, + System.TEXT_AUTO_PUNCTUATE, + }; + + // Note: Order of this array should correspond to the order of the above array + private final int[] mSettingsDefault = { + 1, + 1, + 1, + }; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.language_settings); + + if (getAssets().getLocales().length == 1) { + getPreferenceScreen(). + removePreference(findPreference("language_category")); + } + + ContentResolver resolver = getContentResolver(); + for (int i = 0; i < mSettingsUiKey.length; i++) { + CheckBoxPreference pref = (CheckBoxPreference) findPreference(mSettingsUiKey[i]); + pref.setChecked(System.getInt(resolver, mSettingsSystemId[i], + mSettingsDefault[i]) > 0); + } + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + for (int i = 0; i < mSettingsUiKey.length; i++) { + if (mSettingsUiKey[i].equals(preference.getKey())) { + System.putInt(getContentResolver(), mSettingsSystemId[i], + ((CheckBoxPreference)preference).isChecked()? 1 : 0); + return true; + } + } + return super.onPreferenceTreeClick(preferenceScreen, preference); + } + +} diff --git a/src/com/android/settings/LocalePicker.java b/src/com/android/settings/LocalePicker.java new file mode 100644 index 0000000..46d9b52 --- /dev/null +++ b/src/com/android/settings/LocalePicker.java @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.ActivityManagerNative; +import android.app.IActivityManager; +import android.app.ListActivity; +import android.content.res.Configuration; +import android.os.Bundle; +import android.os.RemoteException; +import android.os.SystemProperties; +import android.util.Log; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.ListView; + +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.util.Arrays; +import java.util.Locale; + +public class LocalePicker extends ListActivity { + private static final String TAG = "LocalePicker"; + + Loc[] mLocales; + + private static class Loc { + String label; + Locale locale; + + public Loc(String label, Locale locale) { + this.label = label; + this.locale = locale; + } + + @Override + public String toString() { + return this.label; + } + } + + int getContentView() { + return R.layout.locale_picker; + } + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(getContentView()); + + String[] locales = getAssets().getLocales(); + final int N = locales.length; + mLocales = new Loc[N]; + for (int i = 0; i < N; i++) { + Locale locale = null; + String s = locales[i]; + int len = s.length(); + if (len == 0) { + locale = new Locale("en", "US"); + } else if (len == 2) { + locale = new Locale(s); + } else if (len == 5) { + locale = new Locale(s.substring(0, 2), s.substring(3, 5)); + } + String displayName = ""; + if (locale != null) { + displayName = locale.getDisplayName(); + } + if ("zz_ZZ".equals(s)) { + displayName = "Pseudo..."; + } + + mLocales[i] = new Loc(displayName, locale); + } + + int layoutId = R.layout.locale_picker_item; + int fieldId = R.id.locale; + ArrayAdapter<Loc> adapter = new ArrayAdapter<Loc>(this, layoutId, fieldId, mLocales); + getListView().setAdapter(adapter); + } + + @Override + public void onResume() { + super.onResume(); + getListView().requestFocus(); + } + + @Override + protected void onListItemClick(ListView l, View v, int position, long id) { + try { + IActivityManager am = ActivityManagerNative.getDefault(); + Configuration config = am.getConfiguration(); + + Loc loc = mLocales[position]; + config.locale = loc.locale; + final String language = loc.locale.getLanguage(); + final String region = loc.locale.getCountry(); + + am.updateConfiguration(config); + + // Update the System properties + SystemProperties.set("user.language", language); + SystemProperties.set("user.region", region); + // Write to file for persistence across reboots + try { + BufferedWriter bw = new BufferedWriter(new java.io.FileWriter( + System.getenv("ANDROID_DATA") + "/locale")); + bw.write(language + "_" + region); + bw.close(); + } catch (java.io.IOException ioe) { + Log.e(TAG, + "Unable to persist locale. Error writing to locale file." + + ioe); + } + } catch (RemoteException e) { + // Intentionally left blank + } + finish(); + } +} diff --git a/src/com/android/settings/LocalePickerInSetupWizard.java b/src/com/android/settings/LocalePickerInSetupWizard.java new file mode 100644 index 0000000..b160e89 --- /dev/null +++ b/src/com/android/settings/LocalePickerInSetupWizard.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.ActivityManagerNative; +import android.app.IActivityManager; +import android.app.ListActivity; +import android.content.res.Configuration; +import android.os.Bundle; +import android.os.RemoteException; +import android.os.SystemProperties; +import android.util.Log; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.ListView; + +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.util.Arrays; +import java.util.Locale; + +public class LocalePickerInSetupWizard extends LocalePicker { + + @Override + int getContentView() { + return R.layout.locale_picker_in_setupwizard; + } + +} diff --git a/src/com/android/settings/ManageApplications.java b/src/com/android/settings/ManageApplications.java new file mode 100644 index 0000000..8389502 --- /dev/null +++ b/src/com/android/settings/ManageApplications.java @@ -0,0 +1,616 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import com.android.settings.R; +import android.app.Activity; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.ApplicationInfo; +import android.content.pm.IPackageStatsObserver; +import android.content.pm.PackageManager; +import android.content.pm.PackageStats; +import android.content.pm.PackageManager.NameNotFoundException; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Config; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.SimpleAdapter; +import android.widget.TextView; +import android.widget.AdapterView.OnItemClickListener; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +/** + * Activity to pick an application that will be used to display installation information and + * options to upgrade/uninstall/delete user data for system applications. + * Initially a compute in progress message is displayed while the application retrieves + * the size information of installed packages which is done asynchronously through a + * handler. Once the computation is done package resource information is retrieved + * and then the information is displayed on the screen. All + * messages are passed through a Handler object. + * Known issue: There could be some ordering issues when installing/uninstalling + * applications when the application list is being scanned. + */ +public class ManageApplications extends Activity implements SimpleAdapter.ViewBinder, OnItemClickListener { + private static final String TAG = "ManageApplications"; + //Application prefix information + public static final String APP_PKG_PREFIX="com.android.settings."; + public static final String APP_PKG_NAME=APP_PKG_PREFIX+"ApplicationPkgName"; + public static final String APP_PKG_SIZE= APP_PKG_PREFIX+"size"; + public static final String APP_CHG=APP_PKG_PREFIX+"changed"; + + //constant value that can be used to check return code from sub activity. + private static final int INSTALLED_APP_DETAILS = 1; + //application attributes passed to sub activity that displays more app info + private static final String KEY_APP_NAME = "ApplicationName"; + private static final String KEY_APP_ICON = "ApplicationIcon"; + private static final String KEY_APP_DESC = "ApplicationDescription"; + private static final String KEY_APP_SIZE= "ApplicationSize"; + //sort order that can be changed through the menu + public static final int SORT_ORDER_ALPHA = 0; + public static final int SORT_ORDER_SIZE = 1; + //key and resource values used in constructing map for SimpleAdapter + private static final String sKeys[] = new String[] { KEY_APP_NAME, KEY_APP_ICON, + KEY_APP_DESC, KEY_APP_SIZE}; + private static final int sResourceIds[] = new int[] { R.id.app_name, R.id.app_icon, + R.id.app_description, R.id.app_size}; + //List of ApplicationInfo objects for various applications + private List<ApplicationInfo> mAppList; + //SimpleAdapter used for managing items in the list + private SimpleAdapter mAppAdapter; + //map used to store size information which is used for displaying size information + //in this activity as well as the subactivity. this is to avoid invoking package manager + //api to retrieve size information + private HashMap<String, PackageStats> mSizeMap; + private HashMap<String, Map<String, ?> > mAppAdapterMap; + //sort order + private int mSortOrder = SORT_ORDER_ALPHA; + //log information boolean + private boolean localLOGV = Config.LOGV || false; + private ApplicationInfo mCurrentPkg; + private int mCurrentPkgIdx = 0; + private static final int COMPUTE_PKG_SIZE_START = 1; + private static final int COMPUTE_PKG_SIZE_DONE = 2; + private static final int REMOVE_PKG=3; + private static final int REORDER_LIST=4; + private static final int ADD_PKG=5; + private static final String ATTR_APP_IDX="ApplicationIndex"; + private static final String ATTR_CHAINED="Chained"; + private static final String ATTR_PKG_NAME="PackageName"; + private PkgSizeObserver mObserver; + private PackageManager mPm; + private PackageIntentReceiver mReceiver; + private boolean mDoneIniting = false; + private String mKbStr; + private String mMbStr; + private String mBStr; + + /* + * Handler class to handle messages for various operations + */ + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + PackageStats ps; + ApplicationInfo info; + Bundle data; + String pkgName; + int idx; + int size; + boolean chained = false; + data = msg.getData(); + switch (msg.what) { + case COMPUTE_PKG_SIZE_START: + mDoneIniting = false; + //initialize lists + mAppList = new ArrayList<ApplicationInfo>(); + mSizeMap = new HashMap<String, PackageStats>(); + mAppAdapterMap = new HashMap<String, Map<String, ?> >(); + //update application list from PackageManager + mAppList = mPm.getInstalledApplications(0); + if(mAppList.size() == 0) { + return; + } + mCurrentPkgIdx = 0; + mCurrentPkg = mAppList.get(0); + if(localLOGV) Log.i(TAG, "Initiating compute sizes for first time"); + //register receiver + mReceiver = new PackageIntentReceiver(); + mReceiver.registerReceiver(); + pkgName = mCurrentPkg.packageName; + mObserver = new PkgSizeObserver(0); + mObserver.invokeGetSizeInfo(pkgName, true); + break; + case COMPUTE_PKG_SIZE_DONE: + ps = mObserver.ps; + info = mObserver.appInfo; + chained = data.getBoolean(ATTR_CHAINED); + if(!mObserver.succeeded) { + if(chained) { + removePackageFromAppList(ps.packageName); + } else { + //do not go to adding phase + break; + } + } else { + //insert size value + mSizeMap.put(ps.packageName, ps); + Map<String, Object> entry = createMapEntry(mPm.getApplicationLabel(info), + mPm.getApplicationIcon(info), + info.loadDescription(mPm), + getSizeStr(ps)); + mAppAdapterMap.put(ps.packageName, entry); + } + if(chained) { + //here app list is precomputed + idx = data.getInt(ATTR_APP_IDX); + //increment only if succeded + if(mObserver.succeeded) { + idx++; + } + if(idx < mAppList.size()) { + pkgName = mAppList.get(idx).packageName; + //increment record index and invoke getSizeInfo for next record + mObserver.invokeGetSizeInfo(pkgName, true); + } else { + sortAppList(); + createListFromValues(); + mDoneIniting = true; + } + } else { + //add app info object as well + mAppList.add(info); + sortAppList(); + size = mAppList.size(); + int i; + for(i = 0; i < size; i++) { + if(mAppList.get(i).packageName.equalsIgnoreCase(mCurrentPkg.packageName)) { + if(i > mCurrentPkgIdx) { + mCurrentPkgIdx = i; + } + break; + } + } + createListFromValues(); + } + break; + case REMOVE_PKG: + if(!mDoneIniting) { + //insert message again after some delay + sendMessageToHandler(REMOVE_PKG, data, 10*1000); + break; + } + pkgName = data.getString(ATTR_PKG_NAME); + removePackageFromAppList(pkgName); + if(mSizeMap.remove(pkgName) == null) { + Log.i(TAG, "Coudnt remove from size map package:"+pkgName); + } + if(mAppAdapterMap.remove(pkgName) == null) { + Log.i(TAG, "Coudnt remove from app adapter map package:"+pkgName); + } + if(mCurrentPkg.packageName.equalsIgnoreCase(pkgName)) { + if(mCurrentPkgIdx == (mAppList.size()-1)) { + mCurrentPkgIdx--; + } + mCurrentPkg = mAppList.get(mCurrentPkgIdx); + } + createListFromValues(); + break; + case REORDER_LIST: + int sortOrder = msg.arg1; + if(sortOrder != mSortOrder) { + mSortOrder = sortOrder; + if(localLOGV) Log.i(TAG, "Changing sort order to "+mSortOrder); + sortAppList(); + mCurrentPkgIdx = 0; + mCurrentPkg = mAppList.get(mCurrentPkgIdx); + createListFromValues(); + } + break; + case ADD_PKG: + pkgName = data.getString(ATTR_PKG_NAME); + if(!mDoneIniting) { + //insert message again after some delay + sendMessageToHandler(ADD_PKG, data, 10*1000); + break; + } + mObserver.invokeGetSizeInfo(pkgName, false); + break; + default: + break; + } + } + }; + + private void removePackageFromAppList(String pkgName) { + int size = mAppList.size(); + for(int i = 0; i < size; i++) { + if(mAppList.get(i).packageName.equalsIgnoreCase(pkgName)) { + mAppList.remove(i); + break; + } + } + } + + private void clearMessages() { + synchronized(mHandler) { + mHandler.removeMessages(COMPUTE_PKG_SIZE_START); + mHandler.removeMessages(COMPUTE_PKG_SIZE_DONE); + mHandler.removeMessages(REMOVE_PKG); + mHandler.removeMessages(REORDER_LIST); + mHandler.removeMessages(ADD_PKG); + } + } + + private void sendMessageToHandler(int msgId, Bundle data, long delayMillis) { + synchronized(mHandler) { + Message msg = mHandler.obtainMessage(msgId); + msg.setData(data); + if(delayMillis == 0) { + mHandler.sendMessage(msg); + } else { + mHandler.sendMessageDelayed(msg, delayMillis); + } + } + } + + private void sendMessageToHandler(int msgId, int arg1) { + synchronized(mHandler) { + Message msg = mHandler.obtainMessage(msgId); + msg.arg1 = arg1; + mHandler.sendMessage(msg); + } + } + + private void sendMessageToHandler(int msgId) { + synchronized(mHandler) { + mHandler.sendEmptyMessage(msgId); + } + } + + class PkgSizeObserver extends IPackageStatsObserver.Stub { + public PackageStats ps; + public ApplicationInfo appInfo; + public Drawable appIcon; + public CharSequence appName; + public CharSequence appDesc = ""; + private int mIdx = 0; + private boolean mChained = false; + public boolean succeeded; + PkgSizeObserver(int i) { + mIdx = i; + } + + private void getAppDetails() { + try { + appInfo = mPm.getApplicationInfo(ps.packageName, 0); + } catch (NameNotFoundException e) { + return; + } + appName = appInfo.loadLabel(mPm); + appIcon = appInfo.loadIcon(mPm); + } + + public void onGetStatsCompleted(PackageStats pStats, boolean pSucceeded) { + Bundle data = new Bundle(); + ps = pStats; + succeeded = pSucceeded; + if(mChained) { + data.putInt(ATTR_APP_IDX, mIdx); + if(succeeded) { + mIdx++; + } + } + data.putBoolean(ATTR_CHAINED, mChained); + getAppDetails(); + if(localLOGV) Log.i(TAG, "onGetStatsCompleted::"+appInfo.packageName+", ("+ps.cacheSize+","+ + ps.codeSize+", "+ps.dataSize); + sendMessageToHandler(COMPUTE_PKG_SIZE_DONE, data, 0); + } + + public void invokeGetSizeInfo(String packageName, boolean chained) { + mChained = chained; + mPm.getPackageSizeInfo(packageName, this); + } + } + + /** + * Receives notifications when applications are added/removed. + */ + private class PackageIntentReceiver extends BroadcastReceiver { + void registerReceiver() { + IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); + filter.addAction(Intent.ACTION_PACKAGE_REMOVED); + filter.addAction(Intent.ACTION_PACKAGE_CHANGED); + filter.addDataScheme("package"); + ManageApplications.this.registerReceiver(this, filter); + } + @Override + public void onReceive(Context context, Intent intent) { + String actionStr = intent.getAction(); + Uri data = intent.getData(); + String pkgName = data.getEncodedSchemeSpecificPart(); + if(localLOGV) Log.i(TAG, "action:"+actionStr+", for package:"+pkgName); + updatePackageList(actionStr, pkgName); + } + } + + private void updatePackageList(String actionStr, String pkgName) { + //technically we dont have to invoke handler since onReceive is invoked on + //the main thread but doing it here for better clarity + if(Intent.ACTION_PACKAGE_ADDED.equalsIgnoreCase(actionStr)) { + Bundle data = new Bundle(); + data.putString(ATTR_PKG_NAME, pkgName); + sendMessageToHandler(ADD_PKG, data, 0); + } else if(Intent.ACTION_PACKAGE_REMOVED.equalsIgnoreCase(actionStr)) { + Bundle data = new Bundle(); + data.putString(ATTR_PKG_NAME, pkgName); + sendMessageToHandler(REMOVE_PKG, data, 0); + } else if(Intent.ACTION_PACKAGE_CHANGED.equalsIgnoreCase(actionStr)) { + //force adapter to draw the list again. TODO derive from SimpleAdapter + //to avoid this + + } + } + + /* + * Utility method to create an array of map objects from a map of map objects + * for displaying list items to be used in SimpleAdapter. + */ + private void createListFromValues() { + findViewById(R.id.center_text).setVisibility(View.GONE); + populateAdapterList(); + mAppAdapter.setViewBinder(this); + ListView lv= (ListView) findViewById(android.R.id.list); + lv.setOnItemClickListener(this); + lv.setAdapter(mAppAdapter); + if(mCurrentPkgIdx != -1) { + lv.setSelection(mCurrentPkgIdx); + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + String action = getIntent().getAction(); + if(action.equals(Intent.ACTION_MANAGE_PACKAGE_STORAGE)) { + mSortOrder = SORT_ORDER_SIZE; + } + mPm = getPackageManager(); + //load strings from resources + mBStr = getString(R.string.b_text); + mKbStr = getString(R.string.kb_text); + mMbStr = getString(R.string.mb_text); + } + + @Override + public void onStart() { + super.onStart(); + setContentView(R.layout.compute_sizes); + //clear all messages related to application list + clearMessages(); + sendMessageToHandler(COMPUTE_PKG_SIZE_START); + } + + @Override + public void onStop() { + super.onStop(); + //register receiver here + unregisterReceiver(mReceiver); + } + + public static class AppInfoComparator implements Comparator<ApplicationInfo> { + public AppInfoComparator(HashMap<String, PackageStats> pSizeMap) { + mSizeMap= pSizeMap; + } + + public final int compare(ApplicationInfo a, ApplicationInfo b) { + PackageStats aps, bps; + aps = mSizeMap.get(a.packageName); + bps = mSizeMap.get(b.packageName); + if (aps == null && bps == null) { + return 0; + } else if (aps == null) { + return 1; + } else if (bps == null) { + return -1; + } + long atotal = aps.dataSize+aps.codeSize+aps.cacheSize; + long btotal = bps.dataSize+bps.codeSize+bps.cacheSize; + long ret = atotal-btotal; + //negate result to sort in descending order + if(ret < 0) { + return 1; + } + if(ret == 0) { + return 0; + } + return -1; + } + private HashMap<String, PackageStats> mSizeMap; + } + + /* + * Have to extract elements form map and populate a list ot be used by + * SimpleAdapter when displaying list elements. The sort order has to follow + * the order of elements in mAppList. + */ + private List<Map<String, ?>> createAdapterListFromMap() { + //get the index from mAppInfo which gives the correct sort position + int imax = mAppList.size(); + if(localLOGV) Log.i(TAG, "Creating new adapter list"); + List<Map<String, ?>> adapterList = new ArrayList<Map<String, ?>>(); + ApplicationInfo tmpInfo; + for(int i = 0; i < imax; i++) { + tmpInfo = mAppList.get(i); + Map<String, Object>newObj = new TreeMap<String, Object>( + mAppAdapterMap.get(tmpInfo.packageName)); + adapterList.add(newObj); + } + return adapterList; + } + + private void populateAdapterList() { + mAppAdapter = new SimpleAdapter(this, createAdapterListFromMap(), + R.layout.manage_applications_item, sKeys, sResourceIds); + } + + private String getSizeStr(PackageStats ps) { + String retStr = ""; + //insert total size information into map to display in view + //at this point its guaranteed that ps is not null. but checking anyway + if(ps != null) { + long size = ps.cacheSize+ps.codeSize+ps.dataSize; + if(size < 1024) { + return String.valueOf(size)+mBStr; + } + long kb, mb, rem; + kb = size >> 10; + rem = size - (kb << 10); + if(kb < 1024) { + if(rem > 512) { + kb++; + } + retStr += String.valueOf(kb)+mKbStr; + return retStr; + } + mb = kb >> 10; + if(kb >= 512) { + //round off + mb++; + } + retStr += String.valueOf(mb)+ mMbStr; + return retStr; + } else { + Log.w(TAG, "Something fishy, cannot find size info for package:"+ps.packageName); + } + return retStr; + } + + public void sortAppList() { + // Sort application list + if(mSortOrder == SORT_ORDER_ALPHA) { + Collections.sort(mAppList, new ApplicationInfo.DisplayNameComparator(mPm)); + } else if(mSortOrder == SORT_ORDER_SIZE) { + Collections.sort(mAppList, new AppInfoComparator(mSizeMap)); + } + } + + private Map<String, Object> createMapEntry(CharSequence appName, + Drawable appIcon, CharSequence appDesc, String sizeStr) { + Map<String, Object> map = new TreeMap<String, Object>(); + map.put(KEY_APP_NAME, appName); + //the icon cannot be null. if the application hasnt set it, the default icon is returned. + map.put(KEY_APP_ICON, appIcon); + if(appDesc == null) { + appDesc=""; + } + map.put(KEY_APP_DESC, appDesc); + map.put(KEY_APP_SIZE, sizeStr); + return map; + } + + private void startApplicationDetailsActivity(ApplicationInfo info, PackageStats ps) { + //Create intent to start new activity + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setClass(this, InstalledAppDetails.class); + intent.putExtra(APP_PKG_NAME, info.packageName); + if(localLOGV) Log.i(TAG, "code="+ps.codeSize+", cache="+ps.cacheSize+", data="+ps.dataSize); + intent.putExtra(APP_PKG_SIZE, ps); + if(localLOGV) Log.i(TAG, "Starting sub activity to display info for app:"+info + +" with intent:"+intent); + //start new activity to display extended information + if ((info.flags&ApplicationInfo.FLAG_SYSTEM) != 0) { + } + startActivityForResult(intent, INSTALLED_APP_DETAILS); + } + + public boolean setViewValue(View view, Object data, String textRepresentation) { + if(data == null) { + return false; + } + int id = view.getId(); + switch(id) { + case R.id.app_name: + ((TextView)view).setText((String)data); + break; + case R.id.app_icon: + ((ImageView)view).setImageDrawable((Drawable)data); + break; + case R.id.app_description: + ((TextView)view).setText((String)data); + break; + case R.id.app_size: + ((TextView)view).setText((String)data); + break; + default: + break; + } + return true; + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(0, SORT_ORDER_ALPHA, 0, R.string.sort_order_alpha) + .setIcon(android.R.drawable.ic_menu_sort_alphabetically); + menu.add(0, SORT_ORDER_SIZE, 0, R.string.sort_order_size) + .setIcon(android.R.drawable.ic_menu_sort_by_size); + return true; + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + if(mDoneIniting) { + menu.findItem(SORT_ORDER_ALPHA).setVisible(mSortOrder != SORT_ORDER_ALPHA); + menu.findItem(SORT_ORDER_SIZE).setVisible(mSortOrder!= SORT_ORDER_SIZE); + return true; + } + return false; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int menuId = item.getItemId(); + sendMessageToHandler(REORDER_LIST, menuId); + return true; + } + + public void onItemClick(AdapterView<?> parent, View view, int position, + long id) { + mCurrentPkgIdx=position; + ApplicationInfo info = mAppList.get(position); + mCurrentPkg = info; + PackageStats ps = mSizeMap.get(info.packageName); + startApplicationDetailsActivity(info, ps); + } +} diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java new file mode 100644 index 0000000..38ad608 --- /dev/null +++ b/src/com/android/settings/MasterClear.java @@ -0,0 +1,205 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import com.android.internal.widget.LockPatternUtils; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.os.ICheckinService; +import android.os.ServiceManager; +import android.os.SystemProperties; +import android.text.TextUtils; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.Button; + +/** + * Confirm and execute a reset of the device to a clean "just out of the box" + * state. Multiple confirmations are required: first, a general "are you sure + * you want to do this?" prompt, followed by a keyguard pattern trace if the user + * has defined one, followed by a final strongly-worded "THIS WILL ERASE EVERYTHING + * ON THE PHONE" prompt. If at any time the phone is allowed to go to sleep, is + * locked, et cetera, then the confirmation sequence is abandoned. + */ +public class MasterClear extends Activity { + + private static final int KEYGUARD_REQUEST = 55; + + private LayoutInflater mInflater; + private LockPatternUtils mLockUtils; + + private View mInitialView; + private Button mInitiateButton; + + private View mFinalView; + private Button mFinalButton; + + /** + * The user has gone through the multiple confirmation, so now we go ahead + * and invoke the Checkin Service to reset the device to its factory-default + * state (rebooting in the process). + */ + private Button.OnClickListener mFinalClickListener = new Button.OnClickListener() { + public void onClick(View v) { + + // Those monkeys kept committing suicide, so we add this property + // to disable going through with the master clear + if (!TextUtils.isEmpty(SystemProperties.get("ro.monkey"))) { + return; + } + + ICheckinService service = + ICheckinService.Stub.asInterface(ServiceManager.getService("checkin")); + if (service != null) { + try { + // This RPC should never return + service.masterClear(); + } catch (android.os.RemoteException e) { + // Intentionally blank - there's nothing we can do here + Log.w("MasterClear", "Unable to invoke ICheckinService.masterClear()"); + } + } else { + Log.w("MasterClear", "Unable to locate ICheckinService"); + } + + /* If we reach this point, the master clear didn't happen -- the + * service might have been unregistered with the ServiceManager, + * the RPC might have thrown an exception, or for some reason + * the implementation of masterClear() may have returned instead + * of resetting the device. + */ + new AlertDialog.Builder(MasterClear.this) + .setMessage(getText(R.string.master_clear_failed)) + .setPositiveButton(getText(android.R.string.ok), null) + .show(); + } + }; + + /** + * Keyguard validation is run using the standard {@link ConfirmLockPattern} + * component as a subactivity + */ + private void runKeyguardConfirmation() { + final Intent intent = new Intent(); + intent.setClassName("com.android.settings", + "com.android.settings.ConfirmLockPattern"); + // supply header and footer text in the intent + intent.putExtra(ConfirmLockPattern.HEADER_TEXT, + getText(R.string.master_clear_gesture_prompt)); + intent.putExtra(ConfirmLockPattern.FOOTER_TEXT, + getText(R.string.master_clear_gesture_explanation)); + startActivityForResult(intent, KEYGUARD_REQUEST); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + + if (requestCode != KEYGUARD_REQUEST) { + return; + } + + // If the user entered a valid keyguard trace, present the final + // confirmation prompt; otherwise, go back to the initial state. + if (resultCode == Activity.RESULT_OK) { + establishFinalConfirmationState(); + } else { + establishInitialState(); + } + } + + /** + * If the user clicks to begin the reset sequence, we next require a + * keyguard confirmation if the user has currently enabled one. If there + * is no keyguard available, we simply go to the final confirmation prompt. + */ + private Button.OnClickListener mInitiateListener = new Button.OnClickListener() { + public void onClick(View v) { + if (mLockUtils.isLockPatternEnabled()) { + runKeyguardConfirmation(); + } else { + establishFinalConfirmationState(); + } + } + }; + + /** + * Configure the UI for the final confirmation interaction + */ + private void establishFinalConfirmationState() { + if (mFinalView == null) { + mFinalView = mInflater.inflate(R.layout.master_clear_final, null); + mFinalButton = + (Button) mFinalView.findViewById(R.id.execute_master_clear); + mFinalButton.setOnClickListener(mFinalClickListener); + } + + setContentView(mFinalView); + } + + /** + * In its initial state, the activity presents a button for the user to + * click in order to initiate a confirmation sequence. This method is + * called from various other points in the code to reset the activity to + * this base state. + * + * <p>Reinflating views from resources is expensive and prevents us from + * caching widget pointers, so we use a single-inflate pattern: we lazy- + * inflate each view, caching all of the widget pointers we'll need at the + * time, then simply reuse the inflated views directly whenever we need + * to change contents. + */ + private void establishInitialState() { + if (mInitialView == null) { + mInitialView = mInflater.inflate(R.layout.master_clear_primary, null); + mInitiateButton = + (Button) mInitialView.findViewById(R.id.initiate_master_clear); + mInitiateButton.setOnClickListener(mInitiateListener); + } + + setContentView(mInitialView); + } + + @Override + protected void onCreate(Bundle savedState) { + super.onCreate(savedState); + + mInitialView = null; + mFinalView = null; + mInflater = LayoutInflater.from(this); + mLockUtils = new LockPatternUtils(getContentResolver()); + + establishInitialState(); + } + + /** Abandon all progress through the confirmation sequence by returning + * to the initial view any time the activity is interrupted (e.g. by + * idle timeout). + */ + @Override + public void onPause() { + super.onPause(); + + establishInitialState(); + } + +} diff --git a/src/com/android/settings/ProgressCategory.java b/src/com/android/settings/ProgressCategory.java new file mode 100644 index 0000000..15810b3 --- /dev/null +++ b/src/com/android/settings/ProgressCategory.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.preference.PreferenceCategory; +import android.util.AttributeSet; +import android.view.View; + +import java.util.Map; + +public class ProgressCategory extends PreferenceCategory { + + private boolean mProgress = false; + + public ProgressCategory(Context context, AttributeSet attrs) { + super(context, attrs); + setLayoutResource(R.layout.preference_progress_category); + } + + @Override + public void onBindView(View view) { + super.onBindView(view); + View textView = view.findViewById(R.id.scanning_text); + View progressBar = view.findViewById(R.id.scanning_progress); + + int visibility = mProgress ? View.VISIBLE : View.INVISIBLE; + textView.setVisibility(visibility); + progressBar.setVisibility(visibility); + } + + /** + * Turn on/off the progress indicator and text on the right. + * @param progressOn whether or not the progress should be displayed + */ + public void setProgress(boolean progressOn) { + mProgress = progressOn; + notifyChanged(); + } +} + diff --git a/src/com/android/settings/ProxySelector.java b/src/com/android/settings/ProxySelector.java new file mode 100644 index 0000000..d320e73 --- /dev/null +++ b/src/com/android/settings/ProxySelector.java @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.ContentResolver; +import android.content.Intent; +import android.net.Proxy; +import android.os.Bundle; +import android.provider.Settings; +import android.text.Selection; +import android.text.Spannable; +import android.text.TextUtils; +import android.util.Log; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.View.OnFocusChangeListener; +import android.widget.Button; +import android.widget.EditText; +import android.widget.TextView; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * To start the Proxy Selector activity, create the following intent. + * + * <code> + * Intent intent = new Intent(); + * intent.setClassName("com.android.browser.ProxySelector"); + * startActivity(intent); + * </code> + * + * you can add extra options to the intent by using + * + * <code> + * intent.putExtra(key, value); + * </code> + * + * the extra options are: + * + * button-label: a string label to display for the okay button + * title: the title of the window + * error-text: If not null, will be used as the label of the error message. + */ +public class ProxySelector extends Activity +{ + private final static String LOGTAG = "Settings"; + + EditText mHostnameField; + EditText mPortField; + Button mOKButton; + + // Matches blank input, ips, and domain names + private static final String HOSTNAME_REGEXP = "^$|^[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*(\\.[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*)*$"; + private static final Pattern HOSTNAME_PATTERN; + static { + HOSTNAME_PATTERN = Pattern.compile(HOSTNAME_REGEXP); + } + + + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + if (android.util.Config.LOGV) Log.v(LOGTAG, "[ProxySelector] onStart"); + + setContentView(R.layout.proxy); + initView(); + populateFields(false); + } + + protected void showError(int error) { + + new AlertDialog.Builder(this) + .setTitle(R.string.proxy_error) + .setMessage(error) + .setPositiveButton(R.string.proxy_error_dismiss, null) + .show(); + } + + void initView() { + + mHostnameField = (EditText)findViewById(R.id.hostname); + mHostnameField.setOnFocusChangeListener(mOnFocusChangeHandler); + + mPortField = (EditText)findViewById(R.id.port); + mPortField.setOnClickListener(mOKHandler); + mPortField.setOnFocusChangeListener(mOnFocusChangeHandler); + + mOKButton = (Button)findViewById(R.id.action); + mOKButton.setOnClickListener(mOKHandler); + + Button b = (Button)findViewById(R.id.clear); + b.setOnClickListener(mClearHandler); + + b = (Button)findViewById(R.id.defaultView); + b.setOnClickListener(mDefaultHandler); + } + + void populateFields(boolean useDefault) { + String hostname = null; + int port = -1; + if (useDefault) { + // Use the default proxy settings provided by the carrier + hostname = Proxy.getDefaultHost(); + port = Proxy.getDefaultPort(); + } else { + // Use the last setting given by the user + hostname = Proxy.getHost(this); + port = Proxy.getPort(this); + } + + if (hostname == null) { + hostname = ""; + } + + mHostnameField.setText(hostname); + + String portStr = port == -1 ? "" : Integer.toString(port); + mPortField.setText(portStr); + + Intent intent = getIntent(); + + String buttonLabel = intent.getStringExtra("button-label"); + if (!TextUtils.isEmpty(buttonLabel)) { + mOKButton.setText(buttonLabel); + } + + String title = intent.getStringExtra("title"); + if (!TextUtils.isEmpty(title)) { + setTitle(title); + } + } + + /** + * validate syntax of hostname and port entries + * @return 0 on success, string resource ID on failure + */ + int validate(String hostname, String port) { + Matcher match = HOSTNAME_PATTERN.matcher(hostname); + + if (!match.matches()) return R.string.proxy_error_invalid_host; + + if (hostname.length() > 0 && port.length() == 0) { + return R.string.proxy_error_empty_port; + } + + if (port.length() > 0) { + if (hostname.length() == 0) { + return R.string.proxy_error_empty_host_set_port; + } + int portVal = -1; + try { + portVal = Integer.parseInt(port); + } catch (NumberFormatException ex) { + return R.string.proxy_error_invalid_port; + } + if (portVal <= 0 || portVal > 0xFFFF) { + return R.string.proxy_error_invalid_port; + } + } + return 0; + } + + /** + * returns true on success, false if the user must correct something + */ + boolean saveToDb() { + + String hostname = mHostnameField.getText().toString().trim(); + String portStr = mPortField.getText().toString().trim(); + int port = -1; + + int result = validate(hostname, portStr); + if (result > 0) { + showError(result); + return false; + } + + if (portStr.length() > 0) { + try { + port = Integer.parseInt(portStr); + } catch (NumberFormatException ex) { + return false; + } + } + + // FIXME: The best solution would be to make a better UI that would + // disable editing of the text boxes if the user chooses to use the + // default settings. i.e. checking a box to always use the default + // carrier. http:/b/issue?id=756480 + // FIXME: This currently will not work if the default host is blank and + // the user has cleared the input boxes in order to not use a proxy. + // This is a UI problem and can be solved with some better form + // controls. + // FIXME: If the user types in a proxy that matches the default, should + // we keep that setting? Can be fixed with a new UI. + ContentResolver res = getContentResolver(); + if (hostname.equals(Proxy.getDefaultHost()) + && port == Proxy.getDefaultPort()) { + // If the user hit the default button and didn't change any of + // the input boxes, treat it as if the user has not specified a + // proxy. + hostname = null; + } + + if (!TextUtils.isEmpty(hostname)) { + hostname += ':' + portStr; + } + Settings.System.putString(res, Settings.System.HTTP_PROXY, hostname); + sendBroadcast(new Intent(Proxy.PROXY_CHANGE_ACTION)); + + return true; + } + + OnClickListener mOKHandler = new OnClickListener() { + public void onClick(View v) { + if (saveToDb()) { + finish(); + } + } + }; + + OnClickListener mClearHandler = new OnClickListener() { + public void onClick(View v) { + mHostnameField.setText(""); + mPortField.setText(""); + } + }; + + OnClickListener mDefaultHandler = new OnClickListener() { + public void onClick(View v) { + populateFields(true); + } + }; + + OnFocusChangeListener mOnFocusChangeHandler = new OnFocusChangeListener() { + public void onFocusChange(View v, boolean hasFocus) { + if (hasFocus) { + TextView textView = (TextView) v; + Selection.selectAll((Spannable) textView.getText()); + } + } + }; +} diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java new file mode 100644 index 0000000..ad30de7 --- /dev/null +++ b/src/com/android/settings/RadioInfo.java @@ -0,0 +1,1168 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.res.Resources; +import android.net.Uri; +import android.os.AsyncResult; +import android.os.Bundle; +import android.os.Handler; +import android.os.INetStatService; +import android.os.Message; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemProperties; +import android.pim.DateUtils; +import android.preference.PreferenceManager; +import android.telephony.CellLocation; +import android.telephony.PhoneStateListener; +import android.telephony.ServiceState; +import android.telephony.TelephonyManager; +import android.telephony.gsm.GsmCellLocation; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; +import android.widget.TextView; +import android.widget.EditText; + +import com.android.internal.telephony.Phone; +import com.android.internal.telephony.PhoneFactory; +import com.android.internal.telephony.PhoneStateIntentReceiver; +import com.android.internal.telephony.TelephonyProperties; +import com.android.internal.telephony.gsm.GSMPhone; +import com.android.internal.telephony.gsm.PdpConnection; + +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.net.UnknownHostException; +import java.util.List; + +public class RadioInfo extends Activity { + private final String TAG = "phone"; + + private static final int EVENT_PHONE_STATE_CHANGED = 100; + private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200; + private static final int EVENT_SERVICE_STATE_CHANGED = 300; + private static final int EVENT_CFI_CHANGED = 302; + + private static final int EVENT_QUERY_PREFERRED_TYPE_DONE = 1000; + private static final int EVENT_SET_PREFERRED_TYPE_DONE = 1001; + private static final int EVENT_QUERY_NEIGHBORING_CIDS_DONE = 1002; + private static final int EVENT_SET_QXDMLOG_DONE = 1003; + private static final int EVENT_SET_CIPHER_DONE = 1004; + private static final int EVENT_QUERY_SMSC_DONE = 1005; + private static final int EVENT_UPDATE_SMSC_DONE = 1006; + + private static final int MENU_ITEM_SELECT_BAND = 0; + private static final int MENU_ITEM_VIEW_ADN = 1; + private static final int MENU_ITEM_VIEW_FDN = 2; + private static final int MENU_ITEM_VIEW_SDN = 3; + private static final int MENU_ITEM_GET_PDP_LIST = 4; + private static final int MENU_ITEM_TOGGLE_DATA = 5; + private static final int MENU_ITEM_TOGGLE_DATA_ON_BOOT = 6; + + private TextView mImei; + private TextView mImsi; + private TextView number; + private TextView callState; + private TextView operatorName; + private TextView roamingState; + private TextView gsmState; + private TextView gprsState; + private TextView network; + private TextView dBm; + private TextView mMwi; + private TextView mCfi; + private TextView mLocation; + private TextView mNeighboringCids; + private TextView resets; + private TextView attempts; + private TextView successes; + private TextView disconnects; + private TextView sentSinceReceived; + private TextView sent; + private TextView received; + private TextView mPingIpAddr; + private TextView mPingHostname; + private TextView mHttpClientTest; + private TextView cipherState; + private EditText smsc; + private Button radioPowerButton; + private Button qxdmLogButton; + private Button cipherToggleButton; + private Button pingTestButton; + private Button updateSmscButton; + private Button refreshSmscButton; + private Spinner preferredNetworkType; + + private TelephonyManager mTelephonyManager; + private Phone phone = null; + private PhoneStateIntentReceiver mPhoneStateReceiver; + private INetStatService netstat; + + private OemCommands mOem = null; + private boolean mQxdmLogEnabled; + // The requested cipher state + private boolean mCipherOn; + + private String mPingIpAddrResult; + private String mPingHostnameResult; + private String mHttpClientTestResult; + private boolean mMwiValue = false; + private boolean mCfiValue = false; + + private PhoneStateListener mPhoneStateListener = new PhoneStateListener() { + @Override + public void onDataConnectionStateChanged(int state) { + updateDataState(); + updateDataStats(); + updatePdpList(); + updateNetworkType(); + } + + @Override + public void onDataActivity(int direction) { + updateDataStats2(); + } + + @Override + public void onCellLocationChanged(CellLocation location) { + updateLocation(location); + } + + @Override + public void onMessageWaitingIndicatorChanged(boolean mwi) { + mMwiValue = mwi; + updateMessageWaiting(); + } + + @Override + public void onCallForwardingIndicatorChanged(boolean cfi) { + mCfiValue = cfi; + updateCallRedirect(); + } + }; + + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + AsyncResult ar; + switch (msg.what) { + case EVENT_PHONE_STATE_CHANGED: + updatePhoneState(); + break; + + case EVENT_SIGNAL_STRENGTH_CHANGED: + updateSignalStrength(); + break; + + case EVENT_SERVICE_STATE_CHANGED: + updateServiceState(); + updatePowerState(); + break; + + case EVENT_QUERY_PREFERRED_TYPE_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception == null) { + int type = ((int[])ar.result)[0]; + preferredNetworkType.setSelection(type, true); + } else { + preferredNetworkType.setSelection(3, true); + } + break; + case EVENT_SET_PREFERRED_TYPE_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception != null) { + phone.getPreferredNetworkType( + obtainMessage(EVENT_QUERY_PREFERRED_TYPE_DONE)); + } + break; + case EVENT_QUERY_NEIGHBORING_CIDS_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception == null) { + updateNeighboringCids((String[])ar.result); + } else { + mNeighboringCids.setText("unknown"); + } + break; + case EVENT_SET_QXDMLOG_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception == null) { + mQxdmLogEnabled = !mQxdmLogEnabled; + + updateQxdmState(mQxdmLogEnabled); + displayQxdmEnableResult(); + } + break; + case EVENT_SET_CIPHER_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception == null) { + setCiphPref(mCipherOn); + } + updateCiphState(); + break; + case EVENT_QUERY_SMSC_DONE: + ar= (AsyncResult) msg.obj; + if (ar.exception != null) { + smsc.setText("refresh error"); + } else { + byte[] buf = (byte[]) ar.result; + smsc.setText(new String(buf)); + } + break; + case EVENT_UPDATE_SMSC_DONE: + updateSmscButton.setEnabled(true); + ar= (AsyncResult) msg.obj; + if (ar.exception != null) { + smsc.setText("update error"); + } + break; + default: + break; + + } + } + }; + + private class OemCommands { + + public final int OEM_QXDM_SDLOG_DEFAULT_FILE_SIZE = 32; + public final int OEM_QXDM_SDLOG_DEFAULT_MASK = 0; + public final int OEM_QXDM_SDLOG_DEFAULT_MAX_INDEX = 8; + + final int SIZE_OF_INT = 4; + final int OEM_FEATURE_ENABLE = 1; + final int OEM_FEATURE_DISABLE = 0; + final int OEM_SIMPE_FEAUTURE_LEN = 1; + + final int OEM_QXDM_SDLOG_FUNCTAG = 0x00010000; + final int OEM_QXDM_SDLOG_LEN = 4; + final int OEM_PS_AUTO_ATTACH_FUNCTAG = 0x00020000; + final int OEM_CIPHERING_FUNCTAG = 0x00020001; + final int OEM_SMSC_UPDATE_FUNCTAG = 0x00020002; + final int OEM_SMSC_QUERY_FUNCTAG = 0x00020003; + final int OEM_SMSC_QUERY_LEN = 0; + + /** + * The OEM interface to store QXDM to SD. + * + * To start/stop logging QXDM logs to SD card, use tag + * OEM_RIL_HOOK_QXDM_SD_LOG_SETUP 0x00010000 + * + * "data" is a const oem_ril_hook_qxdm_sdlog_setup_data_st * + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->head.func_tag + * should be OEM_RIL_HOOK_QXDM_SD_LOG_SETUP + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->head.len + * should be "sizeof(unsigned int) * 4" + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->mode + * could be 0 for 'stop logging', or 1 for 'start logging' + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->log_file_size + * will assign the size of each log file, and it could be a value between + * 1 and 512 (in megabytes, default value is recommended to set as 32). + * This value will be ignored when mode == 0. + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->log_mask will + * assign the rule to filter logs, and it is a bitmask (bit0 is for MsgAll, + * bit1 is for LogAll, and bit2 is for EventAll) recommended to be set as 0 + * by default. This value will be ignored when mode == 0. + * ((const oem_ril_hook_qxdm_sdlog_setup_data_st *)data)->log_max_fileindex + * set the how many logfiles will storted before roll over. This value will + * be ignored when mode == 0. + * + * "response" is NULL + * + * typedef struct _oem_ril_hook_raw_head_st { + * unsigned int func_tag; + * unsigned int len; + * } oem_ril_hook_raw_head_st; + * + * typedef struct _oem_ril_hook_qxdm_sdlog_setup_data_st { + * oem_ril_hook_raw_head_st head; + * unsigned int mode; + * unsigned int log_file_size; + * unsigned int log_mask; + * unsigned int log_max_fileindex; + * } oem_ril_hook_qxdm_sdlog_setup_data_st; + * + * @param enable set true to start logging QXDM in SD card + * @param fileSize is the log file size in MB + * @param mask is the log mask to filter + * @param maxIndex is the maximum roll-over file number + * @return byteArray to use in RIL RAW command + */ + byte[] getQxdmSdlogData(boolean enable, int fileSize, int mask, int maxIndex) { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + try { + writeIntLittleEndian(dos, OEM_QXDM_SDLOG_FUNCTAG); + writeIntLittleEndian(dos, OEM_QXDM_SDLOG_LEN * SIZE_OF_INT); + writeIntLittleEndian(dos, enable ? + OEM_FEATURE_ENABLE : OEM_FEATURE_DISABLE); + writeIntLittleEndian(dos, fileSize); + writeIntLittleEndian(dos, mask); + writeIntLittleEndian(dos, maxIndex); + } catch (IOException e) { + return null; + } + return bos.toByteArray(); + } + + byte[] getSmscQueryData() { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + try { + writeIntLittleEndian(dos, OEM_SMSC_QUERY_FUNCTAG); + writeIntLittleEndian(dos, OEM_SMSC_QUERY_LEN * SIZE_OF_INT); + } catch (IOException e) { + return null; + } + return bos.toByteArray(); + } + + byte[] getSmscUpdateData(String smsc) { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + try { + byte[] smsc_bytes = smsc.getBytes(); + writeIntLittleEndian(dos, OEM_SMSC_UPDATE_FUNCTAG); + writeIntLittleEndian(dos, smsc_bytes.length); + dos.write(smsc_bytes); + } catch (IOException e) { + return null; + } + return bos.toByteArray(); + } + + byte[] getPsAutoAttachData(boolean enable) { + return getSimpleFeatureData(OEM_PS_AUTO_ATTACH_FUNCTAG, enable); + } + + byte[] getCipheringData(boolean enable) { + return getSimpleFeatureData(OEM_CIPHERING_FUNCTAG, enable); + } + + private byte[] getSimpleFeatureData(int tag, boolean enable) { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + try { + writeIntLittleEndian(dos, tag); + writeIntLittleEndian(dos, OEM_SIMPE_FEAUTURE_LEN * SIZE_OF_INT); + writeIntLittleEndian(dos, enable ? + OEM_FEATURE_ENABLE : OEM_FEATURE_DISABLE); + } catch (IOException e) { + return null; + } + return bos.toByteArray(); + } + + private void writeIntLittleEndian(DataOutputStream dos, int val) + throws IOException { + dos.writeByte(val); + dos.writeByte(val >> 8); + dos.writeByte(val >> 16); + dos.writeByte(val >> 24); + } + } + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + setContentView(R.layout.radio_info); + + mTelephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); + phone = PhoneFactory.getDefaultPhone(); + + mImei = (TextView) findViewById(R.id.imei); + mImsi = (TextView) findViewById(R.id.imsi); + number = (TextView) findViewById(R.id.number); + callState = (TextView) findViewById(R.id.call); + operatorName = (TextView) findViewById(R.id.operator); + roamingState = (TextView) findViewById(R.id.roaming); + gsmState = (TextView) findViewById(R.id.gsm); + gprsState = (TextView) findViewById(R.id.gprs); + network = (TextView) findViewById(R.id.network); + dBm = (TextView) findViewById(R.id.dbm); + mMwi = (TextView) findViewById(R.id.mwi); + mCfi = (TextView) findViewById(R.id.cfi); + mLocation = (TextView) findViewById(R.id.location); + mNeighboringCids = (TextView) findViewById(R.id.neighboring); + + resets = (TextView) findViewById(R.id.resets); + attempts = (TextView) findViewById(R.id.attempts); + successes = (TextView) findViewById(R.id.successes); + disconnects = (TextView) findViewById(R.id.disconnects); + sentSinceReceived = (TextView) findViewById(R.id.sentSinceReceived); + sent = (TextView) findViewById(R.id.sent); + received = (TextView) findViewById(R.id.received); + cipherState = (TextView) findViewById(R.id.ciphState); + smsc = (EditText) findViewById(R.id.smsc); + + mPingIpAddr = (TextView) findViewById(R.id.pingIpAddr); + mPingHostname = (TextView) findViewById(R.id.pingHostname); + mHttpClientTest = (TextView) findViewById(R.id.httpClientTest); + + preferredNetworkType = (Spinner) findViewById(R.id.preferredNetworkType); + ArrayAdapter<String> adapter = new ArrayAdapter<String> (this, + android.R.layout.simple_spinner_item, mPreferredNetworkLabels); + adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + preferredNetworkType.setAdapter(adapter); + preferredNetworkType.setOnItemSelectedListener(mPreferredNetworkHandler); + + radioPowerButton = (Button) findViewById(R.id.radio_power); + radioPowerButton.setOnClickListener(mPowerButtonHandler); + + qxdmLogButton = (Button) findViewById(R.id.qxdm_log); + qxdmLogButton.setOnClickListener(mQxdmButtonHandler); + + cipherToggleButton = (Button) findViewById(R.id.ciph_toggle); + cipherToggleButton.setOnClickListener(mCipherButtonHandler); + pingTestButton = (Button) findViewById(R.id.ping_test); + pingTestButton.setOnClickListener(mPingButtonHandler); + updateSmscButton = (Button) findViewById(R.id.update_smsc); + updateSmscButton.setOnClickListener(mUpdateSmscButtonHandler); + refreshSmscButton = (Button) findViewById(R.id.refresh_smsc); + refreshSmscButton.setOnClickListener(mRefreshSmscButtonHandler); + + mPhoneStateReceiver = new PhoneStateIntentReceiver(this, mHandler); + mPhoneStateReceiver.notifySignalStrength(EVENT_SIGNAL_STRENGTH_CHANGED); + mPhoneStateReceiver.notifyServiceState(EVENT_SERVICE_STATE_CHANGED); + mPhoneStateReceiver.notifyPhoneCallState(EVENT_PHONE_STATE_CHANGED); + + updateQxdmState(null); + mOem = new OemCommands(); + + phone.getPreferredNetworkType( + mHandler.obtainMessage(EVENT_QUERY_PREFERRED_TYPE_DONE)); + phone.getNeighboringCids( + mHandler.obtainMessage(EVENT_QUERY_NEIGHBORING_CIDS_DONE)); + + netstat = INetStatService.Stub.asInterface(ServiceManager.getService("netstat")); + + CellLocation.requestLocationUpdate(); + } + + @Override + protected void onResume() { + super.onResume(); + + updatePhoneState(); + updateSignalStrength(); + updateMessageWaiting(); + updateCallRedirect(); + updateServiceState(); + updateLocation(mTelephonyManager.getCellLocation()); + updateDataState(); + updateDataStats(); + updateDataStats2(); + updatePowerState(); + updateQxdmState(null); + updateProperties(); + updateCiphState(); + + Log.i(TAG, "[RadioInfo] onResume: register phone & data intents"); + + mPhoneStateReceiver.registerIntent(); + mTelephonyManager.listen(mPhoneStateListener, + PhoneStateListener.LISTEN_DATA_CONNECTION_STATE + | PhoneStateListener.LISTEN_DATA_ACTIVITY + | PhoneStateListener.LISTEN_CELL_LOCATION + | PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR + | PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR); + } + + @Override + public void onPause() { + super.onPause(); + + Log.i(TAG, "[RadioInfo] onPause: unregister phone & data intents"); + + mPhoneStateReceiver.unregisterIntent(); + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(0, MENU_ITEM_SELECT_BAND, 0, R.string.radio_info_band_mode_label).setOnMenuItemClickListener(mSelectBandCallback) + .setAlphabeticShortcut('b'); + menu.add(1, MENU_ITEM_VIEW_ADN, 0, + R.string.radioInfo_menu_viewADN).setOnMenuItemClickListener(mViewADNCallback); + menu.add(1, MENU_ITEM_VIEW_FDN, 0, + R.string.radioInfo_menu_viewFDN).setOnMenuItemClickListener(mViewFDNCallback); + menu.add(1, MENU_ITEM_VIEW_SDN, 0, + R.string.radioInfo_menu_viewSDN).setOnMenuItemClickListener(mViewSDNCallback); + menu.add(1, MENU_ITEM_GET_PDP_LIST, + 0, R.string.radioInfo_menu_getPDP).setOnMenuItemClickListener(mGetPdpList); + menu.add(1, MENU_ITEM_TOGGLE_DATA, + 0, R.string.radioInfo_menu_disableData).setOnMenuItemClickListener(mToggleData); + menu.add(1, MENU_ITEM_TOGGLE_DATA_ON_BOOT, + 0, R.string.radioInfo_menu_disableDataOnBoot).setOnMenuItemClickListener(mToggleDataOnBoot); + return true; + } + + + @Override + public boolean onPrepareOptionsMenu(Menu menu) + { + // Get the TOGGLE DATA menu item in the right state. + MenuItem item = menu.findItem(MENU_ITEM_TOGGLE_DATA); + int state = mTelephonyManager.getDataState(); + boolean visible = true; + + switch (state) { + case TelephonyManager.DATA_CONNECTED: + case TelephonyManager.DATA_SUSPENDED: + item.setTitle(R.string.radioInfo_menu_disableData); + break; + case TelephonyManager.DATA_DISCONNECTED: + item.setTitle(R.string.radioInfo_menu_enableData); + break; + default: + visible = false; + break; + } + item.setVisible(visible); + + // Get the toggle-data-on-boot menu item in the right state. + item = menu.findItem(MENU_ITEM_TOGGLE_DATA_ON_BOOT); + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this.getApplication()); + boolean value = sp.getBoolean(GSMPhone.DATA_DISABLED_ON_BOOT_KEY, false); + if (value) { + item.setTitle(R.string.radioInfo_menu_enableDataOnBoot); + } else { + item.setTitle(R.string.radioInfo_menu_disableDataOnBoot); + } + return true; + } + + private boolean isRadioOn() { + return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF; + } + + private void updatePowerState() { + //log("updatePowerState"); + String buttonText = isRadioOn() ? + getString(R.string.turn_off_radio) : + getString(R.string.turn_on_radio); + radioPowerButton.setText(buttonText); + } + + private void updateQxdmState(Boolean newQxdmStatus) { + SharedPreferences sp = + PreferenceManager.getDefaultSharedPreferences(this.getApplication()); + mQxdmLogEnabled = sp.getBoolean("qxdmstatus", false); + // This is called from onCreate, onResume, and the handler when the status + // is updated. + if (newQxdmStatus != null) { + SharedPreferences.Editor editor = sp.edit(); + editor.putBoolean("qxdmstatus", newQxdmStatus); + editor.commit(); + mQxdmLogEnabled = newQxdmStatus; + } + + String buttonText = mQxdmLogEnabled ? + getString(R.string.turn_off_qxdm) : + getString(R.string.turn_on_qxdm); + qxdmLogButton.setText(buttonText); + } + + private void setCiphPref(boolean value) { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this.getApplication()); + SharedPreferences.Editor editor = sp.edit(); + editor.putBoolean(GSMPhone.CIPHERING_KEY, value); + editor.commit(); + } + + private boolean getCiphPref() { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this.getApplication()); + boolean ret = sp.getBoolean(GSMPhone.CIPHERING_KEY, true); + return ret; + } + + private void updateCiphState() { + cipherState.setText(getCiphPref() ? "Ciphering ON" : "Ciphering OFF"); + } + + private final void + updateSignalStrength() { + int state = + mPhoneStateReceiver.getServiceState().getState(); + Resources r = getResources(); + + if ((ServiceState.STATE_OUT_OF_SERVICE == state) || + (ServiceState.STATE_POWER_OFF == state)) { + dBm.setText("0"); + } + + int signalDbm = mPhoneStateReceiver.getSignalStrengthDbm(); + + if (-1 == signalDbm) signalDbm = 0; + + int signalAsu = mPhoneStateReceiver.getSignalStrength(); + + if (-1 == signalAsu) signalAsu = 0; + + dBm.setText(String.valueOf(signalDbm) + " " + + r.getString(R.string.radioInfo_display_dbm) + " " + + String.valueOf(signalAsu) + " " + + r.getString(R.string.radioInfo_display_asu)); + } + + private final void updateLocation(CellLocation location) { + GsmCellLocation loc = (GsmCellLocation)location; + Resources r = getResources(); + + int lac = loc.getLac(); + int cid = loc.getCid(); + + mLocation.setText(r.getString(R.string.radioInfo_lac) + " = " + + ((lac == -1) ? "unknown" : Integer.toHexString(lac)) + + " " + + r.getString(R.string.radioInfo_cid) + " = " + + ((cid == -1) ? "unknown" : Integer.toHexString(cid))); + } + + private final void updateNeighboringCids(String[] cids) { + if (cids != null && cids.length > 0 && cids[0] != null) { + int size = Integer.parseInt(cids[0]); + String neiborings; + if (size > 0) { + neiborings = "{"; + for (int i=1; i<=size; i++) { + neiborings += cids[i] + ", "; + } + neiborings += "}"; + } else { + neiborings = "none"; + } + mNeighboringCids.setText(neiborings); + } else { + mNeighboringCids.setText("unknown"); + } + } + + private final void + updateMessageWaiting() { + mMwi.setText(String.valueOf(mMwiValue)); + } + + private final void + updateCallRedirect() { + mCfi.setText(String.valueOf(mCfiValue)); + } + + + private final void + updateServiceState() { + ServiceState serviceState = mPhoneStateReceiver.getServiceState(); + int state = serviceState.getState(); + Resources r = getResources(); + String display = r.getString(R.string.radioInfo_unknown); + + switch (state) { + case ServiceState.STATE_IN_SERVICE: + display = r.getString(R.string.radioInfo_service_in); + break; + case ServiceState.STATE_OUT_OF_SERVICE: + case ServiceState.STATE_EMERGENCY_ONLY: + display = r.getString(R.string.radioInfo_service_emergency); + break; + case ServiceState.STATE_POWER_OFF: + display = r.getString(R.string.radioInfo_service_off); + break; + } + + gsmState.setText(display); + + if (serviceState.getRoaming()) { + roamingState.setText(R.string.radioInfo_roaming_in); + } else { + roamingState.setText(R.string.radioInfo_roaming_not); + } + + operatorName.setText(serviceState.getOperatorAlphaLong()); + } + + private final void + updatePhoneState() { + Phone.State state = mPhoneStateReceiver.getPhoneState(); + Resources r = getResources(); + String display = r.getString(R.string.radioInfo_unknown); + + switch (state) { + case IDLE: + display = r.getString(R.string.radioInfo_phone_idle); + break; + case RINGING: + display = r.getString(R.string.radioInfo_phone_ringing); + break; + case OFFHOOK: + display = r.getString(R.string.radioInfo_phone_offhook); + break; + } + + callState.setText(display); + } + + private final void + updateDataState() { + int state = mTelephonyManager.getDataState(); + Resources r = getResources(); + String display = r.getString(R.string.radioInfo_unknown); + + switch (state) { + case TelephonyManager.DATA_CONNECTED: + display = r.getString(R.string.radioInfo_data_connected); + break; + case TelephonyManager.DATA_CONNECTING: + display = r.getString(R.string.radioInfo_data_connecting); + break; + case TelephonyManager.DATA_DISCONNECTED: + display = r.getString(R.string.radioInfo_data_disconnected); + break; + case TelephonyManager.DATA_SUSPENDED: + display = r.getString(R.string.radioInfo_data_suspended); + break; + } + + gprsState.setText(display); + } + + private final void updateNetworkType() { + Resources r = getResources(); + String display = SystemProperties.get(TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, + r.getString(R.string.radioInfo_unknown)); + + network.setText(display); + } + + private final void + updateProperties() { + String s; + Resources r = getResources(); + + s = phone.getDeviceId(); + if (s == null) s = r.getString(R.string.radioInfo_unknown); + mImei.setText(s); + + s = phone.getSubscriberId(); + if (s == null) s = r.getString(R.string.radioInfo_unknown); + mImsi.setText(s); + + s = phone.getLine1Number(); + if (s == null) s = r.getString(R.string.radioInfo_unknown); + number.setText(s); + } + + private final void updateDataStats() { + String s; + + s = SystemProperties.get("net.gsm.radio-reset", "0"); + resets.setText(s); + + s = SystemProperties.get("net.gsm.attempt-gprs", "0"); + attempts.setText(s); + + s = SystemProperties.get("net.gsm.succeed-gprs", "0"); + successes.setText(s); + + //s = SystemProperties.get("net.gsm.disconnect", "0"); + //disconnects.setText(s); + + s = SystemProperties.get("net.ppp.reset-by-timeout", "0"); + sentSinceReceived.setText(s); + } + + private final void updateDataStats2() { + Resources r = getResources(); + + try { + int txPackets = netstat.getTxPackets(); + int rxPackets = netstat.getRxPackets(); + int txBytes = netstat.getTxBytes(); + int rxBytes = netstat.getRxBytes(); + + String packets = r.getString(R.string.radioInfo_display_packets); + String bytes = r.getString(R.string.radioInfo_display_bytes); + + sent.setText(txPackets + " " + packets + ", " + txBytes + " " + bytes); + received.setText(rxPackets + " " + packets + ", " + rxBytes + " " + bytes); + } catch (RemoteException e) { + } + } + + /** + * Ping a IP address. + */ + private final void pingIpAddr() { + try { + // This is hardcoded IP addr. This is for testing purposes. + // We would need to get rid of this before release. + String ipAddress = "74.125.47.104"; + Process p = Runtime.getRuntime().exec("ping -c 1 " + ipAddress); + int status = p.waitFor(); + if (status == 0) { + mPingIpAddrResult = "Pass"; + } else { + mPingIpAddrResult = "Fail: IP addr not reachable"; + } + } catch (IOException e) { + mPingIpAddrResult = "Fail: IOException"; + } catch (InterruptedException e) { + mPingIpAddrResult = "Fail: InterruptedException"; + } + } + + /** + * Ping a host name + */ + private final void pingHostname() { + try { + Process p = Runtime.getRuntime().exec("ping -c 1 www.google.com"); + int status = p.waitFor(); + if (status == 0) { + mPingHostnameResult = "Pass"; + } else { + mPingHostnameResult = "Fail: Host unreachable"; + } + } catch (UnknownHostException e) { + mPingHostnameResult = "Fail: Unknown Host"; + } catch (IOException e) { + mPingHostnameResult= "Fail: IOException"; + } catch (InterruptedException e) { + mPingHostnameResult = "Fail: InterruptedException"; + } + } + + /** + * This function checks for basic functionality of HTTP Client. + */ + private void httpClientTest() { + HttpClient client = new DefaultHttpClient(); + try { + HttpGet request = new HttpGet("http://www.google.com"); + HttpResponse response = client.execute(request); + if (response.getStatusLine().getStatusCode() == 200) { + mHttpClientTestResult = "Pass"; + } else { + mHttpClientTestResult = "Fail: Code: " + String.valueOf(response); + } + request.abort(); + } catch (IOException e) { + mHttpClientTestResult = "Fail: IOException"; + } + } + + private void refreshSmsc() { + byte[] data = mOem.getSmscQueryData(); + if (data == null) return; + phone.invokeOemRilRequestRaw(data, + mHandler.obtainMessage(EVENT_QUERY_SMSC_DONE)); + } + + private final void updatePingState() { + final Handler handler = new Handler(); + // Set all to unknown since the threads will take a few secs to update. + mPingIpAddrResult = getResources().getString(R.string.radioInfo_unknown); + mPingHostnameResult = getResources().getString(R.string.radioInfo_unknown); + mHttpClientTestResult = getResources().getString(R.string.radioInfo_unknown); + + mPingIpAddr.setText(mPingIpAddrResult); + mPingHostname.setText(mPingHostnameResult); + mHttpClientTest.setText(mHttpClientTestResult); + + final Runnable updatePingResults = new Runnable() { + public void run() { + mPingIpAddr.setText(mPingIpAddrResult); + mPingHostname.setText(mPingHostnameResult); + mHttpClientTest.setText(mHttpClientTestResult); + } + }; + Thread ipAddr = new Thread() { + @Override + public void run() { + pingIpAddr(); + handler.post(updatePingResults); + } + }; + ipAddr.start(); + + Thread hostname = new Thread() { + @Override + public void run() { + pingHostname(); + handler.post(updatePingResults); + } + }; + hostname.start(); + + Thread httpClient = new Thread() { + @Override + public void run() { + httpClientTest(); + handler.post(updatePingResults); + } + }; + httpClient.start(); + } + + private final void updatePdpList() { + StringBuilder sb = new StringBuilder("========DATA=======\n"); + + List<PdpConnection> pdps = phone.getCurrentPdpList(); + + for (PdpConnection pdp : pdps) { + sb.append(" State: ").append(pdp.getState().toString()).append("\n"); + if (pdp.getState().isActive()) { + long timeElapsed = + (System.currentTimeMillis() - pdp.getConnectionTime())/1000; + sb.append(" connected at ") + .append(DateUtils.timeString(pdp.getConnectionTime())) + .append(" and elapsed ") + .append(DateUtils.formatElapsedTime(timeElapsed)) + .append("\n to ") + .append(pdp.getApn().toString()) + .append("\ninterface: ") + .append(phone.getInterfaceName(phone.getActiveApn())) + .append("\naddress: ") + .append(phone.getIpAddress(phone.getActiveApn())) + .append("\ngateway: ") + .append(phone.getGateway(phone.getActiveApn())); + String[] dns = phone.getDnsServers(phone.getActiveApn()); + sb.append("\ndns: ").append(dns[0]).append(", ").append(dns[1]); + } else if (pdp.getState().isInactive()) { + sb.append(" disconnected with last try at ") + .append(DateUtils.timeString(pdp.getLastFailTime())) + .append("\n fail because ") + .append(pdp.getLastFailCause().toString()); + } else { + sb.append(" is connecting to ") + .append(pdp.getApn().toString()); + } + sb.append("\n==================="); + } + + + disconnects.setText(sb.toString()); + } + + private void displayQxdmEnableResult() { + String status = mQxdmLogEnabled ? "Start QXDM Log" : "Stop QXDM Log"; + + DialogInterface mProgressPanel = new AlertDialog. + Builder(this).setMessage(status).show(); + + mHandler.postDelayed( + new Runnable() { + public void run() { + finish(); + } + }, 2000); + } + + private MenuItem.OnMenuItemClickListener mViewADNCallback = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + Intent intent = new Intent(Intent.ACTION_VIEW); + // XXX We need to specify the component here because if we don't + // the activity manager will try to resolve the type by calling + // the content provider, which causes it to be loaded in a process + // other than the Dialer process, which causes a lot of stuff to + // break. + intent.setClassName("com.android.phone", + "com.android.phone.SimContacts"); + startActivity(intent); + return true; + } + }; + + private MenuItem.OnMenuItemClickListener mViewFDNCallback = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + Intent intent = new Intent(Intent.ACTION_VIEW); + // XXX We need to specify the component here because if we don't + // the activity manager will try to resolve the type by calling + // the content provider, which causes it to be loaded in a process + // other than the Dialer process, which causes a lot of stuff to + // break. + intent.setClassName("com.android.phone", + "com.android.phone.FdnList"); + startActivity(intent); + return true; + } + }; + + private MenuItem.OnMenuItemClickListener mViewSDNCallback = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + Intent intent = new Intent( + Intent.ACTION_VIEW, Uri.parse("content://sim/sdn")); + // XXX We need to specify the component here because if we don't + // the activity manager will try to resolve the type by calling + // the content provider, which causes it to be loaded in a process + // other than the Dialer process, which causes a lot of stuff to + // break. + intent.setClassName("com.android.phone", + "com.android.phone.ADNList"); + startActivity(intent); + return true; + } + }; + + private void toggleDataDisabledOnBoot() { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this.getApplication()); + SharedPreferences.Editor editor = sp.edit(); + boolean value = sp.getBoolean(GSMPhone.DATA_DISABLED_ON_BOOT_KEY, false); + editor.putBoolean(GSMPhone.DATA_DISABLED_ON_BOOT_KEY, !value); + byte[] data = mOem.getPsAutoAttachData(value); + if (data == null) { + // don't commit + return; + } + + editor.commit(); + phone.invokeOemRilRequestRaw(data, null); + } + + private MenuItem.OnMenuItemClickListener mToggleDataOnBoot = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + toggleDataDisabledOnBoot(); + return true; + } + }; + + private MenuItem.OnMenuItemClickListener mToggleData = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + int state = mTelephonyManager.getDataState(); + switch (state) { + case TelephonyManager.DATA_CONNECTED: + phone.disableDataConnectivity(); + break; + case TelephonyManager.DATA_DISCONNECTED: + phone.enableDataConnectivity(); + break; + default: + // do nothing + break; + } + return true; + } + }; + + private MenuItem.OnMenuItemClickListener mGetPdpList = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + phone.getPdpContextList(null); + return true; + } + }; + + private MenuItem.OnMenuItemClickListener mSelectBandCallback = new MenuItem.OnMenuItemClickListener() { + public boolean onMenuItemClick(MenuItem item) { + Intent intent = new Intent(); + intent.setClass(RadioInfo.this, BandMode.class); + startActivity(intent); + return true; + } + }; + + OnClickListener mPowerButtonHandler = new OnClickListener() { + public void onClick(View v) { + //log("toggle radio power: currently " + (isRadioOn()?"on":"off")); + phone.setRadioPower(!isRadioOn()); + } + }; + + OnClickListener mCipherButtonHandler = new OnClickListener() { + public void onClick(View v) { + mCipherOn = !getCiphPref(); + byte[] data = mOem.getCipheringData(mCipherOn); + + if (data == null) + return; + + cipherState.setText("Setting..."); + phone.invokeOemRilRequestRaw(data, + mHandler.obtainMessage(EVENT_SET_CIPHER_DONE)); + } + }; + + OnClickListener mPingButtonHandler = new OnClickListener() { + public void onClick(View v) { + updatePingState(); + } + }; + + OnClickListener mUpdateSmscButtonHandler = new OnClickListener() { + public void onClick(View v) { + updateSmscButton.setEnabled(false); + byte[] data = mOem.getSmscUpdateData(smsc.getText().toString()); + if (data == null) return; + phone.invokeOemRilRequestRaw(data, + mHandler.obtainMessage(EVENT_UPDATE_SMSC_DONE)); + } + }; + + OnClickListener mRefreshSmscButtonHandler = new OnClickListener() { + public void onClick(View v) { + refreshSmsc(); + } + }; + + OnClickListener mQxdmButtonHandler = new OnClickListener() { + public void onClick(View v) { + byte[] data = mOem.getQxdmSdlogData( + !mQxdmLogEnabled, + mOem.OEM_QXDM_SDLOG_DEFAULT_FILE_SIZE, + mOem.OEM_QXDM_SDLOG_DEFAULT_MASK, + mOem.OEM_QXDM_SDLOG_DEFAULT_MAX_INDEX); + + if (data == null) + return; + + phone.invokeOemRilRequestRaw(data, + mHandler.obtainMessage(EVENT_SET_QXDMLOG_DONE)); + } + }; + + AdapterView.OnItemSelectedListener + mPreferredNetworkHandler = new AdapterView.OnItemSelectedListener() { + public void onItemSelected(AdapterView parent, View v, int pos, long id) { + Message msg = mHandler.obtainMessage(EVENT_SET_PREFERRED_TYPE_DONE); + if (pos>=0 && pos<=2) { + phone.setPreferredNetworkType(pos, msg); + } + } + + public void onNothingSelected(AdapterView parent) { + } + }; + + private String[] mPreferredNetworkLabels = { + "WCDMA preferred", "GSM only", "WCDMA only", "Unknown"}; +} diff --git a/src/com/android/settings/SdCardErrorReceiver.java b/src/com/android/settings/SdCardErrorReceiver.java new file mode 100644 index 0000000..ba35a3c --- /dev/null +++ b/src/com/android/settings/SdCardErrorReceiver.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.content.Intent; +import android.content.BroadcastReceiver; +import android.util.Log; +import android.widget.Toast; + + +/** + * Glue class: connects AlarmAlert IntentReceiver to AlarmAlert + * activity. Passes through Alarm ID. + */ +public class SdCardErrorReceiver extends BroadcastReceiver { + + private static final String TAG = "SdCardErrorReceiver"; + + @Override public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + final int duration = 3500; + if (action.equals(Intent.ACTION_MEDIA_BAD_REMOVAL)) { + Toast.makeText(context, R.string.sdcard_removal_alert_title, duration).show(); + } else if (action.equals(Intent.ACTION_MEDIA_UNMOUNTABLE)) { + Toast.makeText(context, R.string.sdcard_unmountable_alert_title, duration).show(); + } else { + Log.e(TAG, "unknown intent"); + } + } +} diff --git a/src/com/android/settings/SdCardIntentReceiver.java b/src/com/android/settings/SdCardIntentReceiver.java new file mode 100644 index 0000000..9648ec1 --- /dev/null +++ b/src/com/android/settings/SdCardIntentReceiver.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.Notification; +import android.app.NotificationManager; +import android.content.Context; +import android.content.Intent; +import android.content.BroadcastReceiver; +import android.util.Config; +import android.util.Log; + +/** + * + */ +public class SdCardIntentReceiver extends BroadcastReceiver { + + private static final int SDCARD_STATUS = 1; + private static final String TAG = "SdCardIntentReceiver"; + + @Override + public void onReceive(Context context, Intent intent) { + NotificationManager nm = (NotificationManager) context + .getSystemService(Context.NOTIFICATION_SERVICE); + String action = intent.getAction(); + if (Config.LOGD) Log.d(TAG, "onReceiveIntent " + action); + + if (action.equals(Intent.ACTION_MEDIA_MOUNTED)) { + nm.cancel(SDCARD_STATUS); + + Intent statusIntent = new Intent(Intent.ACTION_MAIN, null); + statusIntent.setClass(context, SdCardSettings.class); + nm.notify(SDCARD_STATUS, new Notification(context, + android.R.drawable.stat_notify_sdcard, + null, + System.currentTimeMillis(), + context.getText(R.string.sdcard_setting), + null, + statusIntent)); + } else if (action.equals(Intent.ACTION_MEDIA_REMOVED)) { + nm.cancel(SDCARD_STATUS); + } else if (action.equals(Intent.ACTION_MEDIA_SHARED)) { + nm.cancel(SDCARD_STATUS); + + Intent statusIntent = new Intent(Intent.ACTION_MAIN, null); + statusIntent.setClass(context, SdCardSettings.class); + nm.notify(SDCARD_STATUS, new Notification(context, + android.R.drawable.stat_notify_sdcard_usb, + null, + System.currentTimeMillis(), + "SD Card", + null, + statusIntent)); + } + } +} diff --git a/src/com/android/settings/SdCardSettings.java b/src/com/android/settings/SdCardSettings.java new file mode 100644 index 0000000..d10166a --- /dev/null +++ b/src/com/android/settings/SdCardSettings.java @@ -0,0 +1,218 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.app.Activity; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Bundle; +import android.os.RemoteException; +import android.os.Environment; +import android.os.IMountService; +import android.os.ServiceManager; +import android.os.StatFs; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.TextView; + +import java.io.File; + + +public class SdCardSettings extends Activity +{ + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + setContentView(R.layout.sdcard_settings_screen); + + mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount")); + + mRemovedLayout = findViewById(R.id.removed); + mMountedLayout = findViewById(R.id.mounted); + mUnmountedLayout = findViewById(R.id.unmounted); + mScanningLayout = findViewById(R.id.scanning); + mSharedLayout = findViewById(R.id.shared); + mBadRemovalLayout = findViewById(R.id.bad_removal); + mReadOnlyStatus = findViewById(R.id.read_only); + + mMassStorage = (CheckBox)findViewById(R.id.mass_storage); + mMassStorage.setOnClickListener(mMassStorageListener); + + Button unmountButton = (Button)findViewById(R.id.sdcard_unmount); + unmountButton.setOnClickListener(mUnmountButtonHandler); + + mTotalSize = (TextView)findViewById(R.id.total); + mUsedSize = (TextView)findViewById(R.id.used); + mAvailableSize = (TextView)findViewById(R.id.available); + + // install an intent filter to receive SD card related events. + IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_REMOVED); + intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED); + intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED); + intentFilter.addAction(Intent.ACTION_MEDIA_SHARED); + intentFilter.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL); + intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED); + intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED); + intentFilter.addDataScheme("file"); + registerReceiver(mReceiver, intentFilter); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + } + + @Override + public void onResume() { + super.onResume(); + update(); + } + + private void setLayout(View layout) { + mRemovedLayout.setVisibility(layout == mRemovedLayout ? View.VISIBLE : View.GONE); + mMountedLayout.setVisibility(layout == mMountedLayout ? View.VISIBLE : View.GONE); + mUnmountedLayout.setVisibility(layout == mUnmountedLayout ? View.VISIBLE : View.GONE); + mScanningLayout.setVisibility(layout == mScanningLayout ? View.VISIBLE : View.GONE); + mSharedLayout.setVisibility(layout == mSharedLayout ? View.VISIBLE : View.GONE); + mBadRemovalLayout.setVisibility(layout == mBadRemovalLayout ? View.VISIBLE : View.GONE); + } + + private void update() { + try { + mMassStorage.setChecked(mMountService.getMassStorageEnabled()); + } catch (RemoteException ex) { + } + + String scanVolume = null; // this no longer exists: SystemProperties.get(MediaScanner.CURRENT_VOLUME_PROPERTY, ""); + boolean scanning = "external".equals(scanVolume); + + if (scanning) { + setLayout(mScanningLayout); + } else { + String status = Environment.getExternalStorageState(); + boolean readOnly = false; + + if (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { + status = Environment.MEDIA_MOUNTED; + readOnly = true; + } + + if (status.equals(Environment.MEDIA_MOUNTED)) { + try { + File path = Environment.getExternalStorageDirectory(); + StatFs stat = new StatFs(path.getPath()); + long blockSize = stat.getBlockSize(); + long totalBlocks = stat.getBlockCount(); + long availableBlocks = stat.getAvailableBlocks(); + + mTotalSize.setText(formatSize(totalBlocks * blockSize)); + mUsedSize.setText(formatSize((totalBlocks - availableBlocks) * blockSize)); + mAvailableSize.setText(formatSize(availableBlocks * blockSize)); + } catch (IllegalArgumentException e) { + // this can occur if the SD card is removed, but we haven't received the + // ACTION_MEDIA_REMOVED Intent yet. + status = Environment.MEDIA_REMOVED; + } + + mReadOnlyStatus.setVisibility(readOnly ? View.VISIBLE : View.GONE); + setLayout(mMountedLayout); + } else if (status.equals(Environment.MEDIA_UNMOUNTED)) { + setLayout(mUnmountedLayout); + } else if (status.equals(Environment.MEDIA_REMOVED)) { + setLayout(mRemovedLayout); + } else if (status.equals(Environment.MEDIA_SHARED)) { + setLayout(mSharedLayout); + } else if (status.equals(Environment.MEDIA_BAD_REMOVAL)) { + setLayout(mBadRemovalLayout); + } + } + } + + private String formatSize(long size) { + String suffix = null; + + // add K or M suffix if size is greater than 1K or 1M + if (size >= 1024) { + suffix = "K"; + size /= 1024; + if (size >= 1024) { + suffix = "M"; + size /= 1024; + } + } + + StringBuilder resultBuffer = new StringBuilder(Long.toString(size)); + + int commaOffset = resultBuffer.length() - 3; + while (commaOffset > 0) { + resultBuffer.insert(commaOffset, ','); + commaOffset -= 3; + } + + if (suffix != null) + resultBuffer.append(suffix); + return resultBuffer.toString(); + } + + OnClickListener mMassStorageListener = new OnClickListener() { + public void onClick(View v) { + try { + mMountService.setMassStorageEnabled(mMassStorage.isChecked()); + } catch (RemoteException ex) { + } + } + }; + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + update(); + } + }; + + OnClickListener mUnmountButtonHandler = new OnClickListener() { + public void onClick(View v) { + try { + mMountService.unmountMedia(Environment.getExternalStorageDirectory().toString()); + } catch (RemoteException ex) { + } + } + }; + + + private int mStatus; + private IMountService mMountService; + + private CheckBox mMassStorage; + + private TextView mTotalSize; + private TextView mUsedSize; + private TextView mAvailableSize; + + private View mRemovedLayout; + private View mMountedLayout; + private View mUnmountedLayout; + private View mScanningLayout; + private View mSharedLayout; + private View mBadRemovalLayout; + private View mReadOnlyStatus; +} diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java new file mode 100644 index 0000000..c1a509a --- /dev/null +++ b/src/com/android/settings/SecuritySettings.java @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.location.LocationManager; +import android.os.Bundle; +import android.preference.CheckBoxPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceCategory; +import android.preference.PreferenceScreen; +import android.provider.Settings; +import android.util.Config; +import android.util.Log; + +import com.android.internal.widget.LockPatternUtils; + +/** + * Gesture lock pattern settings. + */ +public class SecuritySettings extends PreferenceActivity + implements SharedPreferences.OnSharedPreferenceChangeListener { + + // Lock Settings + + private static final String KEY_LOCK_ENABLED = "lockenabled"; + private static final String KEY_VISIBLE_PATTERN = "visiblepattern"; + private static final int CONFIRM_PATTERN_REQUEST_CODE = 55; + + private LockPatternUtils mLockPatternUtils; + private CheckBoxPreference mLockEnabled; + private CheckBoxPreference mVisiblePattern; + private Preference mChoosePattern; + + private CheckBoxPreference mShowPassword; + + // Location Settings + + private static final String LOCATION_NETWORK = "location_network"; + private static final String LOCATION_GPS = "location_gps"; + + private CheckBoxPreference mNetwork; + private CheckBoxPreference mGps; + private LocationManager mLocationManager; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.security_settings); + + mLockPatternUtils = new LockPatternUtils(getContentResolver()); + + createPreferenceHierarchy(); + + // Get the available location providers + mLocationManager = (LocationManager) + getSystemService(Context.LOCATION_SERVICE); + + mNetwork = (CheckBoxPreference) getPreferenceScreen().findPreference(LOCATION_NETWORK); + mGps = (CheckBoxPreference) getPreferenceScreen().findPreference(LOCATION_GPS); + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); + updateToggles(); + } + + private PreferenceScreen createPreferenceHierarchy() { + // Root + PreferenceScreen root = this.getPreferenceScreen(); + + // Inline preferences + PreferenceCategory inlinePrefCat = new PreferenceCategory(this); + inlinePrefCat.setTitle(R.string.lock_settings_title); + root.addPreference(inlinePrefCat); + + // autolock toggle + mLockEnabled = new LockEnabledPref(this); + mLockEnabled.setTitle(R.string.lockpattern_settings_enable_title); + mLockEnabled.setSummary(R.string.lockpattern_settings_enable_summary); + mLockEnabled.setKey(KEY_LOCK_ENABLED); + inlinePrefCat.addPreference(mLockEnabled); + + // visible pattern + mVisiblePattern = new CheckBoxPreference(this); + mVisiblePattern.setKey(KEY_VISIBLE_PATTERN); + mVisiblePattern.setTitle(R.string.lockpattern_settings_enable_visible_pattern_title); + inlinePrefCat.addPreference(mVisiblePattern); + + // change pattern lock + Intent intent = new Intent(); + intent.setClassName("com.android.settings", + "com.android.settings.ChooseLockPatternTutorial"); + mChoosePattern = getPreferenceManager().createPreferenceScreen(this); + mChoosePattern.setIntent(intent); + inlinePrefCat.addPreference(mChoosePattern); + + PreferenceScreen simLockPreferences = getPreferenceManager() + .createPreferenceScreen(this); + simLockPreferences.setTitle(R.string.sim_lock_settings_category); + // Intent to launch SIM lock settings + intent = new Intent(); + intent.setClassName("com.android.settings", "com.android.settings.SimLockSettings"); + simLockPreferences.setIntent(intent); + + PreferenceCategory simLockCat = new PreferenceCategory(this); + simLockCat.setTitle(R.string.sim_lock_settings_title); + root.addPreference(simLockCat); + simLockCat.addPreference(simLockPreferences); + + // Passwords + PreferenceCategory passwordsCat = new PreferenceCategory(this); + passwordsCat.setTitle(R.string.security_passwords_title); + root.addPreference(passwordsCat); + + CheckBoxPreference showPassword = mShowPassword = new CheckBoxPreference(this); + showPassword.setKey("show_password"); + showPassword.setTitle(R.string.show_password); + showPassword.setSummary(R.string.show_password_summary); + showPassword.setPersistent(false); + passwordsCat.addPreference(showPassword); + + return root; + } + + @Override + protected void onResume() { + super.onResume(); + + boolean patternExists = mLockPatternUtils.savedPatternExists(); + mLockEnabled.setEnabled(patternExists); + mVisiblePattern.setEnabled(patternExists); + + mLockEnabled.setChecked(mLockPatternUtils.isLockPatternEnabled()); + mVisiblePattern.setChecked(mLockPatternUtils.isVisiblePatternEnabled()); + + int chooseStringRes = mLockPatternUtils.savedPatternExists() ? + R.string.lockpattern_settings_change_lock_pattern : + R.string.lockpattern_settings_choose_lock_pattern; + mChoosePattern.setTitle(chooseStringRes); + + mShowPassword + .setChecked(Settings.System.getInt(getContentResolver(), + Settings.System.TEXT_SHOW_PASSWORD, 1) != 0); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, + Preference preference) { + final String key = preference.getKey(); + + if (KEY_LOCK_ENABLED.equals(key)) { + mLockPatternUtils.setLockPatternEnabled(isToggled(preference)); + } else if (KEY_VISIBLE_PATTERN.equals(key)) { + mLockPatternUtils.setVisiblePatternEnabled(isToggled(preference)); + } else if (preference == mShowPassword) { + Settings.System.putInt(getContentResolver(), Settings.System.TEXT_SHOW_PASSWORD, + mShowPassword.isChecked() ? 1 : 0); + } + + return false; + } + + /* + * Creates toggles for each available location provider + */ + private void updateToggles() { + String providers = getAllowedProviders(); + mNetwork.setChecked(providers.contains(LocationManager.NETWORK_PROVIDER)); + mGps.setChecked(providers.contains(LocationManager.GPS_PROVIDER)); + } + + private void updateProviders() { + String preferredProviders = ""; + if (mNetwork.isChecked()) { + preferredProviders += LocationManager.NETWORK_PROVIDER; + } + if (mGps.isChecked()) { + preferredProviders += "," + LocationManager.GPS_PROVIDER; + } + setProviders(preferredProviders); + } + + private void setProviders(String providers) { + // Update the system setting LOCATION_PROVIDERS_ALLOWED + Settings.System.putString(getContentResolver(), + Settings.System.LOCATION_PROVIDERS_ALLOWED, providers); + if (Config.LOGV) { + Log.v("Location Accuracy", "Setting LOCATION_PROVIDERS_ALLOWED = " + providers); + } + // Inform the location manager about the changes + mLocationManager.updateProviders(); + } + + /** + * @return string containing a list of providers that have been enabled for use + */ + private String getAllowedProviders() { + String allowedProviders = + Settings.System.getString(getContentResolver(), + Settings.System.LOCATION_PROVIDERS_ALLOWED); + if (allowedProviders == null) { + allowedProviders = ""; + } + return allowedProviders; + } + + public void onSharedPreferenceChanged(SharedPreferences preferences, String key) { + if (LOCATION_NETWORK.equals(key) || LOCATION_GPS.equals(key)) { + updateProviders(); + } + } + + private boolean isToggled(Preference pref) { + return ((CheckBoxPreference) pref).isChecked(); + } + + + /** + * For the user to disable keyguard, we first make them verify their + * existing pattern. + */ + private class LockEnabledPref extends CheckBoxPreference { + + public LockEnabledPref(Context context) { + super(context); + } + + @Override + protected void onClick() { + if (isChecked() && mLockPatternUtils.savedPatternExists()) { + confirmPatternThenDisable(); + } else { + super.onClick(); + } + } + } + + /** + * Launch screen to confirm the existing lock pattern. + * @see #onActivityResult(int, int, android.content.Intent) + */ + private void confirmPatternThenDisable() { + final Intent intent = new Intent(); + intent.setClassName("com.android.settings", "com.android.settings.ConfirmLockPattern"); + startActivityForResult(intent, CONFIRM_PATTERN_REQUEST_CODE); + } + + /** + * @see #confirmPatternThenDisable + */ + @Override + protected void onActivityResult(int requestCode, int resultCode, + Intent data) { + super.onActivityResult(requestCode, resultCode, data); + + if (requestCode != CONFIRM_PATTERN_REQUEST_CODE) { + return; + } + + if (resultCode == Activity.RESULT_OK) { + mLockPatternUtils.setLockPatternEnabled(false); + } + } +} diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java new file mode 100644 index 0000000..9f98ab2 --- /dev/null +++ b/src/com/android/settings/Settings.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.os.Bundle; +import android.preference.PreferenceActivity; +import android.preference.PreferenceGroup; +import android.provider.Settings.System; + +public class Settings extends PreferenceActivity { + + private static final String KEY_PARENT = "parent"; + private static final String KEY_CALL_SETTINGS = "call_settings"; + private static final String KEY_SYNC_SETTINGS = "sync_settings"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.settings); + + PreferenceGroup parent = (PreferenceGroup) findPreference(KEY_PARENT); + Utils.updatePreferenceToSpecificActivityOrRemove(this, parent, KEY_SYNC_SETTINGS, 0); + } + + @Override + protected void onResume() { + findPreference(KEY_CALL_SETTINGS).setEnabled(!isAirplaneMode()); + super.onResume(); + } + + private boolean isAirplaneMode() { + return System.getInt(getContentResolver(), + System.AIRPLANE_MODE_ON, 0) > 0; + } + +} diff --git a/src/com/android/settings/SettingsLicenseActivity.java b/src/com/android/settings/SettingsLicenseActivity.java new file mode 100644 index 0000000..82eadca --- /dev/null +++ b/src/com/android/settings/SettingsLicenseActivity.java @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import android.os.Bundle; +import android.os.SystemProperties; +import android.text.TextUtils; +import android.util.Config; +import android.util.Log; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.Toast; + +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.UnsupportedEncodingException; + +import com.android.internal.app.AlertActivity; +import com.android.internal.app.AlertController; + +import org.apache.commons.codec.binary.Base64; + +/** + * The "dialog" that shows from "License" in the Settings app. + */ +public class SettingsLicenseActivity extends AlertActivity { + + private static final String TAG = "SettingsLicenseActivity"; + private static final boolean LOGV = false || Config.LOGV; + + private static final String DEFAULT_LICENSE_PATH = "/system/etc/NOTICE.html"; + private static final String PROPERTY_LICENSE_PATH = "ro.config.license_path"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + String fileName = SystemProperties.get(PROPERTY_LICENSE_PATH, DEFAULT_LICENSE_PATH); + if (TextUtils.isEmpty(fileName)) { + Log.e(TAG, "The system property for the license file is empty."); + showErrorAndFinish(); + return; + } + + FileReader fileReader = null; + StringBuilder data = null; + try { + data = new StringBuilder(2048); + char tmp[] = new char[2048]; + int numRead; + fileReader = new FileReader(fileName); + while ((numRead = fileReader.read(tmp)) >= 0) { + data.append(tmp, 0, numRead); + } + } catch (FileNotFoundException e) { + Log.e(TAG, "License HTML file not found at " + fileName, e); + showErrorAndFinish(); + return; + } catch (IOException e) { + Log.e(TAG, "Error reading license HTML file at " + fileName, e); + showErrorAndFinish(); + return; + } finally { + try { + if (fileReader != null) { + fileReader.close(); + } + } catch (IOException e) { + } + } + + if (TextUtils.isEmpty(data)) { + Log.e(TAG, "License HTML is empty (from " + fileName + ")"); + showErrorAndFinish(); + return; + } + + WebView webView = new WebView(this); + + if (LOGV) Log.v(TAG, "Started encode at " + System.currentTimeMillis()); + // Need to encode to base64 for WebView to load the contents properly + String dataStr; + try { + byte[] base64Bytes = Base64.encodeBase64(data.toString().getBytes("ISO8859_1")); + dataStr = new String(base64Bytes); + } catch (UnsupportedEncodingException e) { + Log.e(TAG, "Could not convert to base64", e); + showErrorAndFinish(); + return; + } + if (LOGV) Log.v(TAG, "Ended encode at " + System.currentTimeMillis()); + if (LOGV) { + Log.v(TAG, "Started test decode at " + System.currentTimeMillis()); + Base64.decodeBase64(dataStr.getBytes()); + Log.v(TAG, "Ended decode at " + System.currentTimeMillis()); + } + + + // Begin the loading. This will be done in a separate thread in WebView. + webView.loadData(dataStr, "text/html", "base64"); + webView.setWebViewClient(new WebViewClient() { + @Override + public void onPageFinished(WebView view, String url) { + // Change from 'Loading...' to the real title + mAlert.setTitle(getString(R.string.settings_license_activity_title)); + } + }); + + final AlertController.AlertParams p = mAlertParams; + p.mTitle = getString(R.string.settings_license_activity_loading); + p.mView = webView; + p.mForceInverseBackground = true; + setupAlert(); + } + + private void showErrorAndFinish() { + Toast.makeText(this, R.string.settings_license_activity_unavailable, Toast.LENGTH_LONG) + .show(); + finish(); + } + +} diff --git a/src/com/android/settings/SimLockSettings.java b/src/com/android/settings/SimLockSettings.java new file mode 100644 index 0000000..286e3d6 --- /dev/null +++ b/src/com/android/settings/SimLockSettings.java @@ -0,0 +1,321 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.content.res.Resources; +import android.os.AsyncResult; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.CheckBoxPreference; +import android.preference.PreferenceScreen; +import com.android.internal.telephony.Phone; +import com.android.internal.telephony.PhoneFactory; +import android.widget.Toast; + +/** + * Implements the preference screen to enable/disable SIM lock and + * also the dialogs to change the SIM PIN. In the former case, enabling/disabling + * the SIM lock will prompt the user for the current PIN. + * In the Change PIN case, it prompts the user for old pin, new pin and new pin + * again before attempting to change it. Calls the SimCard interface to execute + * these operations. + * + */ +public class SimLockSettings extends PreferenceActivity + implements EditPinPreference.OnPinEnteredListener { + + private static final int OFF_MODE = 0; + // State when enabling/disabling SIM lock + private static final int SIM_LOCK_MODE = 1; + // State when entering the old pin + private static final int SIM_OLD_MODE = 2; + // State when entering the new pin - first time + private static final int SIM_NEW_MODE = 3; + // State when entering the new pin - second time + private static final int SIM_REENTER_MODE = 4; + + // Keys in xml file + private static final String PIN_DIALOG = "sim_pin"; + private static final String PIN_TOGGLE = "sim_toggle"; + // Keys in icicle + private static final String DIALOG_STATE = "dialogState"; + private static final String DIALOG_PIN = "dialogPin"; + private static final String DIALOG_ERROR = "dialogError"; + private static final String ENABLE_TO_STATE = "enableState"; + + private static final int MIN_PIN_LENGTH = 4; + private static final int MAX_PIN_LENGTH = 8; + // Which dialog to show next when popped up + private int mDialogState = OFF_MODE; + + private String mPin; + private String mOldPin; + private String mNewPin; + private String mError; + // Are we trying to enable or disable SIM lock? + private boolean mToState; + + private Phone mPhone; + + private EditPinPreference mPinDialog; + private CheckBoxPreference mPinToggle; + + private Resources mRes; + + // For async handler to identify request type + private static final int ENABLE_SIM_PIN_COMPLETE = 100; + private static final int CHANGE_SIM_PIN_COMPLETE = 101; + + // For replies from SimCard interface + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + AsyncResult ar = (AsyncResult) msg.obj; + switch (msg.what) { + case ENABLE_SIM_PIN_COMPLETE: + simLockChanged(ar.exception == null); + break; + case CHANGE_SIM_PIN_COMPLETE: + simPinChanged(ar.exception == null); + break; + } + + return; + } + }; + + // For top-level settings screen to query + static boolean isSimLockEnabled() { + return PhoneFactory.getDefaultPhone().getSimCard().getSimLockEnabled(); + } + + static String getSummary(Context context) { + Resources res = context.getResources(); + String summary = isSimLockEnabled() + ? res.getString(R.string.sim_lock_on) + : res.getString(R.string.sim_lock_off); + return summary; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.sim_lock_settings); + + mPinDialog = (EditPinPreference) findPreference(PIN_DIALOG); + mPinToggle = (CheckBoxPreference) findPreference(PIN_TOGGLE); + if (savedInstanceState != null && savedInstanceState.containsKey(DIALOG_STATE)) { + mDialogState = savedInstanceState.getInt(DIALOG_STATE); + mPin = savedInstanceState.getString(DIALOG_PIN); + mError = savedInstanceState.getString(DIALOG_ERROR); + mToState = savedInstanceState.getBoolean(ENABLE_TO_STATE); + } + + mPinDialog.setOnPinEnteredListener(this); + + // Don't need any changes to be remembered + getPreferenceScreen().setPersistent(false); + + mPhone = PhoneFactory.getDefaultPhone(); + mRes = getResources(); + } + + @Override + protected void onResume() { + super.onResume(); + + mPinToggle.setChecked(mPhone.getSimCard().getSimLockEnabled()); + + if (mDialogState != OFF_MODE) { + showPinDialog(); + } else { + // Prep for standard click on "Change PIN" + resetDialogState(); + } + } + + @Override + protected void onSaveInstanceState(Bundle out) { + // Need to store this state for slider open/close + // There is one case where the dialog is popped up by the preference + // framework. In that case, let the preference framework store the + // dialog state. In other cases, where this activity manually launches + // the dialog, store the state of the dialog. + if (mPinDialog.isDialogOpen()) { + out.putInt(DIALOG_STATE, mDialogState); + out.putString(DIALOG_PIN, mPinDialog.getEditText().getText().toString()); + out.putString(DIALOG_ERROR, mError); + out.putBoolean(ENABLE_TO_STATE, mToState); + } else { + super.onSaveInstanceState(out); + } + } + + private void showPinDialog() { + if (mDialogState == OFF_MODE) { + return; + } + setDialogValues(); + + mPinDialog.showPinDialog(); + } + + private void setDialogValues() { + mPinDialog.setText(mPin); + String message = ""; + switch (mDialogState) { + case SIM_LOCK_MODE: + message = mRes.getString(R.string.sim_enter_pin); + mPinDialog.setDialogTitle(mToState + ? mRes.getString(R.string.sim_enable_sim_lock) + : mRes.getString(R.string.sim_disable_sim_lock)); + break; + case SIM_OLD_MODE: + message = mRes.getString(R.string.sim_enter_old); + mPinDialog.setDialogTitle(mRes.getString(R.string.sim_change_pin)); + break; + case SIM_NEW_MODE: + message = mRes.getString(R.string.sim_enter_new); + mPinDialog.setDialogTitle(mRes.getString(R.string.sim_change_pin)); + break; + case SIM_REENTER_MODE: + message = mRes.getString(R.string.sim_reenter_new); + mPinDialog.setDialogTitle(mRes.getString(R.string.sim_change_pin)); + break; + } + if (mError != null) { + message = mError + "\n" + message; + mError = null; + } + mPinDialog.setDialogMessage(message); + } + + public void onPinEntered(EditPinPreference preference, boolean positiveResult) { + if (!positiveResult) { + resetDialogState(); + return; + } + + mPin = preference.getText(); + if (!reasonablePin(mPin)) { + // inject error message and display dialog again + mError = mRes.getString(R.string.sim_bad_pin); + showPinDialog(); + return; + } + switch (mDialogState) { + case SIM_LOCK_MODE: + tryChangeSimLockState(); + break; + case SIM_OLD_MODE: + mOldPin = mPin; + mDialogState = SIM_NEW_MODE; + mError = null; + mPin = null; + showPinDialog(); + break; + case SIM_NEW_MODE: + mNewPin = mPin; + mDialogState = SIM_REENTER_MODE; + mPin = null; + showPinDialog(); + break; + case SIM_REENTER_MODE: + if (!mPin.equals(mNewPin)) { + mError = mRes.getString(R.string.sim_pins_dont_match); + mDialogState = SIM_NEW_MODE; + mPin = null; + showPinDialog(); + } else { + mError = null; + tryChangePin(); + } + break; + } + } + + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mPinToggle) { + // Get the new, preferred state + mToState = mPinToggle.isChecked(); + // Flip it back and pop up pin dialog + mPinToggle.setChecked(!mToState); + mDialogState = SIM_LOCK_MODE; + showPinDialog(); + } + return true; + } + + private void tryChangeSimLockState() { + // Try to change sim lock. If it succeeds, toggle the lock state and + // reset dialog state. Else inject error message and show dialog again. + Message callback = Message.obtain(mHandler, ENABLE_SIM_PIN_COMPLETE); + mPhone.getSimCard().setSimLockEnabled(mToState, mPin, callback); + + } + + private void simLockChanged(boolean success) { + if (success) { + mPinToggle.setChecked(mToState); + } else { + // TODO: I18N + Toast.makeText(this, mRes.getString(R.string.sim_lock_failed), Toast.LENGTH_SHORT) + .show(); + } + resetDialogState(); + } + + private void simPinChanged(boolean success) { + if (!success) { + // TODO: I18N + Toast.makeText(this, mRes.getString(R.string.sim_change_failed), + Toast.LENGTH_SHORT) + .show(); + } else { + Toast.makeText(this, mRes.getString(R.string.sim_change_succeeded), + Toast.LENGTH_SHORT) + .show(); + + } + resetDialogState(); + } + + private void tryChangePin() { + Message callback = Message.obtain(mHandler, CHANGE_SIM_PIN_COMPLETE); + mPhone.getSimCard().changeSimLockPassword(mOldPin, + mNewPin, callback); + } + + private boolean reasonablePin(String pin) { + if (pin == null || pin.length() < MIN_PIN_LENGTH || pin.length() > MAX_PIN_LENGTH) { + return false; + } else { + return true; + } + } + + private void resetDialogState() { + mError = null; + mDialogState = SIM_OLD_MODE; // Default for when Change PIN is clicked + mPin = ""; + setDialogValues(); + } +} diff --git a/src/com/android/settings/SoundAndDisplaySettings.java b/src/com/android/settings/SoundAndDisplaySettings.java new file mode 100644 index 0000000..887fb8f --- /dev/null +++ b/src/com/android/settings/SoundAndDisplaySettings.java @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT; + +import android.content.BroadcastReceiver; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.media.AudioManager; +import android.os.Bundle; +import android.preference.ListPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.preference.CheckBoxPreference; +import android.provider.Settings; +import android.util.Log; + +public class SoundAndDisplaySettings extends PreferenceActivity implements + Preference.OnPreferenceChangeListener { + private static final String TAG = "SoundAndDisplaysSettings"; + + /** If there is no setting in the provider, use this. */ + private static final int FALLBACK_SCREEN_TIMEOUT_VALUE = 30000; + + private static final String KEY_SILENT = "silent"; + private static final String KEY_VIBRATE = "vibrate"; + private static final String KEY_SCREEN_TIMEOUT = "screen_timeout"; + private static final String KEY_DTMF_TONE = "dtmf_tone"; + private static final String KEY_SOUND_EFFECTS = "sound_effects"; + + private CheckBoxPreference mSilent; + private CheckBoxPreference mVibrate; + private CheckBoxPreference mDtmfTone; + private CheckBoxPreference mSoundEffects; + + private AudioManager mAudioManager; + + private BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + + int ringerMode = intent + .getIntExtra(AudioManager.EXTRA_RINGER_MODE, AudioManager.RINGER_MODE_NORMAL); + boolean isSilentMode = ringerMode != AudioManager.RINGER_MODE_NORMAL; + + if (mSilent.isChecked() != isSilentMode) { + mSilent.setChecked(isSilentMode); + } + } + }; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + ContentResolver resolver = getContentResolver(); + + mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); + + addPreferencesFromResource(R.xml.sound_and_display_settings); + + mSilent = (CheckBoxPreference) findPreference(KEY_SILENT); + mVibrate = (CheckBoxPreference) findPreference(KEY_VIBRATE); + mDtmfTone = (CheckBoxPreference) findPreference(KEY_DTMF_TONE); + mDtmfTone.setPersistent(false); + mDtmfTone.setChecked(Settings.System.getInt(resolver, + Settings.System.DTMF_TONE_WHEN_DIALING, 1) != 0); + mSoundEffects = (CheckBoxPreference) findPreference(KEY_SOUND_EFFECTS); + mSoundEffects.setPersistent(false); + mSoundEffects.setChecked(Settings.System.getInt(resolver, + Settings.System.SOUND_EFFECTS_ENABLED, 0) != 0); + + ListPreference screenTimeoutPreference = + (ListPreference) findPreference(KEY_SCREEN_TIMEOUT); + screenTimeoutPreference.setValue(String.valueOf(Settings.System.getInt( + getContentResolver(), SCREEN_OFF_TIMEOUT, FALLBACK_SCREEN_TIMEOUT_VALUE))); + screenTimeoutPreference.setOnPreferenceChangeListener(this); + } + + @Override + protected void onResume() { + super.onResume(); + + updateState(true); + + IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION); + registerReceiver(mReceiver, filter); + } + + @Override + protected void onPause() { + super.onPause(); + + unregisterReceiver(mReceiver); + } + + private void updateState(boolean force) { + final boolean silent = mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL; + final boolean phoneVibrate = mAudioManager + .getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER) + == AudioManager.VIBRATE_SETTING_ON; + + if (silent != mSilent.isChecked() || force) { + mSilent.setChecked(silent); + } + + if (phoneVibrate != mVibrate.isChecked() || force) { + mVibrate.setChecked(phoneVibrate); + } + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + + if (preference == mSilent) { + final boolean silent = mSilent.isChecked(); + mAudioManager.setRingerMode(silent ? AudioManager.RINGER_MODE_SILENT + : AudioManager.RINGER_MODE_NORMAL); + + } else if (preference == mVibrate) { + final boolean vibrate = mVibrate.isChecked(); + mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, + vibrate ? AudioManager.VIBRATE_SETTING_ON + : AudioManager.VIBRATE_SETTING_OFF); + } else if (preference == mDtmfTone) { + Settings.System.putInt(getContentResolver(), Settings.System.DTMF_TONE_WHEN_DIALING, + mDtmfTone.isChecked() ? 1 : 0); + + } else if (preference == mSoundEffects) { + if (mSoundEffects.isChecked()) { + mAudioManager.loadSoundEffects(); + } else { + mAudioManager.unloadSoundEffects(); + } + Settings.System.putInt(getContentResolver(), Settings.System.SOUND_EFFECTS_ENABLED, + mSoundEffects.isChecked() ? 1 : 0); + } + return true; + } + + public boolean onPreferenceChange(Preference preference, Object objValue) { + if (KEY_SCREEN_TIMEOUT.equals(preference.getKey())) { + int value = Integer.parseInt((String) objValue); + try { + Settings.System.putInt(getContentResolver(), + SCREEN_OFF_TIMEOUT, value); + } catch (NumberFormatException e) { + Log.e(TAG, "could not persist screen timeout setting", e); + } + } + + return true; + } + +} diff --git a/src/com/android/settings/TestingSettings.java b/src/com/android/settings/TestingSettings.java new file mode 100644 index 0000000..3994560 --- /dev/null +++ b/src/com/android/settings/TestingSettings.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings; + +import android.os.Bundle; +import android.preference.PreferenceActivity; + +public class TestingSettings extends PreferenceActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.testing_settings); + } + +} diff --git a/src/com/android/settings/TestingSettingsBroadcastReceiver.java b/src/com/android/settings/TestingSettingsBroadcastReceiver.java new file mode 100644 index 0000000..c6cd7e1 --- /dev/null +++ b/src/com/android/settings/TestingSettingsBroadcastReceiver.java @@ -0,0 +1,28 @@ +package com.android.settings; + +import android.provider.Telephony; +import static android.provider.Telephony.Intents.SECRET_CODE_ACTION; + +import android.content.Context; +import android.content.Intent; +import android.content.BroadcastReceiver; +import android.util.Config; +import android.util.Log; +import android.view.KeyEvent; + + +public class TestingSettingsBroadcastReceiver extends BroadcastReceiver { + + public TestingSettingsBroadcastReceiver() { + } + + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals(SECRET_CODE_ACTION)) { + Intent i = new Intent(Intent.ACTION_MAIN); + i.setClass(context, TestingSettings.class); + i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(i); + } + } +} diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java new file mode 100644 index 0000000..a23272b --- /dev/null +++ b/src/com/android/settings/Utils.java @@ -0,0 +1,91 @@ +/** + * Copyright (C) 2007 Google Inc. + * + * 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. + */ + +package com.android.settings; + +import android.content.Context; +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.preference.Preference; +import android.preference.PreferenceGroup; + +import java.util.List; + +public class Utils { + + /** + * Set the preference's title to the matching activity's label. + */ + public static final int UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY = 1; + + /** + * Finds a matching activity for a preference's intent. If a matching + * activity is not found, it will remove the preference. + * + * @param context The context. + * @param parentPreferenceGroup The preference group that contains the + * preference whose intent is being resolved. + * @param preferenceKey The key of the preference whose intent is being + * resolved. + * @param flags 0 or one or more of + * {@link #UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY} + * . + * @return Whether an activity was found. If false, the preference was + * removed. + */ + public static boolean updatePreferenceToSpecificActivityOrRemove(Context context, + PreferenceGroup parentPreferenceGroup, String preferenceKey, int flags) { + + Preference preference = parentPreferenceGroup.findPreference(preferenceKey); + if (preference == null) { + return false; + } + + Intent intent = preference.getIntent(); + if (intent != null) { + // Find the activity that is in the system image + PackageManager pm = context.getPackageManager(); + List<ResolveInfo> list = pm.queryIntentActivities(intent, 0); + int listSize = list.size(); + for (int i = 0; i < listSize; i++) { + ResolveInfo resolveInfo = list.get(i); + if ((resolveInfo.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) + != 0) { + + // Replace the intent with this specific activity + preference.setIntent(new Intent().setClassName( + resolveInfo.activityInfo.packageName, + resolveInfo.activityInfo.name)); + + if ((flags & UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY) != 0) { + // Set the preference title to the activity's label + preference.setTitle(resolveInfo.loadLabel(pm)); + } + + return true; + } + } + } + + // Did not find a matching activity, so remove the preference + parentPreferenceGroup.removePreference(preference); + + return true; + } + +} diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java new file mode 100644 index 0000000..18b30bd --- /dev/null +++ b/src/com/android/settings/WirelessSettings.java @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings; + +import com.android.settings.wifi.WifiEnabler; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothIntent; +import android.bluetooth.IBluetoothDeviceCallback; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.preference.CheckBoxPreference; +import android.provider.Settings; +import android.widget.Toast; + +public class WirelessSettings extends PreferenceActivity { + + private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane"; + private static final String KEY_TOGGLE_BLUETOOTH = "toggle_bluetooth"; + private static final String KEY_TOGGLE_WIFI = "toggle_wifi"; + + private WifiEnabler mWifiEnabler; + private AirplaneModeEnabler mAirplaneModeEnabler; + + private CheckBoxPreference mToggleBluetooth; + + private IntentFilter mIntentFilter; + + private static final int EVENT_FAILED_BT_ENABLE = 1; + private static final int EVENT_PASSED_BT_ENABLE = 2; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.wireless_settings); + + mIntentFilter = new IntentFilter(); + mIntentFilter.addAction(BluetoothIntent.ENABLED_ACTION); + mIntentFilter.addAction(BluetoothIntent.DISABLED_ACTION); + + initToggles(); + } + + @Override + protected void onResume() { + super.onResume(); + refreshToggles(); + registerReceiver(mReceiver, mIntentFilter); + + mWifiEnabler.resume(); + mAirplaneModeEnabler.resume(); + } + + @Override + protected void onPause() { + super.onPause(); + unregisterReceiver(mReceiver); + + mWifiEnabler.pause(); + mAirplaneModeEnabler.pause(); + } + + private void initToggles() { + + mWifiEnabler = new WifiEnabler( + this, + (WifiManager) getSystemService(WIFI_SERVICE), + (CheckBoxPreference) findPreference(KEY_TOGGLE_WIFI)); + + mAirplaneModeEnabler = new AirplaneModeEnabler( + this, + (CheckBoxPreference) findPreference(KEY_TOGGLE_AIRPLANE)); + + mToggleBluetooth = (CheckBoxPreference) findPreference(KEY_TOGGLE_BLUETOOTH); + mToggleBluetooth.setPersistent(false); + } + + private void refreshToggles() { + mToggleBluetooth.setChecked(isBluetoothEnabled()); + mToggleBluetooth.setEnabled(true); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mToggleBluetooth) { + setBluetoothEnabled(mToggleBluetooth.isChecked()); + return true; + } + + return false; + } + + private boolean isBluetoothEnabled() { + BluetoothDevice device = (BluetoothDevice)getSystemService(BLUETOOTH_SERVICE); + if (device != null) { + return device.isEnabled(); + } else { + return false; + } + } + + private void setBluetoothEnabled(boolean enabled) { + try { + BluetoothDevice device = (BluetoothDevice)getSystemService(BLUETOOTH_SERVICE); + if (enabled) { + // Turn it off until intent or callback is delivered + mToggleBluetooth.setChecked(false); + if (device.enable(mBtCallback)) { + mToggleBluetooth.setSummary(R.string.bluetooth_enabling); + mToggleBluetooth.setEnabled(false); + } + } else { + if (device.disable()) { + Settings.System.putInt(getContentResolver(), + Settings.System.BLUETOOTH_ON, 0); + } else { + // Unusual situation, that you can't turn off bluetooth + mToggleBluetooth.setChecked(true); + } + } + } catch (NullPointerException e) { + // TODO: 1071858 + mToggleBluetooth.setChecked(false); + mToggleBluetooth.setEnabled(false); + } + } + + private IBluetoothDeviceCallback mBtCallback = new IBluetoothDeviceCallback.Stub() { + + public void onEnableResult(int res) { + switch (res) { + case BluetoothDevice.RESULT_FAILURE: + mHandler.sendMessage(mHandler.obtainMessage(EVENT_FAILED_BT_ENABLE, 0)); + break; + case BluetoothDevice.RESULT_SUCCESS: + mHandler.sendMessage(mHandler.obtainMessage(EVENT_PASSED_BT_ENABLE, 0)); + break; + } + } + + public void onCreateBondingResult(String device, int res) { + // Don't care + } + public void onGetRemoteServiceChannelResult(String address, int channel) { } + }; + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (action.equals(BluetoothIntent.ENABLED_ACTION)) { + updateBtStatus(true); + } else if (action.equals(BluetoothIntent.DISABLED_ACTION)) { + mToggleBluetooth.setChecked(false); + } + } + }; + + private void updateBtStatus(boolean enabled) { + mToggleBluetooth.setChecked(enabled); + mToggleBluetooth.setEnabled(true); + mToggleBluetooth.setSummary(R.string.bluetooth_quick_toggle_summary); + if (enabled) { + Settings.System.putInt(getContentResolver(), + Settings.System.BLUETOOTH_ON, 1); + } + } + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case EVENT_PASSED_BT_ENABLE: + updateBtStatus(true); + break; + case EVENT_FAILED_BT_ENABLE: + updateBtStatus(false); + Toast.makeText(WirelessSettings.this, + getResources().getString(R.string.bluetooth_failed_to_enable), + Toast.LENGTH_SHORT).show(); + + break; + } + } + }; +} diff --git a/src/com/android/settings/ZoneList.java b/src/com/android/settings/ZoneList.java new file mode 100644 index 0000000..a2ec1ef --- /dev/null +++ b/src/com/android/settings/ZoneList.java @@ -0,0 +1,273 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.AlarmManager; +import android.app.ListActivity; +import android.content.Context; +import android.content.res.XmlResourceParser; +import android.os.Bundle; +import android.text.TextUtils; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.ListAdapter; +import android.widget.ListView; +import android.widget.SimpleAdapter; + +import org.xmlpull.v1.XmlPullParserException; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + +/** + * This activity displays a list of time zones that match a filter string + * such as "Africa", "Europe", etc. Choosing an item from the list will set + * the time zone. Pressing Back without choosing from the list will not + * result in a change in the time zone setting. + */ +public class ZoneList extends ListActivity { + + private static final String TAG = "ZoneList"; + private static final String KEY_ID = "id"; + private static final String KEY_DISPLAYNAME = "name"; + private static final String KEY_GMT = "gmt"; + private static final String KEY_OFFSET = "offset"; + private static final String XMLTAG_TIMEZONE = "timezone"; + + private static final int HOURS_1 = 60 * 60000; + private static final int HOURS_24 = 24 * HOURS_1; + private static final int HOURS_HALF = HOURS_1 / 2; + + private static final int MENU_TIMEZONE = Menu.FIRST+1; + private static final int MENU_ALPHABETICAL = Menu.FIRST; + + // Initial focus position + private int mDefault; + + private boolean mSortedByTimezone; + + private SimpleAdapter mTimezoneSortedAdapter; + private SimpleAdapter mAlphabeticalAdapter; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + + String[] from = new String[] {KEY_DISPLAYNAME, KEY_GMT}; + int[] to = new int[] {android.R.id.text1, android.R.id.text2}; + + MyComparator comparator = new MyComparator(KEY_OFFSET); + + List<HashMap> timezoneSortedList = getZones(); + Collections.sort(timezoneSortedList, comparator); + mTimezoneSortedAdapter = new SimpleAdapter(this, + (List) timezoneSortedList, + android.R.layout.simple_list_item_2, + from, + to); + + List<HashMap> alphabeticalList = new ArrayList<HashMap>(timezoneSortedList); + comparator.setSortingKey(KEY_DISPLAYNAME); + Collections.sort(alphabeticalList, comparator); + mAlphabeticalAdapter = new SimpleAdapter(this, + (List) alphabeticalList, + android.R.layout.simple_list_item_2, + from, + to); + + // Sets the adapter + setSorting(true); + + // If current timezone is in this list, move focus to it + setSelection(mDefault); + + // Assume user may press Back + setResult(RESULT_CANCELED); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(0, MENU_ALPHABETICAL, 0, R.string.zone_list_menu_sort_alphabetically) + .setIcon(R.drawable.ic_menu_sort_alphabetically); + menu.add(0, MENU_TIMEZONE, 0, R.string.zone_list_menu_sort_by_timezone) + .setIcon(R.drawable.ic_menu_3d_globe); + + return true; + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + + if (mSortedByTimezone) { + menu.findItem(MENU_TIMEZONE).setVisible(false); + menu.findItem(MENU_ALPHABETICAL).setVisible(true); + } else { + menu.findItem(MENU_TIMEZONE).setVisible(true); + menu.findItem(MENU_ALPHABETICAL).setVisible(false); + } + + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + + case MENU_TIMEZONE: + setSorting(true); + return true; + + case MENU_ALPHABETICAL: + setSorting(false); + return true; + + default: + return false; + } + } + + private void setSorting(boolean timezone) { + setListAdapter(timezone ? mTimezoneSortedAdapter : mAlphabeticalAdapter); + mSortedByTimezone = timezone; + } + + private List<HashMap> getZones() { + List<HashMap> myData = new ArrayList<HashMap>(); + long date = Calendar.getInstance().getTimeInMillis(); + try { + XmlResourceParser xrp = getResources().getXml(R.xml.timezones); + while (xrp.next() != XmlResourceParser.START_TAG) + ; + xrp.next(); + while (xrp.getEventType() != XmlResourceParser.END_TAG) { + while (xrp.getEventType() != XmlResourceParser.START_TAG) { + if (xrp.getEventType() == XmlResourceParser.END_DOCUMENT) { + return myData; + } + xrp.next(); + } + if (xrp.getName().equals(XMLTAG_TIMEZONE)) { + String id = xrp.getAttributeValue(0); + String displayName = xrp.nextText(); + addItem(myData, id, displayName, date); + } + while (xrp.getEventType() != XmlResourceParser.END_TAG) { + xrp.next(); + } + xrp.next(); + } + xrp.close(); + } catch (XmlPullParserException xppe) { + Log.e(TAG, "Ill-formatted timezones.xml file"); + } catch (java.io.IOException ioe) { + Log.e(TAG, "Unable to read timezones.xml file"); + } + + return myData; + } + + protected void addItem(List<HashMap> myData, String id, String displayName, + long date) { + HashMap map = new HashMap(); + map.put(KEY_ID, id); + map.put(KEY_DISPLAYNAME, displayName); + TimeZone tz = TimeZone.getTimeZone(id); + int offset = tz.getOffset(date); + int p = Math.abs(offset); + StringBuilder name = new StringBuilder(); + name.append("GMT"); + + if (offset < 0) { + name.append('-'); + } else { + name.append('+'); + } + + name.append(p / (HOURS_1)); + name.append(':'); + + int min = p / 60000; + min %= 60; + + if (min < 10) { + name.append('0'); + } + name.append(min); + + map.put(KEY_GMT, name.toString()); + map.put(KEY_OFFSET, offset); + + if (id.equals(TimeZone.getDefault().getID())) { + mDefault = myData.size(); + } + + myData.add(map); + } + + @Override + protected void onListItemClick(ListView l, View v, int position, long id) { + Map map = (Map) l.getItemAtPosition(position); + // Update the system timezone value + AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE); + alarm.setTimeZone((String) map.get(KEY_ID)); + setResult(RESULT_OK); + finish(); + } + + private static class MyComparator implements Comparator<HashMap> { + private String mSortingKey; + + public MyComparator(String sortingKey) { + mSortingKey = sortingKey; + } + + public void setSortingKey(String sortingKey) { + mSortingKey = sortingKey; + } + + public int compare(HashMap map1, HashMap map2) { + Object value1 = map1.get(mSortingKey); + Object value2 = map2.get(mSortingKey); + + /* + * This should never happen, but just in-case, put non-comparable + * items at the end. + */ + if (!isComparable(value1)) { + return isComparable(value2) ? 1 : 0; + } else if (!isComparable(value2)) { + return -1; + } + + return ((Comparable) value1).compareTo(value2); + } + + private boolean isComparable(Object value) { + return (value != null) && (value instanceof Comparable); + } + } + +} diff --git a/src/com/android/settings/ZonePicker.java b/src/com/android/settings/ZonePicker.java new file mode 100644 index 0000000..def5036 --- /dev/null +++ b/src/com/android/settings/ZonePicker.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2006 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. + */ + +package com.android.settings; + +import android.app.ListActivity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.ListView; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ZonePicker extends ListActivity { + + private ArrayAdapter<CharSequence> mFilterAdapter; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + mFilterAdapter = ArrayAdapter.createFromResource(this, + R.array.timezone_filters, android.R.layout.simple_list_item_1); + setListAdapter(mFilterAdapter); + } + + protected void addItem(List<Map> data, String name, String zone) { + HashMap temp = new HashMap(); + temp.put("title", name); + temp.put("zone", zone); + data.add(temp); + } + + @Override + protected void onListItemClick(ListView l, View v, int position, long id) { + String filter = (String) mFilterAdapter.getItem(position); + // If All is chosen, reset the filter + if (filter.equals("All")) { + filter = null; + } + Intent zoneList = new Intent(); + zoneList.setClass(this, ZoneList.class); + zoneList.putExtra("filter", filter); + + startActivityForResult(zoneList, 0); + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + // If subactivity has resulted in a timezone selection, close this act. + if (resultCode == RESULT_OK) { + finish(); + } + } +} diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java new file mode 100644 index 0000000..8a3cb8b --- /dev/null +++ b/src/com/android/settings/deviceinfo/Memory.java @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings.deviceinfo; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; +import android.os.Bundle; +import android.os.RemoteException; +import android.os.Environment; +import android.os.IMountService; +import android.os.ServiceManager; +import android.os.StatFs; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; + +import com.android.settings.R; + +import java.io.File; +import java.text.DecimalFormat; + +public class Memory extends PreferenceActivity { + + private static final String MEMORY_SD_SIZE = "memory_sd_size"; + + private static final String MEMORY_SD_AVAIL = "memory_sd_avail"; + + private static final String MEMORY_SD_UNMOUNT = "memory_sd_unmount"; + + private Resources mRes; + + private Preference mSdSize; + private Preference mSdAvail; + private Preference mSdUnmount; + + private IMountService mMountService; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + addPreferencesFromResource(R.xml.device_info_memory); + + mMountService = IMountService.Stub.asInterface(ServiceManager.getService("mount")); + + mRes = getResources(); + mSdSize = findPreference(MEMORY_SD_SIZE); + mSdAvail = findPreference(MEMORY_SD_AVAIL); + mSdUnmount = findPreference(MEMORY_SD_UNMOUNT); + } + + @Override + protected void onResume() { + super.onResume(); + + IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_REMOVED); + intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED); + intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED); + intentFilter.addAction(Intent.ACTION_MEDIA_SHARED); + intentFilter.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL); + intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED); + intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED); + intentFilter.addDataScheme("file"); + registerReceiver(mReceiver, intentFilter); + + updateMemoryStatus(); + } + + @Override + protected void onPause() { + super.onPause(); + unregisterReceiver(mReceiver); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (preference == mSdUnmount) { + unmount(); + return true; + } + + return false; + } + + private final BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + updateMemoryStatus(); + } + }; + + private void unmount() { + try { + mMountService.unmountMedia(Environment.getExternalStorageDirectory().toString()); + } catch (RemoteException ex) { + // Failed for some reason, try to update UI to actual state + updateMemoryStatus(); + } + } + + private void updateMemoryStatus() { + String status = Environment.getExternalStorageState(); + String readOnly = ""; + if (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) { + status = Environment.MEDIA_MOUNTED; + readOnly = mRes.getString(R.string.read_only); + } + + if (status.equals(Environment.MEDIA_MOUNTED)) { + try { + File path = Environment.getExternalStorageDirectory(); + StatFs stat = new StatFs(path.getPath()); + long blockSize = stat.getBlockSize(); + long totalBlocks = stat.getBlockCount(); + long availableBlocks = stat.getAvailableBlocks(); + + mSdSize.setSummary(formatSize(totalBlocks * blockSize)); + mSdAvail.setSummary(formatSize(availableBlocks * blockSize) + readOnly); + mSdUnmount.setEnabled(true); + } catch (IllegalArgumentException e) { + // this can occur if the SD card is removed, but we haven't received the + // ACTION_MEDIA_REMOVED Intent yet. + status = Environment.MEDIA_REMOVED; + } + + } else { + mSdSize.setSummary(mRes.getString(R.string.sd_unavailable)); + mSdAvail.setSummary(mRes.getString(R.string.sd_unavailable)); + mSdUnmount.setEnabled(false); + } + + File path = Environment.getDataDirectory(); + StatFs stat = new StatFs(path.getPath()); + long blockSize = stat.getBlockSize(); + long availableBlocks = stat.getAvailableBlocks(); + findPreference("memory_internal_avail").setSummary(formatSize(availableBlocks * blockSize)); + } + + private String formatSize(long size) { + String suffix = null; + + // add KB or MB suffix if size is greater than 1K or 1M + if (size >= 1024) { + suffix = " KB"; + size /= 1024; + if (size >= 1024) { + suffix = " MB"; + size /= 1024; + } + } + + DecimalFormat formatter = new DecimalFormat(); + formatter.setGroupingSize(3); + String result = formatter.format(size); + + if (suffix != null) + result = result + suffix; + return result; + } + +} diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java new file mode 100644 index 0000000..a56e607 --- /dev/null +++ b/src/com/android/settings/deviceinfo/Status.java @@ -0,0 +1,378 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings.deviceinfo; + +import android.bluetooth.BluetoothDevice; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.BatteryManager; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.os.SystemClock; +import android.os.SystemProperties; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.telephony.PhoneStateListener; +import android.telephony.ServiceState; +import android.telephony.TelephonyManager; +import android.text.TextUtils; + +import com.android.internal.telephony.Phone; +import com.android.internal.telephony.PhoneFactory; +import com.android.internal.telephony.PhoneStateIntentReceiver; +import com.android.internal.telephony.TelephonyProperties; +import com.android.settings.R; + +import java.lang.ref.WeakReference; + +/** + * Display the following information + * # Phone Number + * # Network + * # Roaming + * # IMEI + * # IMSI + * # Network type + * # Signal Strength + * # Battery Strength : TODO + * # Uptime + * # Awake Time + * # XMPP/buzz/tickle status : TODO + * + */ +public class Status extends PreferenceActivity { + + private static final String KEY_WIFI_MAC_ADDRESS = "wifi_mac_address"; + private static final String KEY_BT_ADDRESS = "bt_address"; + private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200; + private static final int EVENT_SERVICE_STATE_CHANGED = 300; + + private static final int EVENT_FIX_UPTIME = 500; + + private TelephonyManager mTelephonyManager; + private Phone mPhone = null; + private PhoneStateIntentReceiver mPhoneStateReceiver; + private Resources mRes; + private Preference mSignalStrength; + private Preference mUptime; + private Preference mAwakeTime; + + private static String sUnknown; + + private Preference mBatteryStatus; + private Preference mBatteryLevel; + + private Handler mHandler; + + private static class MyHandler extends Handler { + private WeakReference<Status> mStatus; + + public MyHandler(Status activity) { + mStatus = new WeakReference<Status>(activity); + } + + @Override + public void handleMessage(Message msg) { + Status status = mStatus.get(); + if (status == null) { + return; + } + + switch (msg.what) { + case EVENT_SIGNAL_STRENGTH_CHANGED: + status.updateSignalStrength(); + break; + + case EVENT_SERVICE_STATE_CHANGED: + ServiceState serviceState = status.mPhoneStateReceiver.getServiceState(); + status.updateServiceState(serviceState); + break; + + case EVENT_FIX_UPTIME: + status.updateTimes(); + sendMessageDelayed(obtainMessage(EVENT_FIX_UPTIME), 1000); + break; + } + } + } + + private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (Intent.ACTION_BATTERY_CHANGED.equals(action)) { + + int level = intent.getIntExtra("level", 0); + int scale = intent.getIntExtra("scale", 100); + + mBatteryLevel.setSummary(String.valueOf(level * 100 / scale) + "%"); + + int plugType = intent.getIntExtra("plugged", 0); + int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN); + String statusString; + if (status == BatteryManager.BATTERY_STATUS_CHARGING) { + statusString = getString(R.string.battery_info_status_charging); + if (plugType > 0) { + statusString = statusString + " " + getString( + (plugType == BatteryManager.BATTERY_PLUGGED_AC) + ? R.string.battery_info_status_charging_ac + : R.string.battery_info_status_charging_usb); + } + } else if (status == BatteryManager.BATTERY_STATUS_DISCHARGING) { + statusString = getString(R.string.battery_info_status_discharging); + } else if (status == BatteryManager.BATTERY_STATUS_NOT_CHARGING) { + statusString = getString(R.string.battery_info_status_not_charging); + } else if (status == BatteryManager.BATTERY_STATUS_FULL) { + statusString = getString(R.string.battery_info_status_full); + } else { + statusString = getString(R.string.battery_info_status_unknown); + } + mBatteryStatus.setSummary(statusString); + } + } + }; + + private PhoneStateListener mPhoneStateListener = new PhoneStateListener() { + @Override + public void onDataConnectionStateChanged(int state) { + updateDataState(); + updateNetworkType(); + } + }; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + + mHandler = new MyHandler(this); + + mTelephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); + + addPreferencesFromResource(R.xml.device_info_status); + mBatteryLevel = findPreference("battery_level"); + mBatteryStatus = findPreference("battery_status"); + + mRes = getResources(); + if (sUnknown == null) { + sUnknown = mRes.getString(R.string.device_info_default); + } + + mPhone = PhoneFactory.getDefaultPhone(); + mSignalStrength = findPreference("signal_strength"); + mUptime = findPreference("up_time"); + mAwakeTime = findPreference("awake_time"); + + setSummaryText("imei", mPhone.getDeviceId()); + setSummaryText("imei_sv", + ((TelephonyManager) getSystemService(TELEPHONY_SERVICE)) + .getDeviceSoftwareVersion()); + setSummaryText("imsi", mPhone.getSubscriberId()); + setSummaryText("number", mPhone.getLine1Number()); + + mPhoneStateReceiver = new PhoneStateIntentReceiver(this, mHandler); + mPhoneStateReceiver.notifySignalStrength(EVENT_SIGNAL_STRENGTH_CHANGED); + mPhoneStateReceiver.notifyServiceState(EVENT_SERVICE_STATE_CHANGED); + + setWifiStatus(); + setBtStatus(); + } + + @Override + protected void onResume() { + super.onResume(); + + mPhoneStateReceiver.registerIntent(); + registerReceiver(mBatteryInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); + + updateSignalStrength(); + updateServiceState(mPhone.getServiceState()); + updateDataState(); + + mTelephonyManager.listen(mPhoneStateListener, + PhoneStateListener.LISTEN_DATA_CONNECTION_STATE); + + mHandler.sendMessageDelayed(mHandler.obtainMessage(EVENT_FIX_UPTIME), 0); + } + + @Override + public void onPause() { + super.onPause(); + + mPhoneStateReceiver.unregisterIntent(); + mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); + unregisterReceiver(mBatteryInfoReceiver); + mHandler.removeMessages(EVENT_FIX_UPTIME); + } + + /** + * @param preference The key for the Preference item + * @param property The system property to fetch + * @param alt The default value, if the property doesn't exist + */ + private void setSummary(String preference, String property, String alt) { + try { + findPreference(preference).setSummary( + SystemProperties.get(property, alt)); + } catch (RuntimeException e) { + + } + } + + private void setSummaryText(String preference, String text) { + if (text != null) { + findPreference(preference).setSummary(text); + } + } + + private void updateNetworkType() { + // Whether EDGE, UMTS, etc... + setSummary("network_type", TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, sUnknown); + } + + private void updateDataState() { + int state = mTelephonyManager.getDataState(); + String display = mRes.getString(R.string.radioInfo_unknown); + + switch (state) { + case TelephonyManager.DATA_CONNECTED: + display = mRes.getString(R.string.radioInfo_data_connected); + break; + case TelephonyManager.DATA_SUSPENDED: + display = mRes.getString(R.string.radioInfo_data_suspended); + break; + case TelephonyManager.DATA_CONNECTING: + display = mRes.getString(R.string.radioInfo_data_connecting); + break; + case TelephonyManager.DATA_DISCONNECTED: + display = mRes.getString(R.string.radioInfo_data_disconnected); + break; + } + + setSummaryText("data_state", display); + } + + private void updateServiceState(ServiceState serviceState) { + int state = serviceState.getState(); + String display = mRes.getString(R.string.radioInfo_unknown); + + switch (state) { + case ServiceState.STATE_IN_SERVICE: + display = mRes.getString(R.string.radioInfo_service_in); + break; + case ServiceState.STATE_OUT_OF_SERVICE: + case ServiceState.STATE_EMERGENCY_ONLY: + display = mRes.getString(R.string.radioInfo_service_out); + break; + case ServiceState.STATE_POWER_OFF: + display = mRes.getString(R.string.radioInfo_service_off); + break; + } + + setSummaryText("service_state", display); + + if (serviceState.getRoaming()) { + setSummaryText("roaming_state", mRes.getString(R.string.radioInfo_roaming_in)); + } else { + setSummaryText("roaming_state", mRes.getString(R.string.radioInfo_roaming_not)); + } + setSummaryText("operator_name", serviceState.getOperatorAlphaLong()); + } + + void updateSignalStrength() { + int state = + mPhoneStateReceiver.getServiceState().getState(); + Resources r = getResources(); + + if ((ServiceState.STATE_OUT_OF_SERVICE == state) || + (ServiceState.STATE_POWER_OFF == state)) { + mSignalStrength.setSummary("0"); + } + + int signalDbm = mPhoneStateReceiver.getSignalStrengthDbm(); + + if (-1 == signalDbm) signalDbm = 0; + + int signalAsu = mPhoneStateReceiver.getSignalStrength(); + + if (-1 == signalAsu) signalAsu = 0; + + mSignalStrength.setSummary(String.valueOf(signalDbm) + " " + + r.getString(R.string.radioInfo_display_dbm) + " " + + String.valueOf(signalAsu) + " " + + r.getString(R.string.radioInfo_display_asu)); + } + + private void setWifiStatus() { + WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); + WifiInfo wifiInfo = wifiManager.getConnectionInfo(); + + Preference wifiMacAddressPref = findPreference(KEY_WIFI_MAC_ADDRESS); + String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress(); + wifiMacAddressPref.setSummary(!TextUtils.isEmpty(macAddress) ? macAddress + : getString(R.string.status_unavailable)); + } + + private void setBtStatus() { + BluetoothDevice bluetooth = (BluetoothDevice) getSystemService(BLUETOOTH_SERVICE); + Preference btAddressPref = findPreference(KEY_BT_ADDRESS); + + if (bluetooth == null) { + // device not BT capable + getPreferenceScreen().removePreference(btAddressPref); + } else { + String address = bluetooth.isEnabled() ? bluetooth.getAddress() : null; + btAddressPref.setSummary(!TextUtils.isEmpty(address) ? address + : getString(R.string.status_unavailable)); + } + } + + void updateTimes() { + long at = SystemClock.uptimeMillis() / 1000; + long ut = SystemClock.elapsedRealtime() / 1000; + long st = ut - at; + + if (ut == 0) { + ut = 1; + } + + mUptime.setSummary(convert(ut)); + mAwakeTime.setSummary(convert(at) + " (" + (((1000 * at / ut) + 5) / 10) + "%)"); + } + + private String pad(int n) { + if (n >= 10) { + return String.valueOf(n); + } else { + return "0" + String.valueOf(n); + } + } + + private String convert(long t) { + int s = (int)(t % 60); + int m = (int)((t / 60) % 60); + int h = (int)((t / 3600)); + + return h + ":" + pad(m) + ":" + pad(s); + } +} diff --git a/src/com/android/settings/quicklaunch/BookmarkPicker.java b/src/com/android/settings/quicklaunch/BookmarkPicker.java new file mode 100644 index 0000000..5c5ab40 --- /dev/null +++ b/src/com/android/settings/quicklaunch/BookmarkPicker.java @@ -0,0 +1,331 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.quicklaunch; + +import com.android.settings.R; + +import android.app.ListActivity; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.graphics.drawable.Drawable; +import android.os.Bundle; +import android.os.Handler; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.SimpleAdapter; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +/** + * Activity to pick a bookmark that will be returned to the caller. + * <p> + * Currently, bookmarks are either: + * <li> Activities that are in the launcher + * <li> Activities that are within an app that is capable of being launched with + * the {@link Intent#ACTION_CREATE_SHORTCUT}. + */ +public class BookmarkPicker extends ListActivity implements SimpleAdapter.ViewBinder { + + private static final String TAG = "BookmarkPicker"; + + /** Extra in the returned intent from this activity. */ + public static final String EXTRA_TITLE = "com.android.settings.quicklaunch.TITLE"; + + /** Extra that should be provided, and will be returned. */ + public static final String EXTRA_SHORTCUT = "com.android.settings.quicklaunch.SHORTCUT"; + + /** + * The request code for the screen to create a bookmark that is WITHIN an + * application. For example, Gmail can return a bookmark for the inbox + * folder. + */ + private static final int REQUEST_CREATE_SHORTCUT = 1; + + /** Intent used to get all the activities that are launch-able */ + private static Intent sLaunchIntent; + /** Intent used to get all the activities that are {@link #REQUEST_CREATE_SHORTCUT}-able */ + private static Intent sShortcutIntent; + + /** + * List of ResolveInfo for activities that we can bookmark (either directly + * to the activity, or by launching the activity and it returning a bookmark + * WITHIN that application). + */ + private List<ResolveInfo> mResolveList; + + // List adapter stuff + private static final String KEY_TITLE = "TITLE"; + private static final String KEY_RESOLVE_INFO = "RESOLVE_INFO"; + private static final String sKeys[] = new String[] { KEY_TITLE, KEY_RESOLVE_INFO }; + private static final int sResourceIds[] = new int[] { R.id.title, R.id.icon }; + private SimpleAdapter mMyAdapter; + + /** Display those activities that are launch-able */ + private static final int DISPLAY_MODE_LAUNCH = 0; + /** Display those activities that are able to have bookmarks WITHIN the application */ + private static final int DISPLAY_MODE_SHORTCUT = 1; + private int mDisplayMode = DISPLAY_MODE_LAUNCH; + + private Handler mUiHandler = new Handler(); + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + updateListAndAdapter(); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(0, DISPLAY_MODE_LAUNCH, 0, R.string.quick_launch_display_mode_applications) + .setIcon(R.drawable.ic_menu_archive); + menu.add(0, DISPLAY_MODE_SHORTCUT, 0, R.string.quick_launch_display_mode_shortcuts) + .setIcon(R.drawable.ic_menu_goto); + return true; + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + menu.findItem(DISPLAY_MODE_LAUNCH).setVisible(mDisplayMode != DISPLAY_MODE_LAUNCH); + menu.findItem(DISPLAY_MODE_SHORTCUT).setVisible(mDisplayMode != DISPLAY_MODE_SHORTCUT); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + + switch (item.getItemId()) { + + case DISPLAY_MODE_LAUNCH: + mDisplayMode = DISPLAY_MODE_LAUNCH; + break; + + case DISPLAY_MODE_SHORTCUT: + mDisplayMode = DISPLAY_MODE_SHORTCUT; + break; + + default: + return false; + } + + updateListAndAdapter(); + return true; + } + + private void ensureIntents() { + if (sLaunchIntent == null) { + sLaunchIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER); + sShortcutIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT); + } + } + + /** + * This should be called from the UI thread. + */ + private void updateListAndAdapter() { + // Get the activities in a separate thread + new Thread("data updater") { + @Override + public void run() { + synchronized (BookmarkPicker.this) { + /* + * Don't touch any of the lists that are being used by the + * adapter in this thread! + */ + ArrayList<ResolveInfo> newResolveList = new ArrayList<ResolveInfo>(); + ArrayList<Map<String, ?>> newAdapterList = new ArrayList<Map<String, ?>>(); + + fillResolveList(newResolveList); + Collections.sort(newResolveList, + new ResolveInfo.DisplayNameComparator(getPackageManager())); + + fillAdapterList(newAdapterList, newResolveList); + + updateAdapterToUseNewLists(newAdapterList, newResolveList); + } + } + }.start(); + } + + private void updateAdapterToUseNewLists(final ArrayList<Map<String, ?>> newAdapterList, + final ArrayList<ResolveInfo> newResolveList) { + // Post this back on the UI thread + mUiHandler.post(new Runnable() { + public void run() { + /* + * SimpleAdapter does not support changing the lists after it + * has been created. We just create a new instance. + */ + mMyAdapter = createResolveAdapter(newAdapterList); + mResolveList = newResolveList; + setListAdapter(mMyAdapter); + } + }); + } + + /** + * Gets all activities matching our current display mode. + * + * @param list The list to fill. + */ + private void fillResolveList(List<ResolveInfo> list) { + ensureIntents(); + PackageManager pm = getPackageManager(); + list.clear(); + + if (mDisplayMode == DISPLAY_MODE_LAUNCH) { + list.addAll(pm.queryIntentActivities(sLaunchIntent, 0)); + } else if (mDisplayMode == DISPLAY_MODE_SHORTCUT) { + list.addAll(pm.queryIntentActivities(sShortcutIntent, 0)); + } + } + + private SimpleAdapter createResolveAdapter(List<Map<String, ?>> list) { + SimpleAdapter adapter = new SimpleAdapter(this, list, + R.layout.bookmark_picker_item, sKeys, sResourceIds); + adapter.setViewBinder(this); + return adapter; + } + + private void fillAdapterList(List<Map<String, ?>> list, + List<ResolveInfo> resolveList) { + list.clear(); + int resolveListSize = resolveList.size(); + for (int i = 0; i < resolveListSize; i++) { + ResolveInfo info = resolveList.get(i); + /* + * Simple adapter craziness. For each item, we need to create a map + * from a key to its value (the value can be any object--the view + * binder will take care of filling the View with a representation + * of that object). + */ + Map<String, Object> map = new TreeMap<String, Object>(); + map.put(KEY_TITLE, getResolveInfoTitle(info)); + map.put(KEY_RESOLVE_INFO, info); + list.add(map); + } + } + + /** Get the title for a resolve info. */ + private String getResolveInfoTitle(ResolveInfo info) { + CharSequence label = info.loadLabel(getPackageManager()); + if (label == null) label = info.activityInfo.name; + return label != null ? label.toString() : null; + } + + @Override + protected void onListItemClick(ListView l, View v, int position, long id) { + if (position >= mResolveList.size()) return; + + ResolveInfo info = mResolveList.get(position); + + switch (mDisplayMode) { + + case DISPLAY_MODE_LAUNCH: + // We can go ahead and return the clicked info's intent + Intent intent = getIntentForResolveInfo(info, Intent.ACTION_MAIN); + intent.addCategory(Intent.CATEGORY_LAUNCHER); + finish(intent, getResolveInfoTitle(info)); + break; + + case DISPLAY_MODE_SHORTCUT: + // Start the shortcut activity so the user can pick the actual intent + // (example: Gmail's shortcut activity shows a list of mailboxes) + startShortcutActivity(info); + break; + } + + } + + private static Intent getIntentForResolveInfo(ResolveInfo info, String action) { + Intent intent = new Intent(action); + ActivityInfo ai = info.activityInfo; + intent.setClassName(ai.packageName, ai.name); + return intent; + } + + /** + * Starts an activity to get a shortcut. + * <p> + * For example, Gmail has an activity that lists the available labels. It + * returns a shortcut intent for going directly to this label. + */ + private void startShortcutActivity(ResolveInfo info) { + Intent intent = getIntentForResolveInfo(info, Intent.ACTION_CREATE_SHORTCUT); + startActivityForResult(intent, REQUEST_CREATE_SHORTCUT); + + // Will get a callback to onActivityResult + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (resultCode != RESULT_OK) { + return; + } + + switch (requestCode) { + + case REQUEST_CREATE_SHORTCUT: + if (data != null) { + finish((Intent) data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT), + data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME)); + } + break; + + default: + super.onActivityResult(requestCode, resultCode, data); + break; + } + } + + /** + * Finishes the activity and returns the given data. + */ + private void finish(Intent intent, String title) { + // Give back what was given to us (it will have the shortcut, for example) + intent.putExtras(getIntent()); + // Put our information + intent.putExtra(EXTRA_TITLE, title); + setResult(RESULT_OK, intent); + finish(); + } + + /** + * {@inheritDoc} + */ + public boolean setViewValue(View view, Object data, String textRepresentation) { + if (view.getId() == R.id.icon) { + Drawable icon = ((ResolveInfo) data).loadIcon(getPackageManager()); + if (icon != null) { + ((ImageView) view).setImageDrawable(icon); + } + return true; + } else { + return false; + } + } + +} diff --git a/src/com/android/settings/quicklaunch/QuickLaunchSettings.java b/src/com/android/settings/quicklaunch/QuickLaunchSettings.java new file mode 100644 index 0000000..1b9dff4 --- /dev/null +++ b/src/com/android/settings/quicklaunch/QuickLaunchSettings.java @@ -0,0 +1,347 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.settings.quicklaunch; + +import com.android.settings.R; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.database.ContentObserver; +import android.database.Cursor; +import android.os.Bundle; +import android.os.Handler; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceCategory; +import android.preference.PreferenceScreen; +import android.provider.Settings.Bookmarks; +import android.text.TextUtils; +import android.util.Log; +import android.util.SparseArray; +import android.util.SparseBooleanArray; +import android.view.KeyCharacterMap; +import android.view.KeyEvent; +import android.view.View; +import android.widget.AdapterView; + +/** + * Settings activity for quick launch. + * <p> + * Shows a list of possible shortcuts, the current application each is bound to, + * and allows choosing a new bookmark for a shortcut. + */ +public class QuickLaunchSettings extends PreferenceActivity implements + AdapterView.OnItemLongClickListener, DialogInterface.OnClickListener { + + private static final String TAG = "QuickLaunchSettings"; + + private static final String KEY_SHORTCUT_CATEGORY = "shortcut_category"; + + private static final int DIALOG_CLEAR_SHORTCUT = 0; + + private static final int REQUEST_PICK_BOOKMARK = 1; + + private static final int COLUMN_SHORTCUT = 0; + private static final int COLUMN_TITLE = 1; + private static final String[] sProjection = new String[] { + Bookmarks.SHORTCUT, Bookmarks.TITLE + }; + private static final String sShortcutSelection = Bookmarks.SHORTCUT + "=?"; + + private Handler mUiHandler = new Handler(); + + private static final String DEFAULT_BOOKMARK_FOLDER = "@default"; + /** Cursor for Bookmarks provider. */ + private Cursor mBookmarksCursor; + /** Listens for changes to Bookmarks provider. */ + private BookmarksObserver mBookmarksObserver; + /** Used to keep track of which shortcuts have bookmarks. */ + private SparseBooleanArray mBookmarkedShortcuts; + + /** Preference category to hold the shortcut preferences. */ + private PreferenceCategory mShortcutCategory; + /** Mapping of a shortcut to its preference. */ + private SparseArray<ShortcutPreference> mShortcutToPreference; + + /** The bookmark title of the shortcut that is being cleared. */ + private CharSequence mClearDialogBookmarkTitle; + private static final String CLEAR_DIALOG_BOOKMARK_TITLE = "CLEAR_DIALOG_BOOKMARK_TITLE"; + /** The shortcut that is being cleared. */ + private char mClearDialogShortcut; + private static final String CLEAR_DIALOG_SHORTCUT = "CLEAR_DIALOG_SHORTCUT"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.quick_launch_settings); + + mShortcutCategory = (PreferenceCategory) findPreference(KEY_SHORTCUT_CATEGORY); + mShortcutToPreference = new SparseArray<ShortcutPreference>(); + mBookmarksObserver = new BookmarksObserver(mUiHandler); + initShortcutPreferences(); + mBookmarksCursor = managedQuery(Bookmarks.CONTENT_URI, sProjection, null, null); + getListView().setOnItemLongClickListener(this); + } + + @Override + protected void onResume() { + super.onResume(); + getContentResolver().registerContentObserver(Bookmarks.CONTENT_URI, true, + mBookmarksObserver); + refreshShortcuts(); + } + + @Override + protected void onPause() { + super.onPause(); + getContentResolver().unregisterContentObserver(mBookmarksObserver); + } + + @Override + protected void onRestoreInstanceState(Bundle state) { + super.onRestoreInstanceState(state); + + // Restore the clear dialog's info + mClearDialogBookmarkTitle = state.getString(CLEAR_DIALOG_BOOKMARK_TITLE); + mClearDialogShortcut = (char) state.getInt(CLEAR_DIALOG_SHORTCUT, 0); + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + + // Save the clear dialog's info + outState.putCharSequence(CLEAR_DIALOG_BOOKMARK_TITLE, mClearDialogBookmarkTitle); + outState.putInt(CLEAR_DIALOG_SHORTCUT, mClearDialogShortcut); + } + + @Override + protected Dialog onCreateDialog(int id) { + switch (id) { + + case DIALOG_CLEAR_SHORTCUT: { + // Create the dialog for clearing a shortcut + return new AlertDialog.Builder(this) + .setTitle(getString(R.string.quick_launch_clear_dialog_title)) + .setIcon(R.drawable.ic_dialog_alert) + .setMessage(getString(R.string.quick_launch_clear_dialog_message, + mClearDialogShortcut, mClearDialogBookmarkTitle)) + .setPositiveButton(R.string.quick_launch_clear_ok_button, this) + .setNegativeButton(R.string.quick_launch_clear_cancel_button, this) + .create(); + } + } + + return super.onCreateDialog(id); + } + + @Override + protected void onPrepareDialog(int id, Dialog dialog) { + switch (id) { + + case DIALOG_CLEAR_SHORTCUT: { + AlertDialog alertDialog = (AlertDialog) dialog; + alertDialog.setMessage(getString(R.string.quick_launch_clear_dialog_message, + mClearDialogShortcut, mClearDialogBookmarkTitle)); + } + } + } + + private void showClearDialog(ShortcutPreference pref) { + + if (!pref.hasBookmark()) return; + + mClearDialogBookmarkTitle = pref.getTitle(); + mClearDialogShortcut = pref.getShortcut(); + showDialog(DIALOG_CLEAR_SHORTCUT); + } + + public void onClick(DialogInterface dialog, int which) { + if (mClearDialogShortcut > 0 && which == AlertDialog.BUTTON1) { + // Clear the shortcut + clearShortcut(mClearDialogShortcut); + } + mClearDialogBookmarkTitle = null; + mClearDialogShortcut = 0; + } + + private void clearShortcut(char shortcut) { + getContentResolver().delete(Bookmarks.CONTENT_URI, sShortcutSelection, + new String[] { String.valueOf((int) shortcut) }); + } + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + if (!(preference instanceof ShortcutPreference)) return false; + + // Open the screen to pick a bookmark for this shortcut + ShortcutPreference pref = (ShortcutPreference) preference; + Intent intent = new Intent(this, BookmarkPicker.class); + intent.putExtra(BookmarkPicker.EXTRA_SHORTCUT, pref.getShortcut()); + startActivityForResult(intent, REQUEST_PICK_BOOKMARK); + + return true; + } + + public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { + + // Open the clear shortcut dialog + Preference pref = (Preference) getPreferenceScreen().getRootAdapter().getItem(position); + if (!(pref instanceof ShortcutPreference)) return false; + showClearDialog((ShortcutPreference) pref); + return true; + } + + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (resultCode != RESULT_OK) { + return; + } + + if (requestCode == REQUEST_PICK_BOOKMARK) { + + // Returned from the 'pick bookmark for this shortcut' screen + if (data == null) { + Log.w(TAG, "Result from bookmark picker does not have an intent."); + return; + } + + String title = data.getStringExtra(BookmarkPicker.EXTRA_TITLE); + char shortcut = data.getCharExtra(BookmarkPicker.EXTRA_SHORTCUT, (char) 0); + updateShortcut(shortcut, title, data); + + } else { + super.onActivityResult(requestCode, resultCode, data); + } + } + + private void updateShortcut(char shortcut, String title, Intent intent) { + + // Update the bookmark for a shortcut + Bookmarks.add(getContentResolver(), intent, title.toString(), DEFAULT_BOOKMARK_FOLDER, + shortcut, 0); + } + + private ShortcutPreference getOrCreatePreference(char shortcut) { + ShortcutPreference pref = mShortcutToPreference.get(shortcut); + if (pref != null) { + return pref; + } else { + Log.w(TAG, "Unknown shortcut '" + shortcut + "', creating preference anyway"); + return createPreference(shortcut); + } + } + + private ShortcutPreference createPreference(char shortcut) { + ShortcutPreference pref = new ShortcutPreference(QuickLaunchSettings.this, shortcut); + mShortcutCategory.addPreference(pref); + mShortcutToPreference.put(shortcut, pref); + return pref; + } + + private void initShortcutPreferences() { + + /** Whether the shortcut has been seen already. The array index is the shortcut. */ + SparseBooleanArray shortcutSeen = new SparseBooleanArray(); + KeyCharacterMap keyMap = KeyCharacterMap.load(KeyCharacterMap.BUILT_IN_KEYBOARD); + + // Go through all the key codes and create a preference for the appropriate keys + for (int keyCode = KeyEvent.MAX_KEYCODE - 1; keyCode >= 0; keyCode--) { + // Get the label for the primary char on the key that produces this key code + char shortcut = (char) Character.toLowerCase(keyMap.getDisplayLabel(keyCode)); + if (shortcut == 0 || shortcutSeen.get(shortcut, false)) continue; + // TODO: need a to tell if the current keyboard can produce this key code, for now + // only allow the letter or digits + if (!Character.isLetterOrDigit(shortcut)) continue; + shortcutSeen.put(shortcut, true); + + createPreference(shortcut); + } + } + + private synchronized void refreshShortcuts() { + Cursor c = mBookmarksCursor; + if (c == null) { + // Haven't finished querying yet + return; + } + + if (!c.requery()) { + Log.e(TAG, "Could not requery cursor when refreshing shortcuts."); + return; + } + + /** + * We use the previous bookmarked shortcuts array to filter out those + * shortcuts that had bookmarks before this method call, and don't after + * (so we can set the preferences to be without bookmarks). + */ + SparseBooleanArray noLongerBookmarkedShortcuts = mBookmarkedShortcuts; + SparseBooleanArray newBookmarkedShortcuts = new SparseBooleanArray(); + while (c.moveToNext()) { + char shortcut = Character.toLowerCase((char) c.getInt(COLUMN_SHORTCUT)); + if (shortcut == 0) continue; + + ShortcutPreference pref = getOrCreatePreference(shortcut); + pref.setTitle(c.getString(COLUMN_TITLE)); + pref.setSummary(getString(R.string.quick_launch_shortcut, + String.valueOf(shortcut))); + pref.setHasBookmark(true); + + newBookmarkedShortcuts.put(shortcut, true); + if (noLongerBookmarkedShortcuts != null) { + // After this loop, the shortcuts with value true in this array + // will no longer have bookmarks + noLongerBookmarkedShortcuts.put(shortcut, false); + } + } + + if (noLongerBookmarkedShortcuts != null) { + for (int i = noLongerBookmarkedShortcuts.size() - 1; i >= 0; i--) { + if (noLongerBookmarkedShortcuts.valueAt(i)) { + // True, so there is no longer a bookmark for this shortcut + char shortcut = (char) noLongerBookmarkedShortcuts.keyAt(i); + ShortcutPreference pref = mShortcutToPreference.get(shortcut); + if (pref != null) { + pref.setHasBookmark(false); + } + } + } + } + + mBookmarkedShortcuts = newBookmarkedShortcuts; + + c.deactivate(); + } + + private class BookmarksObserver extends ContentObserver { + + public BookmarksObserver(Handler handler) { + super(handler); + } + + @Override + public void onChange(boolean selfChange) { + super.onChange(selfChange); + + refreshShortcuts(); + } + } +} diff --git a/src/com/android/settings/quicklaunch/ShortcutPreference.java b/src/com/android/settings/quicklaunch/ShortcutPreference.java new file mode 100644 index 0000000..92efdeb --- /dev/null +++ b/src/com/android/settings/quicklaunch/ShortcutPreference.java @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.quicklaunch; + +import com.android.settings.R; + +import android.content.Context; +import android.content.res.ColorStateList; +import android.preference.Preference; +import android.util.TypedValue; +import android.view.View; +import android.widget.TextView; + +/** + * Preference type for a shortcut in {@link QuickLaunchSettings}. + */ +public class ShortcutPreference extends Preference implements Comparable<Preference> { + + private static Object sStaticVarsLock = new Object(); + + // These static fields are used across all instances of ShortcutPreference. + // There will be many ShortcutPreference instances (~36 for US). + private static String STRING_ASSIGN_APPLICATION; + private static String STRING_NO_SHORTCUT; + + private static int sDimAlpha; + private static ColorStateList sRegularTitleColor; + private static ColorStateList sDimTitleColor; + private static ColorStateList sRegularSummaryColor; + private static ColorStateList sDimSummaryColor; + + private char mShortcut; + private boolean mHasBookmark; + + public ShortcutPreference(Context context, char shortcut) { + super(context); + + synchronized (sStaticVarsLock) { + // Init statics. This should only happen for the first ShortcutPreference created, + // the rest will already have them initialized. + if (STRING_ASSIGN_APPLICATION == null) { + STRING_ASSIGN_APPLICATION = context.getString(R.string.quick_launch_assign_application); + STRING_NO_SHORTCUT = context.getString(R.string.quick_launch_no_shortcut); + + TypedValue outValue = new TypedValue(); + context.getTheme().resolveAttribute(android.R.attr.disabledAlpha, outValue, true); + sDimAlpha = (int) (outValue.getFloat() * 255); + } + } + + mShortcut = shortcut; + + setWidgetLayoutResource(R.layout.preference_widget_shortcut); + } + + public char getShortcut() { + return mShortcut; + } + + public void setShortcut(char shortcut) { + if (shortcut != mShortcut) { + mShortcut = shortcut; + notifyChanged(); + } + } + + public boolean hasBookmark() { + return mHasBookmark; + } + + public void setHasBookmark(boolean hasBookmark) { + if (hasBookmark != mHasBookmark) { + mHasBookmark = hasBookmark; + notifyChanged(); + } + } + + @Override + public CharSequence getTitle() { + return mHasBookmark ? super.getTitle() : STRING_ASSIGN_APPLICATION; + } + + @Override + public CharSequence getSummary() { + return mHasBookmark ? super.getSummary() : STRING_NO_SHORTCUT; + } + + @Override + protected void onBindView(View view) { + super.onBindView(view); + + TextView shortcutView = (TextView) view.findViewById(R.id.shortcut); + if (shortcutView != null) { + shortcutView.setText(String.valueOf(mShortcut)); + } + + TextView titleView = (TextView) view.findViewById(android.R.id.title); + + synchronized (sStaticVarsLock) { + if (sRegularTitleColor == null) { + sRegularTitleColor = titleView.getTextColors(); + sDimTitleColor = sRegularTitleColor.withAlpha(sDimAlpha); + } + } + + ColorStateList color = mHasBookmark ? sRegularTitleColor : sDimTitleColor; + if (color != null) { + titleView.setTextColor(color); + } + + TextView summaryView = (TextView) view.findViewById(android.R.id.summary); + + synchronized (sStaticVarsLock) { + if (sRegularSummaryColor == null) { + sRegularSummaryColor = summaryView.getTextColors(); + sDimSummaryColor = sRegularSummaryColor.withAlpha(sDimAlpha); + } + } + + color = mHasBookmark ? sRegularSummaryColor : sDimSummaryColor; + if (color != null) { + summaryView.setTextColor(color); + } + + } + + public int compareTo(Preference another) { + if (!(another instanceof ShortcutPreference)) return super.compareTo(another); + + // Letters before digits + char other = ((ShortcutPreference) another).mShortcut; + if (Character.isDigit(mShortcut) && Character.isLetter(other)) return 1; + else if (Character.isDigit(other) && Character.isLetter(mShortcut)) return -1; + else return mShortcut - other; + } + +} diff --git a/src/com/android/settings/wifi/AccessPointDialog.java b/src/com/android/settings/wifi/AccessPointDialog.java new file mode 100644 index 0000000..95e469f --- /dev/null +++ b/src/com/android/settings/wifi/AccessPointDialog.java @@ -0,0 +1,607 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.R; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.text.TextUtils; +import android.text.method.PasswordTransformationMethod; +import android.text.method.TransformationMethod; +import android.util.Log; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.TableLayout; +import android.widget.TextView; + +public class AccessPointDialog extends AlertDialog implements DialogInterface.OnClickListener, + AdapterView.OnItemSelectedListener, View.OnClickListener { + + private static final String TAG = "AccessPointDialog"; + private static final String INSTANCE_KEY_ACCESS_POINT_STATE = + "com.android.settings.wifi.AccessPointDialog:accessPointState"; + private static final String INSTANCE_KEY_MODE = + "com.android.settings.wifi.AccessPointDialog:mode"; + private static final String INSTANCE_KEY_CUSTOM_TITLE = + "com.android.settings.wifi.AccessPointDialog:customTitle"; + private static final String INSTANCE_KEY_AUTO_SECURITY_ALLOWED = + "com.android.settings.wifi.AccessPointDialog:autoSecurityAllowed"; + + private static final int POSITIVE_BUTTON = BUTTON1; + private static final int NEGATIVE_BUTTON = BUTTON2; + private static final int NEUTRAL_BUTTON = BUTTON3; + + /** The dialog should show info connectivity functionality */ + public static final int MODE_INFO = 0; + /** The dialog should configure the detailed AP properties */ + public static final int MODE_CONFIGURE = 1; + /** The dialog should have the password field and connect/cancel */ + public static final int MODE_RETRY_PASSWORD = 2; + + // These should be matched with the XML. Both arrays in XML depend on this + // ordering! + private static final int SECURITY_AUTO = 0; + private static final int SECURITY_NONE = 1; + private static final int SECURITY_WEP = 2; + private static final int SECURITY_WPA_PERSONAL = 3; + private static final int SECURITY_WPA2_PERSONAL = 4; + + private static final int[] WEP_TYPE_VALUES = { + AccessPointState.WEP_PASSWORD_AUTO, AccessPointState.WEP_PASSWORD_ASCII, + AccessPointState.WEP_PASSWORD_HEX + }; + + // Button positions, default to impossible values + private int mConnectButtonPos = Integer.MAX_VALUE; + private int mForgetButtonPos = Integer.MAX_VALUE; + private int mSaveButtonPos = Integer.MAX_VALUE; + + // Client configurable items. Generally, these should be saved in instance state + private int mMode = MODE_INFO; + private boolean mAutoSecurityAllowed = true; + private CharSequence mCustomTitle; + // This does not need to be saved in instance state. + private WifiLayer mWifiLayer; + private AccessPointState mState; + + // General views + private View mView; + private TextView mPasswordText; + private EditText mPasswordEdit; + private CheckBox mShowPasswordCheckBox; + + // Info-specific views + private ViewGroup mTable; + + // Configure-specific views + private EditText mSsidEdit; + private Spinner mSecuritySpinner; + private Spinner mWepTypeSpinner; + + public AccessPointDialog(Context context, WifiLayer wifiLayer) { + super(context); + + mWifiLayer = wifiLayer; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + onLayout(); + onFill(); + + super.onCreate(savedInstanceState); + } + + @Override + public void onRestoreInstanceState(Bundle savedInstanceState) { + // Set to a class loader that can find AccessPointState + savedInstanceState.setClassLoader(getClass().getClassLoader()); + + mState = savedInstanceState.getParcelable(INSTANCE_KEY_ACCESS_POINT_STATE); + mState.setContext(getContext()); + + mMode = savedInstanceState.getInt(INSTANCE_KEY_MODE, mMode); + mAutoSecurityAllowed = savedInstanceState.getBoolean(INSTANCE_KEY_AUTO_SECURITY_ALLOWED, + mAutoSecurityAllowed); + mCustomTitle = savedInstanceState.getCharSequence(INSTANCE_KEY_CUSTOM_TITLE); + if (mCustomTitle != null) { + setTitle(mCustomTitle); + } + + // This is called last since it depends on the above values + super.onRestoreInstanceState(savedInstanceState); + + if (mShowPasswordCheckBox != null) { + // Restore the show-password-state on the edit text + setShowPassword(mShowPasswordCheckBox.isChecked()); + } + } + + @Override + public Bundle onSaveInstanceState() { + Bundle bundle = super.onSaveInstanceState(); + bundle.putParcelable(INSTANCE_KEY_ACCESS_POINT_STATE, mState); + bundle.putInt(INSTANCE_KEY_MODE, mMode); + bundle.putBoolean(INSTANCE_KEY_AUTO_SECURITY_ALLOWED, mAutoSecurityAllowed); + bundle.putCharSequence(INSTANCE_KEY_CUSTOM_TITLE, mCustomTitle); + return bundle; + } + + /** + * Sets state to show in this dialog. + * + * @param state The state. + */ + public void setState(AccessPointState state) { + mState = state; + } + + /** + * Sets the dialog mode. + * @param mode One of {@link #MODE_CONFIGURE} or {@link #MODE_INFO} + */ + public void setMode(int mode) { + mMode = mode; + } + + public void setAutoSecurityAllowed(boolean autoSecurityAllowed) { + mAutoSecurityAllowed = autoSecurityAllowed; + } + + @Override + public void setTitle(CharSequence title) { + super.setTitle(title); + mCustomTitle = title; + } + + @Override + public void setTitle(int titleId) { + setTitle(getContext().getString(titleId)); + } + + /** Called after flags are set, the dialog's layout/etc should be set up here */ + private void onLayout() { + final Context context = getContext(); + final String ssid = mState.getHumanReadableSsid(); + + int positiveButtonResId = 0; + int negativeButtonResId = R.string.cancel; + int neutralButtonResId = 0; + + if (mCustomTitle == null) { + // Generic title is the SSID + // We don't want to trigger this as a custom title, so call super's + super.setTitle(ssid); + } + setInverseBackgroundForced(true); + + boolean defaultPasswordVisibility = true; + + if (mMode == MODE_CONFIGURE) { + setLayout(R.layout.wifi_ap_configure); + + positiveButtonResId = R.string.wifi_save_config; + mSaveButtonPos = POSITIVE_BUTTON; + + } else if (mMode == MODE_INFO) { + setLayout(R.layout.wifi_ap_info); + + if (mState.isConnectable()) { + if (mCustomTitle == null) { + // We don't want to trigger this as a custom title, so call super's + super.setTitle(context.getString(R.string.connect_to_blank, ssid)); + } + positiveButtonResId = R.string.connect; + mConnectButtonPos = POSITIVE_BUTTON; + } + + if (mState.isForgetable()) { + if (positiveButtonResId == 0) { + positiveButtonResId = R.string.forget_network; + mForgetButtonPos = POSITIVE_BUTTON; + } else { + neutralButtonResId = R.string.forget_network; + mForgetButtonPos = NEUTRAL_BUTTON; + } + } + } else if (mMode == MODE_RETRY_PASSWORD) { + setLayout(R.layout.wifi_ap_retry_password); + + positiveButtonResId = R.string.connect; + mConnectButtonPos = POSITIVE_BUTTON; + + setGenericPasswordVisible(true); + defaultPasswordVisibility = false; + } + + if (defaultPasswordVisibility) { + if (!mState.configured && mState.seen && mState.hasSecurity()) { + setGenericPasswordVisible(true); + } else { + setGenericPasswordVisible(false); + } + } + + setButtons(positiveButtonResId, negativeButtonResId, neutralButtonResId); + } + + /** Called when we need to set our member variables to point to the views. */ + private void onReferenceViews(View view) { + mPasswordText = (TextView) view.findViewById(R.id.password_text); + mPasswordEdit = (EditText) view.findViewById(R.id.password_edit); + + mShowPasswordCheckBox = (CheckBox) view.findViewById(R.id.show_password_checkbox); + if (mShowPasswordCheckBox != null) { + mShowPasswordCheckBox.setOnClickListener(this); + } + + if (mMode == MODE_CONFIGURE) { + mSsidEdit = (EditText) view.findViewById(R.id.ssid_edit); + mSecuritySpinner = (Spinner) view.findViewById(R.id.security_spinner); + mSecuritySpinner.setOnItemSelectedListener(this); + setSecuritySpinnerAdapter(); + mWepTypeSpinner = (Spinner) view.findViewById(R.id.wep_type_spinner); + + } else if (mMode == MODE_INFO) { + mTable = (ViewGroup) view.findViewById(R.id.table); + } + + } + + private void setSecuritySpinnerAdapter() { + Context context = getContext(); + int arrayResId = mAutoSecurityAllowed ? R.array.wifi_security_entries + : R.array.wifi_security_without_auto_entries; + + ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(context, + android.R.layout.simple_spinner_item, + context.getResources().getStringArray(arrayResId)); + adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + mSecuritySpinner.setAdapter(adapter); + } + + /** Called when the widgets are in-place waiting to be filled with data */ + private void onFill() { + + // Appears in the order added + if (mMode == MODE_INFO) { + if (mState.primary) { + addInfoRow(R.string.wifi_status, mState.getSummarizedStatus()); + addInfoRow(R.string.wifi_link_speed, mState.linkSpeed + WifiInfo.LINK_SPEED_UNITS); + } + + if (mState.seen) { + addInfoRow(R.string.signal, getSignalResId(mState.signal)); + } + + if (mState.security != null) { + addInfoRow(R.string.security, mState.getHumanReadableSecurity()); + } + + if (mState.primary && mState.ipAddress != 0) { + addInfoRow(R.string.ip_address, ipAddressToString(mState.ipAddress)); + } + + } else if (mMode == MODE_CONFIGURE) { + String ssid = mState.getHumanReadableSsid(); + if (!TextUtils.isEmpty(ssid)) { + mSsidEdit.setText(ssid); + } + + mPasswordEdit.setHint(R.string.wifi_password_unchanged); + } + + updatePasswordCaption(mState.security); + } + + private void updatePasswordCaption(String security) { + + if (mPasswordText != null && security != null + && security.equals(AccessPointState.WEP)) { + mPasswordText.setText(R.string.please_type_hex_key); + } else { + mPasswordText.setText(R.string.please_type_passphrase); + } + } + + private void addInfoRow(int nameResId, String value) { + View rowView = getLayoutInflater().inflate(R.layout.wifi_ap_info_row, mTable, false); + ((TextView) rowView.findViewById(R.id.name)).setText(nameResId); + ((TextView) rowView.findViewById(R.id.value)).setText(value); + mTable.addView(rowView); + } + + private void addInfoRow(int nameResId, int valueResId) { + addInfoRow(nameResId, getContext().getString(valueResId)); + } + + private void setButtons(int positiveResId, int negativeResId, int neutralResId) { + final Context context = getContext(); + + if (positiveResId > 0) { + setButton(context.getString(positiveResId), this); + } + + if (negativeResId > 0) { + setButton2(context.getString(negativeResId), this); + } + + if (neutralResId > 0) { + setButton3(context.getString(neutralResId), this); + } + } + + private void setLayout(int layoutResId) { + setView(mView = getLayoutInflater().inflate(layoutResId, null)); + onReferenceViews(mView); + } + + public void onClick(DialogInterface dialog, int which) { + if (which == mForgetButtonPos) { + handleForget(); + } else if (which == mConnectButtonPos) { + handleConnect(); + } else if (which == mSaveButtonPos) { + handleSave(); + } + } + + private void handleForget() { + if (!replaceStateWithWifiLayerInstance()) return; + mWifiLayer.forgetNetwork(mState); + } + + private void handleConnect() { + if (!replaceStateWithWifiLayerInstance()) { + Log.w(TAG, "Assuming connecting to a new network."); + } + + /* + * If the network is secured and they haven't entered a password, popup + * an error. Allow empty passwords if the state already has a password + * set (since in that scenario, an empty password means keep the old + * password). + */ + String password = getEnteredPassword(); + boolean passwordIsEmpty = TextUtils.isEmpty(password); + + /* + * When 'retry password', they can not enter a blank password. In any + * other mode, we let them enter a blank password if the state already + * has a password. + */ + if (passwordIsEmpty && (!mState.hasPassword() || mMode == MODE_RETRY_PASSWORD) + && (mState.security != null) && !mState.security.equals(AccessPointState.OPEN)) { + new AlertDialog.Builder(getContext()) + .setTitle(R.string.error_title) + .setIcon(android.R.drawable.ic_dialog_alert) + .setMessage(R.string.wifi_password_incorrect_error) + .setPositiveButton(android.R.string.ok, null) + .show(); + return; + } + + if (!passwordIsEmpty) { + mState.setPassword(password); + } + + mWifiLayer.connectToNetwork(mState); + } + + private void handleSave() { + replaceStateWithWifiLayerInstance(); + + String ssid = mSsidEdit.getText().toString(); + String password = mPasswordEdit.getText().toString(); + + mState.setSsid(ssid); + + int securityType = getSecurityTypeFromSpinner(); + + if (!TextUtils.isEmpty(password)) { + switch (securityType) { + + case SECURITY_WPA_PERSONAL: { + mState.setSecurity(AccessPointState.WPA); + mState.setPassword(password); + break; + } + + case SECURITY_WPA2_PERSONAL: { + mState.setSecurity(AccessPointState.WPA2); + mState.setPassword(password); + break; + } + + case SECURITY_AUTO: { + mState.setPassword(password); + break; + } + + case SECURITY_WEP: { + mState.setSecurity(AccessPointState.WEP); + mState.setPassword(password, + WEP_TYPE_VALUES[mWepTypeSpinner.getSelectedItemPosition()]); + break; + } + + } + } else { + mState.setSecurity(AccessPointState.OPEN); + } + + if (securityType == SECURITY_NONE) { + mState.setSecurity(AccessPointState.OPEN); + } + + if (!mWifiLayer.saveNetwork(mState)) { + return; + } + + // Connect right away if they've touched it + if (!mWifiLayer.connectToNetwork(mState)) { + return; + } + + } + + /** + * Replaces our {@link #mState} with the equal WifiLayer instance. This is useful after + * we unparceled the state previously and before we are calling methods on {@link #mWifiLayer}. + * + * @return Whether WifiLayer was able to find an equal state in its set. + */ + private boolean replaceStateWithWifiLayerInstance() { + AccessPointState state = mWifiLayer.getWifiLayerApInstance(mState); + if (state == null) { + return false; + } + + mState = state; + return true; + } + + private int getSecurityTypeFromSpinner() { + int position = mSecuritySpinner.getSelectedItemPosition(); + // If there is no AUTO choice, the position needs 1 added to get + // to the proper spinner position -> security constants mapping + return mAutoSecurityAllowed ? position : position + 1; + } + + private String getEnteredPassword() { + return mPasswordEdit != null ? mPasswordEdit.getText().toString() : null; + } + + /** + * Call the one you want to hide first. + */ + private void setWepVisible(boolean visible) { + setGenericPasswordVisible(visible); + int visibility = visible ? View.VISIBLE : View.GONE; + mWepTypeSpinner.setVisibility(visibility); + } + + /** + * @see #setWepVisible(boolean) + */ + private void setGenericPasswordVisible(boolean visible) { + int visibility = visible ? View.VISIBLE : View.GONE; + mPasswordText.setVisibility(visibility); + mPasswordEdit.setVisibility(visibility); + mShowPasswordCheckBox.setVisibility(visibility); + } + + public void onItemSelected(AdapterView parent, View view, int position, long id) { + if (parent == mSecuritySpinner) { + handleSecurityChange(getSecurityTypeFromSpinner()); + } + } + + public void onNothingSelected(AdapterView parent) { + } + + private void handleSecurityChange(int security) { + + switch (security) { + + case SECURITY_NONE: { + setWepVisible(false); + setGenericPasswordVisible(false); + break; + } + + case SECURITY_WEP: { + setGenericPasswordVisible(false); + setWepVisible(true); + updatePasswordCaption(AccessPointState.WEP); + break; + } + + case SECURITY_AUTO: { + setWepVisible(false); + setGenericPasswordVisible(mState.hasSecurity()); + // Shows the generic 'wireless password' + updatePasswordCaption(AccessPointState.WPA); + break; + } + + case SECURITY_WPA_PERSONAL: + case SECURITY_WPA2_PERSONAL: { + setWepVisible(false); + setGenericPasswordVisible(true); + // Both WPA and WPA2 show the same caption, so either is ok + updatePasswordCaption(AccessPointState.WPA); + break; + } + } + } + + private static int getSignalResId(int signal) { + switch (WifiManager.calculateSignalLevel(signal, 4)) { + case 0: { + return R.string.wifi_signal_0; + } + case 1: { + return R.string.wifi_signal_1; + } + case 2: { + return R.string.wifi_signal_2; + } + case 3: { + return R.string.wifi_signal_3; + } + } + + return 0; + } + + private static String ipAddressToString(int addr) { + StringBuffer buf = new StringBuffer(); + buf.append(addr & 0xff).append('.'). + append((addr >>>= 8) & 0xff).append('.'). + append((addr >>>= 8) & 0xff).append('.'). + append((addr >>>= 8) & 0xff); + return buf.toString(); + } + + public void onClick(View v) { + if (v == mShowPasswordCheckBox) { + setShowPassword(mShowPasswordCheckBox.isChecked()); + } + } + + private void setShowPassword(boolean showPassword) { + if (mPasswordEdit != null) { + // Toggle password + mPasswordEdit.setTransformationMethod( + showPassword ? + null : + PasswordTransformationMethod.getInstance()); + } + } + +} diff --git a/src/com/android/settings/wifi/AccessPointPreference.java b/src/com/android/settings/wifi/AccessPointPreference.java new file mode 100644 index 0000000..10e0947 --- /dev/null +++ b/src/com/android/settings/wifi/AccessPointPreference.java @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.R; + +import android.net.wifi.WifiManager; +import android.preference.Preference; +import android.view.View; +import android.widget.ImageView; + +public class AccessPointPreference extends Preference implements + AccessPointState.AccessPointStateCallback { + + // UI states + private static final int[] STATE_ENCRYPTED = { R.attr.state_encrypted }; + private static final int[] STATE_EMPTY = { }; + + // Signal strength indicator + private static final int UI_SIGNAL_LEVELS = 4; + + private WifiSettings mWifiSettings; + + private AccessPointState mState; + + public AccessPointPreference(WifiSettings wifiSettings, AccessPointState state) { + super(wifiSettings, null); + + mWifiSettings = wifiSettings; + mState = state; + + setWidgetLayoutResource(R.layout.preference_widget_wifi_signal); + + state.setCallback(this); + + refresh(); + } + + public void refresh() { + setTitle(mState.getHumanReadableSsid()); + setSummary(mState.getSummarizedStatus()); + + notifyChanged(); + } + + public void refreshAccessPointState() { + refresh(); + + // The ordering of access points could have changed due to the state change, so + // re-evaluate ordering + notifyHierarchyChanged(); + } + + @Override + protected void onBindView(View view) { + super.onBindView(view); + + ImageView signal = (ImageView) view.findViewById(R.id.signal); + if (mState.seen) { + signal.setImageResource(R.drawable.wifi_signal); + signal.setImageState(mState.hasSecurity() ? STATE_ENCRYPTED : STATE_EMPTY, true); + signal.setImageLevel(getUiSignalLevel()); + } else { + signal.setImageDrawable(null); + } + } + + private int getUiSignalLevel() { + return mState != null ? WifiManager.calculateSignalLevel(mState.signal, UI_SIGNAL_LEVELS) + : 0; + } + + /** + * Returns the {@link AccessPointState} associated with this preference. + * @return The {@link AccessPointState}. + */ + public AccessPointState getAccessPointState() { + return mState; + } + + @Override + public int compareTo(Preference another) { + if (!(another instanceof AccessPointPreference)) { + // Let normal preferences go before us. + // NOTE: we should only be compared to Preference in our + // category. + return 1; + } + + return mState.compareTo(((AccessPointPreference) another).mState); + } + +} + diff --git a/src/com/android/settings/wifi/AccessPointState.java b/src/com/android/settings/wifi/AccessPointState.java new file mode 100644 index 0000000..8dabbd1 --- /dev/null +++ b/src/com/android/settings/wifi/AccessPointState.java @@ -0,0 +1,869 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.R; + +import android.content.Context; +import android.net.NetworkInfo; +import android.net.wifi.ScanResult; +import android.net.wifi.WifiConfiguration; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiConfiguration.AuthAlgorithm; +import android.net.wifi.WifiConfiguration.GroupCipher; +import android.net.wifi.WifiConfiguration.KeyMgmt; +import android.net.wifi.WifiConfiguration.PairwiseCipher; +import android.net.wifi.WifiConfiguration.Protocol; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.TextUtils; +import android.util.Log; + +public final class AccessPointState implements Comparable<AccessPointState>, Parcelable { + + private static final String TAG = "AccessPointState"; + + // Constants used for different security types + public static final String WPA2 = "WPA2"; + public static final String WPA = "WPA"; + public static final String WEP = "WEP"; + public static final String OPEN = "Open"; + + /** String present in capabilities if the scan result is ad-hoc */ + private static final String ADHOC_CAPABILITY = "[IBSS]"; + /** String present in capabilities if the scan result is enterprise secured */ + private static final String ENTERPRISE_CAPABILITY = "-EAP-"; + + // Localized strings for different security types + private static String LOCALIZED_WPA2; + private static String LOCALIZED_WPA; + private static String LOCALIZED_WEP; + private static String LOCALIZED_OPEN; + private static String LOCALIZED_UNKNOWN; + private static String LOCALIZED_VERBOSE_WPA2; + private static String LOCALIZED_VERBOSE_WPA; + private static String LOCALIZED_VERBOSE_WEP; + private static String LOCALIZED_VERBOSE_OPEN; + + + // Localized strings for various messages + private static String SUMMARY_NOT_IN_RANGE; + private static String SUMMARY_REMEMBERED; + private static String SUMMARY_CONNECTION_FAILED; + + public static final String BSSID_ANY = "any"; + public static final int NETWORK_ID_NOT_SET = -1; + /** This should be used with care! */ + static final int NETWORK_ID_ANY = -2; + + public static final int MATCH_NONE = 0; + public static final int MATCH_WEAK = 1; + public static final int MATCH_STRONG = 2; + public static final int MATCH_EXACT = 3; + + // Don't set these directly, use the setters. + public int networkId; + public int priority; + public boolean hiddenSsid; + public int linkSpeed; + public int ipAddress; + public String bssid; + public String ssid; + public int signal; + public boolean primary; + public boolean seen; + public boolean configured; + public NetworkInfo.DetailedState status; + public String security; + public boolean disabled; + + /** + * Use this for sorting based on signal strength. It is a heavily-damped + * time-averaged weighted signal. + */ + private float signalForSorting = Float.MIN_VALUE; + + private static final float DAMPING_FACTOR = 0.2f; + + /** + * This will be a user entered password, and NOT taken from wpa_supplicant + * (since it would give us *) + */ + private String mPassword; + private boolean mConfigHadPassword; + + public static final int WEP_PASSWORD_AUTO = 0; + public static final int WEP_PASSWORD_ASCII = 1; + public static final int WEP_PASSWORD_HEX = 2; + private int mWepPasswordType; + + private Context mContext; + + /** + * If > 0, don't refresh (changes are being batched), use + * {@link #blockRefresh()} and {@link #unblockRefresh()} only. + */ + private int mBlockRefresh; + /** + * This will be set by {@link #requestRefresh} and shouldn't be written to + * elsewhere. + */ + private boolean mNeedsRefresh; + + private AccessPointStateCallback mCallback; + + private StringBuilder mSummaryBuilder = new StringBuilder(); + + interface AccessPointStateCallback { + void refreshAccessPointState(); + } + + public AccessPointState(Context context) { + this(); + + setContext(context); + } + + private AccessPointState() { + bssid = BSSID_ANY; + ssid = ""; + networkId = NETWORK_ID_NOT_SET; + hiddenSsid = false; + } + + void setContext(Context context) { + mContext = context; + setStrings(); + } + + private void setStrings() { + final Context c = mContext; + + if (SUMMARY_NOT_IN_RANGE == null && c != null) { + SUMMARY_NOT_IN_RANGE = c.getString(R.string.summary_not_in_range); + SUMMARY_REMEMBERED = c.getString(R.string.summary_remembered); + SUMMARY_CONNECTION_FAILED = c.getString(R.string.summary_connection_failed); + + LOCALIZED_OPEN = c.getString(R.string.wifi_security_open); + LOCALIZED_WEP = c.getString(R.string.wifi_security_wep); + LOCALIZED_WPA = c.getString(R.string.wifi_security_wpa); + LOCALIZED_WPA2 = c.getString(R.string.wifi_security_wpa2); + + LOCALIZED_VERBOSE_OPEN = c.getString(R.string.wifi_security_verbose_open); + LOCALIZED_VERBOSE_WEP = c.getString(R.string.wifi_security_verbose_wep); + LOCALIZED_VERBOSE_WPA = c.getString(R.string.wifi_security_verbose_wpa); + LOCALIZED_VERBOSE_WPA2 = c.getString(R.string.wifi_security_verbose_wpa2); + + LOCALIZED_UNKNOWN = c.getString(R.string.wifi_security_unknown); + } + } + + public void setNetworkId(int networkId) { + this.networkId = networkId; + } + + public void setBssid(String bssid) { + if (bssid != null) { + // If the BSSID is a wildcard, do NOT let a specific BSSID replace it + if (!this.bssid.equals(BSSID_ANY)) { + this.bssid = bssid; + } + } + } + + private String getWpaSupplicantBssid() { + return bssid.equals(BSSID_ANY) ? null : bssid; + } + + public static String convertToQuotedString(String string) { + if (TextUtils.isEmpty(string)) { + return ""; + } + + final int lastPos = string.length() - 1; + if (lastPos < 0 || (string.charAt(0) == '"' && string.charAt(lastPos) == '"')) { + return string; + } + + return "\"" + string + "\""; + } + + public void setPrimary(boolean primary) { + if (this.primary != primary) { + this.primary = primary; + requestRefresh(); + } + } + + public void setSeen(boolean seen) { + if (this.seen != seen) { + this.seen = seen; + requestRefresh(); + } + } + + public void setDisabled(boolean disabled) { + if (this.disabled != disabled) { + this.disabled = disabled; + requestRefresh(); + } + } + + public void setSignal(int signal) { + + if (signalForSorting == Float.MIN_VALUE) { + signalForSorting = signal; + } else { + signalForSorting = (DAMPING_FACTOR * signal) + ((1-DAMPING_FACTOR) * signalForSorting); + } + + if (this.signal != signal) { + this.signal = signal; + requestRefresh(); + } + } + + public String getHumanReadableSsid() { + if (TextUtils.isEmpty(ssid)) { + return ""; + } + + final int lastPos = ssid.length() - 1; + if (ssid.charAt(0) == '"' && ssid.charAt(lastPos) == '"') { + return ssid.substring(1, lastPos); + } + + return ssid; + } + + public void setSsid(String ssid) { + if (ssid != null) { + this.ssid = convertToQuotedString(ssid); + requestRefresh(); + } + } + + public void setPriority(int priority) { + if (this.priority != priority) { + this.priority = priority; + requestRefresh(); + } + } + + public void setHiddenSsid(boolean hiddenSsid) { + if (this.hiddenSsid != hiddenSsid) { + this.hiddenSsid = hiddenSsid; + requestRefresh(); + } + } + + public void setLinkSpeed(int linkSpeed) { + if (this.linkSpeed != linkSpeed) { + this.linkSpeed = linkSpeed; + requestRefresh(); + } + } + + public void setIpAddress(int address) { + if (ipAddress != address) { + ipAddress = address; + requestRefresh(); + } + } + + public void setConfigured(boolean configured) { + if (this.configured != configured) { + this.configured = configured; + requestRefresh(); + } + } + + public void setStatus(NetworkInfo.DetailedState status) { + if (this.status != status) { + this.status = status; + requestRefresh(); + } + } + + public void setSecurity(String security) { + if (TextUtils.isEmpty(this.security) || !this.security.equals(security)) { + this.security = security; + requestRefresh(); + } + } + + public boolean hasSecurity() { + return security != null && !security.contains(OPEN); + } + + public String getHumanReadableSecurity() { + if (security.equals(OPEN)) return LOCALIZED_OPEN; + else if (security.equals(WEP)) return LOCALIZED_WEP; + else if (security.equals(WPA)) return LOCALIZED_WPA; + else if (security.equals(WPA2)) return LOCALIZED_WPA2; + + return LOCALIZED_UNKNOWN; + } + + public void updateFromScanResult(ScanResult scanResult) { + blockRefresh(); + + // We don't keep specific AP BSSIDs and instead leave that as wildcard + + setSeen(true); + setSsid(scanResult.SSID); + if (networkId == NETWORK_ID_NOT_SET) { + // Since ScanResults don't cross-reference network ID, we set it as a wildcard + setNetworkId(NETWORK_ID_ANY); + } + setSignal(scanResult.level); + setSecurity(getScanResultSecurity(scanResult)); + unblockRefresh(); + } + + /** + * @return The security of a given {@link ScanResult}. + */ + public static String getScanResultSecurity(ScanResult scanResult) { + final String cap = scanResult.capabilities; + final String[] securityModes = { WEP, WPA, WPA2 }; + for (int i = securityModes.length - 1; i >= 0; i--) { + if (cap.contains(securityModes[i])) { + return securityModes[i]; + } + } + + return OPEN; + } + + /** + * @return Whether the given ScanResult represents an adhoc network. + */ + public static boolean isAdhoc(ScanResult scanResult) { + return scanResult.capabilities.contains(ADHOC_CAPABILITY); + } + + /** + * @return Whether the given ScanResult has enterprise security. + */ + public static boolean isEnterprise(ScanResult scanResult) { + return scanResult.capabilities.contains(ENTERPRISE_CAPABILITY); + } + + public void updateFromWifiConfiguration(WifiConfiguration wifiConfig) { + if (wifiConfig != null) { + blockRefresh(); + setBssid(wifiConfig.BSSID); + setNetworkId(wifiConfig.networkId); + setPriority(wifiConfig.priority); + setHiddenSsid(wifiConfig.hiddenSSID); + setSsid(wifiConfig.SSID); + setConfigured(true); + setDisabled(wifiConfig.status == WifiConfiguration.Status.DISABLED); + parseWifiConfigurationSecurity(wifiConfig); + unblockRefresh(); + } + } + + public void setPassword(String password) { + setPassword(password, WEP_PASSWORD_AUTO); + } + + public void setPassword(String password, int wepPasswordType) { + mPassword = password; + mWepPasswordType = wepPasswordType; + } + + public boolean hasPassword() { + return !TextUtils.isEmpty(mPassword) || mConfigHadPassword; + } + + private static boolean hasPassword(WifiConfiguration wifiConfig) { + return !TextUtils.isEmpty(wifiConfig.preSharedKey) + || !TextUtils.isEmpty(wifiConfig.wepKeys[0]) + || !TextUtils.isEmpty(wifiConfig.wepKeys[1]) + || !TextUtils.isEmpty(wifiConfig.wepKeys[2]) + || !TextUtils.isEmpty(wifiConfig.wepKeys[3]); + } + + private void parseWifiConfigurationSecurity(WifiConfiguration wifiConfig) { + setSecurity(getWifiConfigurationSecurity(wifiConfig)); + mConfigHadPassword = hasPassword(wifiConfig); + } + + /** + * @return The security of a given {@link WifiConfiguration}. + */ + public static String getWifiConfigurationSecurity(WifiConfiguration wifiConfig) { + + if (wifiConfig.allowedKeyManagement.get(KeyMgmt.NONE)) { + // If we never set group ciphers, wpa_supplicant puts all of them. + // For open, we don't set group ciphers. + // For WEP, we specifically only set WEP40 and WEP104, so CCMP + // and TKIP should not be there. + if (!wifiConfig.allowedGroupCiphers.get(GroupCipher.CCMP) + && (wifiConfig.allowedGroupCiphers.get(GroupCipher.WEP40) + || wifiConfig.allowedGroupCiphers.get(GroupCipher.WEP104))) { + return WEP; + } else { + return OPEN; + } + } else if (wifiConfig.allowedProtocols.get(Protocol.RSN)) { + return WPA2; + } else if (wifiConfig.allowedProtocols.get(Protocol.WPA)) { + return WPA; + } else { + Log.w(TAG, "Unknown security type from WifiConfiguration, falling back on open."); + return OPEN; + } + } + + public void updateFromWifiInfo(WifiInfo wifiInfo, NetworkInfo.DetailedState state) { + if (wifiInfo != null) { + blockRefresh(); + setBssid(wifiInfo.getBSSID()); + setLinkSpeed(wifiInfo.getLinkSpeed()); + setNetworkId(wifiInfo.getNetworkId()); + setIpAddress(wifiInfo.getIpAddress()); + setSsid(wifiInfo.getSSID()); + if (state != null) { + setStatus(state); + } + setHiddenSsid(wifiInfo.getHiddenSSID()); + unblockRefresh(); + } + } + + /** + * @return Whether this AP can be connected to at the moment. + */ + public boolean isConnectable() { + return !primary && seen; + } + + /** + * @return Whether this AP can be forgotten at the moment. + */ + public boolean isForgetable() { + return configured; + } + + /** + * Updates the state as if it were never configured. + * <p> + * Note: This will not pass the forget call to the Wi-Fi API. + */ + public void forget() { + blockRefresh(); + setConfigured(false); + setNetworkId(NETWORK_ID_NOT_SET); + setPrimary(false); + setStatus(null); + setDisabled(false); + unblockRefresh(); + } + + public void updateWifiConfiguration(WifiConfiguration config) { + config.BSSID = getWpaSupplicantBssid(); + config.priority = priority; + config.hiddenSSID = hiddenSsid; + config.SSID = convertToQuotedString(ssid); + + setupSecurity(config); + } + + private void setupSecurity(WifiConfiguration config) { + config.allowedAuthAlgorithms.clear(); + config.allowedGroupCiphers.clear(); + config.allowedKeyManagement.clear(); + config.allowedPairwiseCiphers.clear(); + config.allowedProtocols.clear(); + + if (TextUtils.isEmpty(security)) { + security = OPEN; + Log.w(TAG, "Empty security, assuming open"); + } + + if (security.equals(WEP)) { + + // If password is empty, it should be left untouched + if (!TextUtils.isEmpty(mPassword)) { + if (mWepPasswordType == WEP_PASSWORD_AUTO) { + if (isHexWepKey(mPassword)) { + config.wepKeys[0] = mPassword; + } else { + config.wepKeys[0] = convertToQuotedString(mPassword); + } + } else { + config.wepKeys[0] = mWepPasswordType == WEP_PASSWORD_ASCII + ? convertToQuotedString(mPassword) + : mPassword; + } + } + + config.wepTxKeyIndex = 0; + + config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN); + config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED); + + config.allowedKeyManagement.set(KeyMgmt.NONE); + + config.allowedGroupCiphers.set(GroupCipher.WEP40); + config.allowedGroupCiphers.set(GroupCipher.WEP104); + + } else if (security.equals(WPA) || security.equals(WPA2)){ + config.allowedGroupCiphers.set(GroupCipher.TKIP); + config.allowedGroupCiphers.set(GroupCipher.CCMP); + + config.allowedKeyManagement.set(KeyMgmt.WPA_PSK); + + config.allowedPairwiseCiphers.set(PairwiseCipher.CCMP); + config.allowedPairwiseCiphers.set(PairwiseCipher.TKIP); + + config.allowedProtocols.set(security.equals(WPA2) ? Protocol.RSN : Protocol.WPA); + + // If password is empty, it should be left untouched + if (!TextUtils.isEmpty(mPassword)) { + config.preSharedKey = convertToQuotedString(mPassword); + } + + } else if (security.equals(OPEN)) { + config.allowedKeyManagement.set(KeyMgmt.NONE); + } + } + + private static boolean isHexWepKey(String wepKey) { + final int len = wepKey.length(); + + // WEP-40, WEP-104, and some vendors using 256-bit WEP (WEP-232?) + if (len != 10 && len != 26 && len != 58) { + return false; + } + + for (int i = len - 1; i >= 0; i--) { + final char c = wepKey.charAt(i); + if (!(c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f')) { + return false; + } + } + + return true; + } + + public void setCallback(AccessPointStateCallback callback) { + mCallback = callback; + } + + void blockRefresh() { + mBlockRefresh++; + } + + void unblockRefresh() { + if (--mBlockRefresh == 0 && mNeedsRefresh) { + requestRefresh(); + } + } + + private void requestRefresh() { + if (mBlockRefresh > 0) { + mNeedsRefresh = true; + return; + } + + if (mCallback != null) { + mCallback.refreshAccessPointState(); + } + + mNeedsRefresh = false; + } + + /** + * {@inheritDoc} + * @see #hashCode() + * @see #equals(Object) + */ + public int matches(int otherNetworkId, String otherBssid, String otherSsid, + String otherSecurity) { + + // Whenever this method is touched, please ensure #equals and #hashCode + // still work with the changes here! + + if (otherSsid == null) { + if (WifiLayer.LOGV) { + Log.w(TAG, "BSSID: " + otherBssid + ", SSID: " + otherSsid); + } + return MATCH_NONE; + } + + /* + * If we both have 'security' set, it must match (an open network still + * has 'security' set to OPEN) + */ + if (security != null && otherSecurity != null) { + if (!security.equals(otherSecurity)) { + return MATCH_NONE; + } + } + + // WifiConfiguration gives an empty bssid as a BSSID wildcard + if (TextUtils.isEmpty(otherBssid)) { + otherBssid = AccessPointState.BSSID_ANY; + } + + final boolean networkIdMatches = networkId == otherNetworkId; + if (!networkIdMatches && networkId != NETWORK_ID_ANY && otherNetworkId != NETWORK_ID_ANY) { + // Network IDs don't match (e.g., 1 & 2 or unset & 1) and neither is a wildcard + return MATCH_NONE; + } + + if (networkIdMatches && otherNetworkId != NETWORK_ID_NOT_SET + && otherNetworkId != NETWORK_ID_ANY) { + // Network ID matches (they're set to the same ID) + return MATCH_EXACT; + } + + // So now, network IDs aren't set or at least one is a wildcard + + final boolean bssidMatches = bssid.equals(otherBssid); + final boolean otherBssidIsWildcard = otherBssid.equals(BSSID_ANY); + if (bssidMatches && !otherBssidIsWildcard) { + // BSSID matches (and neither is a wildcard) + return MATCH_STRONG; + } + + if (!bssidMatches && !bssid.equals(BSSID_ANY) && !otherBssidIsWildcard) { + // BSSIDs don't match (e.g., 00:24:21:21:42:12 & 42:12:44:21:22:52) + // and neither is a wildcard + return MATCH_NONE; + } + + // So now, BSSIDs are both wildcards + + final boolean ssidMatches = ssid.equals(otherSsid); + if (ssidMatches) { + // SSID matches + return MATCH_WEAK; + } + + return MATCH_NONE; + } + + /** + * {@inheritDoc} + * @see #matches(int, String, String) + * @see #equals(Object) + */ + @Override + public int hashCode() { + // Two equal() objects must have same hashCode. + // With Wi-Fi, the broadest match is if two SSIDs are the same. The finer-grained matches + // imply this (for example, the same network IDs means the same WifiConfiguration which + // means the same SSID). + // See #matches for the exact matching algorithm we use. + return ssid != null ? ssid.hashCode() : 0; + } + + /** + * {@inheritDoc} + * @see #matches(int, String, String) + * @see #hashCode() + */ + @Override + public boolean equals(Object o) { + if (!o.getClass().equals(getClass())) { + return false; + } + + final AccessPointState other = (AccessPointState) o; + + // To see which conditions cause two AccessPointStates to be equal, see + // where #matches returns MATCH_WEAK or greater. + + return matches(other.networkId, other.bssid, other.ssid, other.security) >= MATCH_WEAK; + } + + public int matchesWifiConfiguration(WifiConfiguration wifiConfig) { + String security = getWifiConfigurationSecurity(wifiConfig); + return matches(wifiConfig.networkId, wifiConfig.BSSID, wifiConfig.SSID, security); + } + + String getSummarizedStatus() { + StringBuilder sb = mSummaryBuilder; + sb.delete(0, sb.length()); + + if (primary && status != null) { + buildSummary(sb, WifiStatus.getPrintable(mContext, status), true); + + } else if (!seen) { + buildSummary(sb, SUMMARY_NOT_IN_RANGE, true); + + // Remembered comes second in this case + if (!primary && configured) { + buildSummary(sb, SUMMARY_REMEMBERED, true); + } + + } else { + if (configured && disabled) { + // The connection failure overrides all in this case + return SUMMARY_CONNECTION_FAILED; + } + + // Remembered comes first in this case + if (!primary && configured) { + buildSummary(sb, SUMMARY_REMEMBERED, true); + } + + // If it is seen (and not the primary), show the security type + String verboseSecurity = getVerboseSecurity(); + if (verboseSecurity != null) { + buildSummary(sb, verboseSecurity, true); + } + } + + return sb.toString(); + } + + private String getVerboseSecurity() { + if (WEP.equals(security)) { + return LOCALIZED_VERBOSE_WEP; + } else if (WPA.equals(security)) { + return LOCALIZED_VERBOSE_WPA; + } else if (WPA2.equals(security)) { + return LOCALIZED_VERBOSE_WPA2; + } else if (OPEN.equals(security)) { + return LOCALIZED_VERBOSE_OPEN; + } else { + return null; + } + } + + private void buildSummary(StringBuilder sb, String string, boolean autoLowerCaseFirstLetter) { + if (sb.length() == 0) { + sb.append(string); + } else { + sb.append(", "); + if (autoLowerCaseFirstLetter) { + // Convert first letter to lowercase + sb.append(Character.toLowerCase(string.charAt(0))).append(string, 1, + string.length()); + } else { + sb.append(string); + } + } + } + + public int compareTo(AccessPointState other) { + // This ranks the states for displaying in the AP list, not for + // connecting to (wpa_supplicant does that using the WifiConfiguration's + // priority field). + + // Clarity > efficiency, of this logic: + int comparison; + + // Primary + comparison = (other.primary ? 1 : 0) - (primary ? 1 : 0); + if (comparison != 0) return comparison; + + // Currently seen (similar to, but not always the same as within range) + comparison = (other.seen ? 1 : 0) - (seen ? 1 : 0); + if (comparison != 0) return comparison; + + // Configured + comparison = (other.configured ? 1 : 0) - (configured ? 1 : 0); + if (comparison != 0) return comparison; + + if (!configured) { + // Neither are configured + + // Open network + comparison = (hasSecurity() ? 1 : 0) - (other.hasSecurity() ? 1 : 0); + if (comparison != 0) return comparison; + } + + // Signal strength + comparison = (int) (other.signalForSorting - signalForSorting); + if (comparison != 0) return comparison; + + // Alphabetical + return ssid.compareToIgnoreCase(other.ssid); + } + + public String toString() { + return ssid + " (" + bssid + ", " + networkId + ", " + super.toString() + ")"; + } + + /** Implement the Parcelable interface */ + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(bssid); + dest.writeInt(configured ? 1 : 0); + dest.writeInt(ipAddress); + dest.writeInt(linkSpeed); + dest.writeInt(networkId); + dest.writeInt(primary ? 1 : 0); + dest.writeInt(priority); + dest.writeInt(hiddenSsid ? 1 : 0); + dest.writeString(security); + dest.writeInt(seen ? 1 : 0); + dest.writeInt(disabled ? 1 : 0); + dest.writeInt(signal); + dest.writeString(ssid); + dest.writeString(status != null ? status.toString() : null); + dest.writeString(mPassword); + dest.writeInt(mConfigHadPassword ? 1 : 0); + dest.writeInt(mWepPasswordType); + } + + /** Implement the Parcelable interface */ + public int describeContents() { + return 0; + } + + /** Implement the Parcelable interface */ + public static final Creator<AccessPointState> CREATOR = + new Creator<AccessPointState>() { + public AccessPointState createFromParcel(Parcel in) { + AccessPointState state = new AccessPointState(); + state.bssid = in.readString(); + state.configured = in.readInt() == 1; + state.ipAddress = in.readInt(); + state.linkSpeed = in.readInt(); + state.networkId = in.readInt(); + state.primary = in.readInt() == 1; + state.priority = in.readInt(); + state.hiddenSsid = in.readInt() == 1; + state.security = in.readString(); + state.seen = in.readInt() == 1; + state.disabled = in.readInt() == 1; + state.signal = in.readInt(); + state.ssid = in.readString(); + String statusStr = in.readString(); + if (statusStr != null) { + state.status = NetworkInfo.DetailedState.valueOf(statusStr); + } + state.mPassword = in.readString(); + state.mConfigHadPassword = in.readInt() == 1; + state.mWepPasswordType = in.readInt(); + return state; + } + + public AccessPointState[] newArray(int size) { + return new AccessPointState[size]; + } + }; + + +} diff --git a/src/com/android/settings/wifi/IpSettings.java b/src/com/android/settings/wifi/IpSettings.java new file mode 100644 index 0000000..592e8da --- /dev/null +++ b/src/com/android/settings/wifi/IpSettings.java @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.R; + +import android.content.ContentResolver; +import android.os.Bundle; +import android.preference.CheckBoxPreference; +import android.preference.EditTextPreference; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.provider.Settings.System; +import android.view.KeyEvent; +import android.view.Menu; +import android.view.MenuItem; +import android.widget.Toast; + +public class IpSettings extends PreferenceActivity implements Preference.OnPreferenceChangeListener { + + private static final String KEY_USE_STATIC_IP = "use_static_ip"; + + private String[] mSettingNames = { + System.WIFI_STATIC_IP, System.WIFI_STATIC_GATEWAY, System.WIFI_STATIC_NETMASK, + System.WIFI_STATIC_DNS1, System.WIFI_STATIC_DNS2 + }; + + private String[] mPreferenceKeys = { + "ip_address", "gateway", "netmask", "dns1", "dns2" + }; + + private CheckBoxPreference mUseStaticIpCheckBox; + + private static final int MENU_ITEM_SAVE = Menu.FIRST; + private static final int MENU_ITEM_CANCEL = Menu.FIRST + 1; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.ip_settings); + + mUseStaticIpCheckBox = (CheckBoxPreference) findPreference(KEY_USE_STATIC_IP); + + for (int i = 0; i < mPreferenceKeys.length; i++) { + Preference preference = findPreference(mPreferenceKeys[i]); + preference.setOnPreferenceChangeListener(this); + } + } + + @Override + protected void onResume() { + super.onResume(); + + updateUi(); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + + if (keyCode == KeyEvent.KEYCODE_BACK) { + updateSettingsProvider(); + } + + return super.onKeyDown(keyCode, event); + } + + public boolean onPreferenceChange(Preference preference, Object newValue) { + String value = (String) newValue; + + if (!isIpAddress(value)) { + Toast.makeText(this, R.string.wifi_ip_settings_invalid_ip, Toast.LENGTH_LONG).show(); + return false; + } + + preference.setSummary(value); + return true; + } + + private boolean isIpAddress(String value) { + + int start = 0; + int end = value.indexOf('.'); + int numBlocks = 0; + + while (start < value.length()) { + + if (end == -1) { + end = value.length(); + } + + try { + int block = Integer.parseInt(value.substring(start, end)); + if ((block > 255) || (block < 0)) { + return false; + } + } catch (NumberFormatException e) { + return false; + } + + numBlocks++; + + start = end + 1; + end = value.indexOf('.', start); + } + + return numBlocks == 4; + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + + menu.add(0, MENU_ITEM_SAVE, 0, R.string.wifi_ip_settings_menu_save) + .setIcon(android.R.drawable.ic_menu_save); + + menu.add(0, MENU_ITEM_CANCEL, 0, R.string.wifi_ip_settings_menu_cancel) + .setIcon(android.R.drawable.ic_menu_close_clear_cancel); + + return super.onCreateOptionsMenu(menu); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + + switch (item.getItemId()) { + + case MENU_ITEM_SAVE: + updateSettingsProvider(); + finish(); + return true; + + case MENU_ITEM_CANCEL: + finish(); + return true; + } + + return super.onOptionsItemSelected(item); + } + + private void updateUi() { + ContentResolver contentResolver = getContentResolver(); + + mUseStaticIpCheckBox.setChecked(System.getInt(contentResolver, + System.WIFI_USE_STATIC_IP, 0) != 0); + + for (int i = 0; i < mSettingNames.length; i++) { + EditTextPreference preference = (EditTextPreference) findPreference(mPreferenceKeys[i]); + String settingValue = System.getString(contentResolver, mSettingNames[i]); + preference.setText(settingValue); + preference.setSummary(settingValue); + } + } + + private void updateSettingsProvider() { + ContentResolver contentResolver = getContentResolver(); + + System.putInt(contentResolver, System.WIFI_USE_STATIC_IP, + mUseStaticIpCheckBox.isChecked() ? 1 : 0); + + for (int i = 0; i < mSettingNames.length; i++) { + EditTextPreference preference = (EditTextPreference) findPreference(mPreferenceKeys[i]); + System.putString(contentResolver, mSettingNames[i], preference.getText()); + } + } + +} diff --git a/src/com/android/settings/wifi/WifiEnabler.java b/src/com/android/settings/wifi/WifiEnabler.java new file mode 100644 index 0000000..88cfe06 --- /dev/null +++ b/src/com/android/settings/wifi/WifiEnabler.java @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED; +import static android.net.wifi.WifiManager.WIFI_STATE_DISABLING; +import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED; +import static android.net.wifi.WifiManager.WIFI_STATE_ENABLING; +import static android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN; + +import com.android.settings.R; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.net.NetworkInfo; +import android.net.wifi.WifiManager; +import android.preference.Preference; +import android.preference.CheckBoxPreference; +import android.text.TextUtils; +import android.util.Config; +import android.util.Log; + +public class WifiEnabler implements Preference.OnPreferenceChangeListener { + + private static final boolean LOCAL_LOGD = Config.LOGD || WifiLayer.LOGV; + private static final String TAG = "SettingsWifiEnabler"; + + private final Context mContext; + private final WifiManager mWifiManager; + private final CheckBoxPreference mWifiCheckBoxPref; + private final CharSequence mOriginalSummary; + + private final IntentFilter mWifiStateFilter; + private final BroadcastReceiver mWifiStateReceiver = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { + handleWifiStateChanged( + intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, WIFI_STATE_UNKNOWN), + intent.getIntExtra(WifiManager.EXTRA_PREVIOUS_WIFI_STATE, + WIFI_STATE_UNKNOWN)); + } else if (intent.getAction().equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { + handleNetworkStateChanged( + (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO)); + } + } + }; + + public WifiEnabler(Context context, WifiManager wifiManager, + CheckBoxPreference wifiCheckBoxPreference) { + mContext = context; + mWifiCheckBoxPref = wifiCheckBoxPreference; + mWifiManager = wifiManager; + + mOriginalSummary = wifiCheckBoxPreference.getSummary(); + wifiCheckBoxPreference.setPersistent(false); + + mWifiStateFilter = new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION); + mWifiStateFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); + } + + public void resume() { + int state = mWifiManager.getWifiState(); + // This is the widget enabled state, not the preference toggled state + mWifiCheckBoxPref.setEnabled(state == WIFI_STATE_ENABLED || state == WIFI_STATE_DISABLED + || state == WIFI_STATE_UNKNOWN); + + mContext.registerReceiver(mWifiStateReceiver, mWifiStateFilter); + mWifiCheckBoxPref.setOnPreferenceChangeListener(this); + } + + public void pause() { + mContext.unregisterReceiver(mWifiStateReceiver); + mWifiCheckBoxPref.setOnPreferenceChangeListener(null); + } + + public boolean onPreferenceChange(Preference preference, Object value) { + // Turn on/off Wi-Fi + setWifiEnabled((Boolean) value); + + // Don't update UI to opposite state until we're sure + return false; + } + + private void setWifiEnabled(final boolean enable) { + // Disable button + mWifiCheckBoxPref.setEnabled(false); + + if (!mWifiManager.setWifiEnabled(enable)) { + mWifiCheckBoxPref.setSummary(enable ? R.string.error_starting : R.string.error_stopping); + } + } + + private void handleWifiStateChanged(int wifiState, int previousWifiState) { + + if (LOCAL_LOGD) { + Log.d(TAG, "Received wifi state changed from " + + getHumanReadableWifiState(previousWifiState) + " to " + + getHumanReadableWifiState(wifiState)); + } + + if (wifiState == WIFI_STATE_DISABLED || wifiState == WIFI_STATE_ENABLED) { + mWifiCheckBoxPref.setChecked(wifiState == WIFI_STATE_ENABLED); + mWifiCheckBoxPref + .setSummary(wifiState == WIFI_STATE_DISABLED ? mOriginalSummary : null); + + mWifiCheckBoxPref.setEnabled(isEnabledByDependency()); + + } else if (wifiState == WIFI_STATE_DISABLING || wifiState == WIFI_STATE_ENABLING) { + mWifiCheckBoxPref.setSummary(wifiState == WIFI_STATE_ENABLING ? R.string.wifi_starting + : R.string.wifi_stopping); + + } else if (wifiState == WIFI_STATE_UNKNOWN) { + int message = R.string.wifi_error; + if (previousWifiState == WIFI_STATE_ENABLING) message = R.string.error_starting; + else if (previousWifiState == WIFI_STATE_DISABLING) message = R.string.error_stopping; + + mWifiCheckBoxPref.setChecked(false); + mWifiCheckBoxPref.setSummary(message); + mWifiCheckBoxPref.setEnabled(true); + } + } + + private void handleNetworkStateChanged(NetworkInfo networkInfo) { + + if (LOCAL_LOGD) { + Log.d(TAG, "Received network state changed to " + networkInfo); + } + + if (mWifiManager.isWifiEnabled()) { + String summary = WifiStatus.getStatus(mContext, + mWifiManager.getConnectionInfo().getSSID(), networkInfo.getDetailedState()); + mWifiCheckBoxPref.setSummary(summary); + } + } + + private boolean isEnabledByDependency() { + Preference dep = getDependencyPreference(); + if (dep == null) { + return true; + } + + return !dep.shouldDisableDependents(); + } + + private Preference getDependencyPreference() { + String depKey = mWifiCheckBoxPref.getDependency(); + if (TextUtils.isEmpty(depKey)) { + return null; + } + + return mWifiCheckBoxPref.getPreferenceManager().findPreference(depKey); + } + + private static String getHumanReadableWifiState(int wifiState) { + switch (wifiState) { + case WIFI_STATE_DISABLED: + return "Disabled"; + case WIFI_STATE_DISABLING: + return "Disabling"; + case WIFI_STATE_ENABLED: + return "Enabled"; + case WIFI_STATE_ENABLING: + return "Enabling"; + case WIFI_STATE_UNKNOWN: + return "Unknown"; + default: + return "Some other state!"; + } + } +} diff --git a/src/com/android/settings/wifi/WifiLayer.java b/src/com/android/settings/wifi/WifiLayer.java new file mode 100644 index 0000000..b29fd92 --- /dev/null +++ b/src/com/android/settings/wifi/WifiLayer.java @@ -0,0 +1,1302 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED; +import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED; + +import com.android.settings.R; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.net.NetworkInfo; +import android.net.NetworkInfo.DetailedState; +import android.net.NetworkInfo.State; +import android.net.wifi.ScanResult; +import android.net.wifi.SupplicantState; +import android.net.wifi.WifiConfiguration; +import android.net.wifi.WifiInfo; +import android.net.wifi.WifiManager; +import android.os.Handler; +import android.os.Message; +import android.provider.Settings; +import android.text.TextUtils; +import android.util.Config; +import android.util.Log; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +/** + * Helper class for abstracting Wi-Fi. + * <p> + * Client must call {@link #onCreate()}, {@link #onCreatedCallback()}, + * {@link #onPause()}, {@link #onResume()}. + */ +public class WifiLayer { + + private static final String TAG = "SettingsWifiLayer"; + static final boolean LOGV = false || Config.LOGV; + + //============================ + // Other member variables + //============================ + + private Context mContext; + private Callback mCallback; + + static final int MESSAGE_ATTEMPT_SCAN = 1; + private Handler mHandler = new MyHandler(); + + //============================ + // Wifi member variables + //============================ + + private WifiManager mWifiManager; + private IntentFilter mIntentFilter; + private List<AccessPointState> mApScanList = new ArrayList<AccessPointState>(); + private List<AccessPointState> mApOtherList = new ArrayList<AccessPointState>(); + private AccessPointState mCurrentPrimaryAp; + + /** The last access point that we were authenticating with. */ + private AccessPointState mLastAuthenticatingAp; + + /** The delay between scans when we're continually scanning. */ + private static final int CONTINUOUS_SCAN_DELAY_MS = 6000; + /** On failure, the maximum retries for scanning. */ + private static final int SCAN_MAX_RETRY = 5; + /** On failure, the delay between each scan retry. */ + private static final int SCAN_RETRY_DELAY_MS = 1000; + /** On failure, the number of retries so far. */ + private int mScanRetryCount = 0; + /** + * Whether we're currently obtaining an address. Continuous scanning will be + * disabled in this state. + */ + private boolean mIsObtainingAddress; + + /** + * See {@link Settings.System#WIFI_NUM_OPEN_NETWORKS_KEPT}. + */ + private int WIFI_NUM_OPEN_NETWORKS_KEPT; + /** + * Once the highest priority exceeds this value, all networks will be + * wrapped around starting at 0. This is so another client of the Wi-Fi + * API can have access points that aren't managed by us. (If the other + * client wants lower-priority access points than ours, it can use negative + * priority.) + */ + private static final int HIGHEST_PRIORITY_MAX_VALUE = 99999; + /** + * Never access directly, only the related methods should. + */ + private int mNextHighestPriority; + + /** + * This is used to track when the user wants to connect to a specific AP. We + * disable all other APs, set this to true, and let wpa_supplicant connect. + * Once we get a network state change, we re-enable the rest of them. + */ + private boolean mReenableApsOnNetworkStateChange = false; + + /** + * The current supplicant state, as broadcasted. + */ + private SupplicantState mCurrentSupplicantState; + + //============================ + // Inner classes + //============================ + + interface Callback { + void onError(int messageResId); + + /** + * Called when an AP is added or removed. + * + * @param ap The AP. + * @param added {@code true} if added, {@code false} if removed. + */ + void onAccessPointSetChanged(AccessPointState ap, boolean added); + + /** + * Called when the scanning status changes. + * + * @param started {@code true} if the scanning just started, + * {@code false} if it just ended. + */ + void onScanningStatusChanged(boolean started); + + /** + * Called when the access points should be enabled or disabled. This is + * called from both wpa_supplicant being connected/disconnected and Wi-Fi + * being enabled/disabled. + * + * @param enabled {@code true} if they should be enabled, {@code false} + * if they should be disabled. + */ + void onAccessPointsStateChanged(boolean enabled); + + /** + * Called when there is trouble authenticating and the retry-password + * dialog should be shown. + * + * @param ap The access point. + */ + void onRetryPassword(AccessPointState ap); + } + + private BroadcastReceiver mReceiver = new BroadcastReceiver() { + + @Override + public void onReceive(Context context, Intent intent) { + final String action = intent.getAction(); + if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { + handleNetworkStateChanged( + (NetworkInfo) intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO), + intent.getStringExtra(WifiManager.EXTRA_BSSID)); + } else if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { + handleScanResultsAvailable(); + } else if (action.equals(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION)) { + handleSupplicantConnectionChanged( + intent.getBooleanExtra(WifiManager.EXTRA_SUPPLICANT_CONNECTED, false)); + } else if (action.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) { + handleSupplicantStateChanged( + (SupplicantState) intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE), + intent.hasExtra(WifiManager.EXTRA_SUPPLICANT_ERROR), + intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR, 0)); + } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { + handleWifiStateChanged(intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, + WifiManager.WIFI_STATE_UNKNOWN)); + } else if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) { + handleSignalChanged(intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, 0)); + } else if (action.equals(WifiManager.NETWORK_IDS_CHANGED_ACTION)) { + handleNetworkIdsChanged(); + } + } + }; + + /** + * If using this class, make sure to call the callbacks of this class, such + * as {@link #onCreate()}, {@link #onCreatedCallback()}, + * {@link #onPause()}, {@link #onResume()}. + * + * @param context The context. + * @param callback The interface that will be invoked when events from this + * class are generated. + */ + public WifiLayer(Context context, Callback callback) { + mContext = context; + mCallback = callback; + } + + //============================ + // Lifecycle + //============================ + + /** + * The client MUST call this. + * <p> + * This shouldn't have any dependency on the callback. + */ + public void onCreate() { + mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); + + mIntentFilter = new IntentFilter(); + mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); + mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); + mIntentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION); + mIntentFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION); + mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); + mIntentFilter.addAction(WifiManager.RSSI_CHANGED_ACTION); + mIntentFilter.addAction(WifiManager.NETWORK_IDS_CHANGED_ACTION); + + WIFI_NUM_OPEN_NETWORKS_KEPT = Settings.System.getInt(mContext.getContentResolver(), + Settings.System.WIFI_NUM_OPEN_NETWORKS_KEPT, 10); + } + + /** + * The client MUST call this. + * <p> + * Callback is ready, this can do whatever it wants with it. + */ + public void onCreatedCallback() { + if (isWifiEnabled()) { + refreshAll(false); + } + } + + /** + * The client MUST call this. + * + * @see android.app.Activity#onResume + */ + public void onResume() { + mContext.registerReceiver(mReceiver, mIntentFilter); + + if (isWifiEnabled()) { + // Kick start the continual scan + queueContinuousScan(); + } + } + + /** + * The client MUST call this. + * + * @see android.app.Activity#onPause + */ + public void onPause() { + mContext.unregisterReceiver(mReceiver); + + attemptReenableAllAps(); + + removeFutureScans(); + } + + //============================ + // "Public" API + //============================ + + /** + * Returns an AccessPointState instance (that we track locally in WifiLayer) + * for the given state. First, we check if we track the given instance. If + * not, we find an equal AccessPointState instance that we track. + * + * @param state An AccessPointState instance that does not necessarily have + * to be one that this WifiLayer class tracks. For example, it + * could be the result of unparceling. + * @return An AccessPointState instance that this WifiLayer class tracks. + */ + public AccessPointState getWifiLayerApInstance(AccessPointState state) { + synchronized (this) { + + if (hasApInstanceLocked(state)) { + return state; + } + + return findApLocked(state.networkId, state.bssid, state.ssid, state.security); + } + } + + /** + * Connects to the network, and creates the Wi-Fi API config if necessary. + * + * @param state The state of the network to connect to. This MUST be an + * instance that was given to you by this class. If you + * constructed the instance yourself (for example, after + * unparceling it), you should use + * {@link #getWifiLayerApInstance(AccessPointState)}. + * @return Whether the operation was successful. + */ + public boolean connectToNetwork(AccessPointState state) { + if (LOGV) { + Log.v(TAG, "Connecting to " + state); + } + + // Need WifiConfiguration for the AP + WifiConfiguration config = findConfiguredNetwork(state); + + if (LOGV) { + Log.v(TAG, " Found configured network " + config); + } + + if (config == null) { + /* + * Connecting for the first time, need to create it. We will enable + * and save it below (when we set priority). + */ + config = addConfiguration(state, 0); + + if (config == null) { + Log.e(TAG, "Config is still null, even after attempting to add it."); + error(R.string.error_connecting); + return false; + } + + /* + * We could reload the configured networks, but instead just + * shortcut and add this state to our list in memory. + */ + ensureTrackingState(state); + } else { + // Make sure the configuration has the latest from the state + state.updateWifiConfiguration(config); + } + + // Enable this network before we save to storage + if (!managerEnableNetwork(state, false)) { + Log.e(TAG, "Could not enable network ID " + state.networkId); + error(R.string.error_connecting); + return false; + } + + /* + * Give it highest priority, this could cause a network ID change, so do + * it after any modifications to the network we're connecting to + */ + setHighestPriorityStateAndSave(state, config); + + /* + * We force supplicant to connect to this network by disabling the + * others. We do this AFTER we save above so this disabled flag isn't + * persisted. + */ + mReenableApsOnNetworkStateChange = true; + if (!managerEnableNetwork(state, true)) { + Log.e(TAG, "Could not enable network ID " + state.networkId); + error(R.string.error_connecting); + return false; + } + + if (LOGV) { + Log.v(TAG, " Enabled network " + state.networkId); + } + + if (mCurrentSupplicantState == SupplicantState.DISCONNECTED || + mCurrentSupplicantState == SupplicantState.SCANNING) { + mWifiManager.reconnect(); + } + + // Check for too many configured open networks + if (!state.hasSecurity()) { + checkForExcessOpenNetworks(); + } + + return true; + } + + /** + * Saves a network, and creates the Wi-Fi API config if necessary. + * + * @param state The state of the network to save. If you constructed the + * instance yourself (for example, after unparceling it), you + * should use {@link #getWifiLayerApInstance(AccessPointState)}. + * @return Whether the operation was successful. + */ + public boolean saveNetwork(AccessPointState state) { + WifiConfiguration config = findConfiguredNetwork(state); + + if (config == null) { + // if the user is adding a new network, assume that it is hidden + state.setHiddenSsid(true); + + config = addConfiguration(state, ADD_CONFIGURATION_ENABLE); + + if (config == null) { + Log.e(TAG, "Could not save configuration, call to addConfiguration failed."); + error(R.string.error_saving); + return false; + } + + } else { + state.updateWifiConfiguration(config); + if (mWifiManager.updateNetwork(config) == -1) { + Log.e(TAG, "Could not update configuration, call to WifiManager failed."); + error(R.string.error_saving); + return false; + } + } + + // Successfully added network, go ahead and persist + if (!managerSaveConfiguration()) { + Log.e(TAG, "Could not save configuration, call to WifiManager failed."); + error(R.string.error_saving); + return false; + } + + /* + * We could reload the configured networks, but instead just shortcut + * and add this state to our list in memory + */ + ensureTrackingState(state); + + return true; + } + + /** + * Forgets a network. + * + * @param state The state of the network to forget. If you constructed the + * instance yourself (for example, after unparceling it), you + * should use {@link #getWifiLayerApInstance(AccessPointState)}. + * @return Whether the operation was succesful. + */ + public boolean forgetNetwork(AccessPointState state) { + if (!state.configured) { + Log.w(TAG, "Inconsistent state: Forgetting a network that is not configured."); + return true; + } + + int oldNetworkId = state.networkId; + state.forget(); + + if (!state.seen) { + // If it is not seen, it should be removed from the UI + removeApFromUi(state); + } + + synchronized (this) { + mApOtherList.remove(state); + // It should not be removed from the scan list, since if it was + // there that means it's still seen + } + + if (!mWifiManager.removeNetwork(oldNetworkId)) { + Log.e(TAG, "Removing network " + state.ssid + " (network ID " + oldNetworkId + + ") failed."); + return false; + } + + if (!managerSaveConfiguration()) { + error(R.string.error_saving); + return false; + } + + return true; + } + + /** + * This ensures this class is tracking the given state. This means it is in + * our list of access points, either in the scanned list or in the + * remembered list. + * + * @param state The state that will be checked for tracking, and if not + * tracking will be added to the remembered list in memory. + */ + private void ensureTrackingState(AccessPointState state) { + synchronized (this) { + if (hasApInstanceLocked(state)) { + return; + } + + mApOtherList.add(state); + } + } + + /** + * Attempts to scan networks. This has a retry mechanism. + */ + public void attemptScan() { + + // Remove any future scans since we're scanning right now + removeFutureScans(); + + if (!mWifiManager.isWifiEnabled()) return; + + if (!mWifiManager.startScan()) { + postAttemptScan(); + } else { + mScanRetryCount = 0; + } + } + + private void queueContinuousScan() { + mHandler.removeMessages(MESSAGE_ATTEMPT_SCAN); + + if (!mIsObtainingAddress) { + // Don't do continuous scan while in obtaining IP state + mHandler.sendEmptyMessageDelayed(MESSAGE_ATTEMPT_SCAN, CONTINUOUS_SCAN_DELAY_MS); + } + } + + private void removeFutureScans() { + mHandler.removeMessages(MESSAGE_ATTEMPT_SCAN); + } + + public boolean isWifiEnabled() { + return mWifiManager.isWifiEnabled(); + } + + public void error(int messageResId) { + Log.e(TAG, mContext.getResources().getString(messageResId)); + + if (mCallback != null) { + mCallback.onError(messageResId); + } + } + + //============================ + // Wifi logic + //============================ + + private void refreshAll(boolean attemptScan) { + loadConfiguredAccessPoints(); + refreshStatus(); + + if (attemptScan) { + attemptScan(); + } + } + + private void postAttemptScan() { + onScanningStarted(); + + if (++mScanRetryCount < SCAN_MAX_RETRY) { + // Just in case, remove previous ones first + removeFutureScans(); + mHandler.sendEmptyMessageDelayed(MESSAGE_ATTEMPT_SCAN, SCAN_RETRY_DELAY_MS); + } else { + // Show an error once we run out of attempts + error(R.string.error_scanning); + onScanningEnded(); + } + } + + private void onScanningStarted() { + if (mCallback != null) { + mCallback.onScanningStatusChanged(true); + } + } + + private void onScanningEnded() { + queueContinuousScan(); + + if (mCallback != null) { + mCallback.onScanningStatusChanged(false); + } + } + + private void clearApLists() { + List<AccessPointState> accessPoints = new ArrayList<AccessPointState>(); + + synchronized(this) { + // Clear the logic's list of access points + accessPoints.addAll(mApScanList); + accessPoints.addAll(mApOtherList); + mApScanList.clear(); + mApOtherList.clear(); + } + + for (int i = accessPoints.size() - 1; i >= 0; i--) { + removeApFromUi(accessPoints.get(i)); + } + } + + private boolean managerSaveConfiguration() { + boolean retValue = mWifiManager.saveConfiguration(); + + /* + * We need to assume the network IDs have changed, so handle this. Note: + * we also have a receiver on the broadcast intent in case another wifi + * framework client caused the change. In this case, we will handle the + * possible network ID change twice (but it's not too costly). + */ + handleNetworkIdsChanged(); + + return retValue; + } + + private boolean managerEnableNetwork(AccessPointState state, boolean disableOthers) { + if (!mWifiManager.enableNetwork(state.networkId, disableOthers)) { + return false; + } + + // Enabling was successful, make sure the state is not disabled + state.setDisabled(false); + + return true; + } + + private static final int ADD_CONFIGURATION_ENABLE = 1; + private static final int ADD_CONFIGURATION_SAVE = 2; + private WifiConfiguration addConfiguration(AccessPointState state, int flags) { + // Create and add + WifiConfiguration config = new WifiConfiguration(); + + state.updateWifiConfiguration(config); + + final int networkId = mWifiManager.addNetwork(config); + if (networkId == -1) { + return null; + } + + state.setNetworkId(networkId); + state.setConfigured(true); + + // If we should, then enable it, since it comes disabled by default + if ((flags & ADD_CONFIGURATION_ENABLE) != 0 + && !managerEnableNetwork(state, false)) { + return null; + } + + // If we should, then save it + if ((flags & ADD_CONFIGURATION_SAVE) != 0 && !managerSaveConfiguration()) { + return null; + } + + if (mCallback != null) { + mCallback.onAccessPointSetChanged(state, true); + } + + return config; + } + + private WifiConfiguration findConfiguredNetwork(AccessPointState state) { + final List<WifiConfiguration> wifiConfigs = getConfiguredNetworks(); + + for (int i = wifiConfigs.size() - 1; i >= 0; i--) { + final WifiConfiguration wifiConfig = wifiConfigs.get(i); + if (state.matchesWifiConfiguration(wifiConfig) >= AccessPointState.MATCH_WEAK) { + return wifiConfig; + } + } + + return null; + } + + private List<WifiConfiguration> getConfiguredNetworks() { + final List<WifiConfiguration> wifiConfigs = mWifiManager.getConfiguredNetworks(); + return wifiConfigs; + } + + /** + * Must call while holding the lock for the list, which is usually the + * WifiLayer instance. + */ + private static AccessPointState findApLocked(List<AccessPointState> list, int networkId, + String bssid, String ssid, String security) { + AccessPointState ap; + for (int i = list.size() - 1; i >= 0; i--) { + ap = list.get(i); + if (ap.matches(networkId, bssid, ssid, security) >= AccessPointState.MATCH_WEAK) { + return ap; + } + } + + return null; + } + + /** + * Must call while holding the lock for the lists, which is usually this + * WifiLayer instance. + */ + private AccessPointState findApLocked(int networkId, String bssid, String ssid, + String security) { + AccessPointState ap = findApLocked(mApScanList, networkId, bssid, ssid, security); + if (ap == null) { + ap = findApLocked(mApOtherList, networkId, bssid, ssid, security); + } + return ap; + } + + /** + * Returns whether we have the exact instance of the access point state + * given. This is useful in cases where an AccessPointState has been + * parceled by the client and the client is attempting to use it to + * connect/forget/save. + * <p> + * Must call while holding the lock for the lists, which is usually this + * WifiLayer instance. + */ + private boolean hasApInstanceLocked(AccessPointState state) { + + for (int i = mApScanList.size() - 1; i >= 0; i--) { + if (mApScanList.get(i) == state) { + return true; + } + } + + for (int i = mApOtherList.size() - 1; i >= 0; i--) { + if (mApOtherList.get(i) == state) { + return true; + } + } + + return false; + } + + private void loadConfiguredAccessPoints() { + final List<WifiConfiguration> configs = getConfiguredNetworks(); + + for (int i = configs.size() - 1; i >= 0; i--) { + final WifiConfiguration config = configs.get(i); + + AccessPointState ap; + synchronized(this) { + ap = findApLocked(config.networkId, config.BSSID, config.SSID, + AccessPointState.getWifiConfigurationSecurity(config)); + + if (ap != null) { + // We already know about this one + continue; + } + + ap = new AccessPointState(mContext); + ap.updateFromWifiConfiguration(config); + if (LOGV) Log.v(TAG, "Created " + ap + " in loadConfiguredAccessPoints"); + mApOtherList.add(ap); + } + + // Make sure our next highest priority is greater than this + checkNextHighestPriority(ap.priority); + + if (mCallback != null) { + mCallback.onAccessPointSetChanged(ap, true); + } + } + } + + private AccessPointState getCurrentAp() { + final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); + + String ssid = wifiInfo.getSSID(); + if (ssid != null) { + /* + * We pass null for security since we have a network ID (i.e., it's + * not a wildcard), and rely on it matching. + */ + return findApLocked(wifiInfo.getNetworkId(), wifiInfo.getBSSID(), ssid, null); + } else { + return null; + } + } + + private void setPrimaryAp(AccessPointState ap) { + synchronized (this) { + // Unset other + if (mCurrentPrimaryAp != null) { + mCurrentPrimaryAp.setPrimary(false); + } + + mCurrentPrimaryAp = ap; + } + + if (ap != null) { + ap.setPrimary(true); + } + } + + private void attemptReenableAllAps() { + if (mReenableApsOnNetworkStateChange) { + mReenableApsOnNetworkStateChange = false; + enableAllAps(); + } + } + + private void enableAllAps() { + synchronized(this) { + if (LOGV) { + Log.v(TAG, " Enabling all APs"); + } + + enableApsLocked(mApOtherList); + enableApsLocked(mApScanList); + } + } + + private void enableApsLocked(List<AccessPointState> apList) { + for (int i = apList.size() - 1; i >= 0; i--) { + AccessPointState state = apList.get(i); + int networkId = state.networkId; + if (networkId != AccessPointState.NETWORK_ID_NOT_SET && + networkId != AccessPointState.NETWORK_ID_ANY) { + managerEnableNetwork(state, false); + } + } + } + + private void removeApFromUi(AccessPointState ap) { + if (mCallback != null) { + mCallback.onAccessPointSetChanged(ap, false); + } + } + + /** + * Sets the access point state to the highest priority. + * <p> + * If you have a list of configured networks from WifiManager, you probably + * shouldn't call this until you're done traversing the list. + * + * @param state The state to set as the highest priority. + * @param reusableConfiguration An optional WifiConfiguration that will be + * given to the WifiManager as updated data for the network ID. + * This will be filled with the new priority. + * @return Whether the operation was successful. + */ + private boolean setHighestPriorityStateAndSave(AccessPointState state, + WifiConfiguration reusableConfiguration) { + + if (!isConsideredForHighestPriority(state)) { + Log.e(TAG, + "Could not set highest priority on state because state is not being considered."); + return false; + } + + if (reusableConfiguration == null) { + reusableConfiguration = new WifiConfiguration(); + } + + int oldPriority = reusableConfiguration.priority; + reusableConfiguration.priority = getNextHighestPriority(); + reusableConfiguration.networkId = state.networkId; + + if (mWifiManager.updateNetwork(reusableConfiguration) == -1) { + // Rollback priority + reusableConfiguration.priority = oldPriority; + Log.e(TAG, + "Could not set highest priority on state because updating the supplicant network failed."); + return false; + } + + if (!managerSaveConfiguration()) { + reusableConfiguration.priority = oldPriority; + Log.e(TAG, + "Could not set highest priority on state because saving config failed."); + return false; + } + + state.priority = reusableConfiguration.priority; + + if (LOGV) { + Log.v(TAG, " Set highest priority to " + + state.priority + " from " + oldPriority); + } + + return true; + } + + /** + * Makes sure the next highest priority is larger than the given priority. + */ + private void checkNextHighestPriority(int priority) { + if (priority > HIGHEST_PRIORITY_MAX_VALUE || priority < 0) { + // This is a priority that we aren't managing + return; + } + + if (mNextHighestPriority <= priority) { + mNextHighestPriority = priority + 1; + } + } + + /** + * Checks if there are too many open networks, and removes the excess ones. + */ + private void checkForExcessOpenNetworks() { + synchronized(this) { + ArrayList<AccessPointState> allAps = getApsSortedByPriorityLocked(); + + // Walk from highest to lowest priority + int openConfiguredCount = 0; + for (int i = allAps.size() - 1; i >= 0; i--) { + AccessPointState state = allAps.get(i); + if (state.configured && !state.hasSecurity()) { + openConfiguredCount++; + if (openConfiguredCount > WIFI_NUM_OPEN_NETWORKS_KEPT) { + // Remove this network + forgetNetwork(state); + } + } + } + } + } + + private boolean isConsideredForHighestPriority(AccessPointState state) { + return state.configured && state.networkId != AccessPointState.NETWORK_ID_ANY && + state.networkId != AccessPointState.NETWORK_ID_NOT_SET; + } + + /** + * Gets the next highest priority. If this value is larger than the max, + * shift all the priorities so the lowest starts at 0. + * <p> + * Only + * {@link #setHighestPriorityStateAndSave(AccessPointState, WifiConfiguration)} + * should call this. + * + * @return The next highest priority to use. + */ + private int getNextHighestPriority() { + if (mNextHighestPriority > HIGHEST_PRIORITY_MAX_VALUE) { + shiftPriorities(); + } + + return mNextHighestPriority++; + } + + /** + * Shift all the priorities so the lowest starts at 0. + * + * @return Whether the operation was successful. + */ + private boolean shiftPriorities() { + synchronized(this) { + + ArrayList<AccessPointState> allAps = getApsSortedByPriorityLocked(); + + // Re-usable WifiConfiguration for setting priority + WifiConfiguration updatePriorityConfig = new WifiConfiguration(); + + // Set new priorities + mNextHighestPriority = 0; + int size = allAps.size(); + for (int i = 0; i < size; i++) { + AccessPointState state = allAps.get(i); + + if (!isConsideredForHighestPriority(state)) { + continue; + } + + if (!setHighestPriorityStateAndSave(state, updatePriorityConfig)) { + Log.e(TAG, + "Could not shift priorities because setting the new priority failed."); + return false; + } + } + + return true; + } + } + + private ArrayList<AccessPointState> getApsSortedByPriorityLocked() { + // Get all of the access points we have + ArrayList<AccessPointState> allAps = new ArrayList<AccessPointState>(mApScanList.size() + + mApOtherList.size()); + allAps.addAll(mApScanList); + allAps.addAll(mApOtherList); + + // Sort them based on priority + Collections.sort(allAps, new Comparator<AccessPointState>() { + public int compare(AccessPointState object1, AccessPointState object2) { + return object1.priority - object2.priority; + } + }); + + return allAps; + } + + //============================ + // Status related + //============================ + + private void refreshStatus() { + refreshStatus(null, null); + } + + private void refreshStatus(AccessPointState ap, NetworkInfo.DetailedState detailedState) { + final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); + if (detailedState == null) { + detailedState = WifiInfo.getDetailedStateOf(wifiInfo.getSupplicantState()); + } + + if (ap == null && WifiStatus.isLiveConnection(detailedState)) { + /* + * We pass null for security since we have a network ID (i.e., it's + * not a wildcard), and rely on it matching. + */ + ap = findApLocked(wifiInfo.getNetworkId(), wifiInfo.getBSSID(), wifiInfo + .getSSID(), null); + } + + if (ap != null) { + ap.blockRefresh(); + + // Let the AP get the latest info from the WifiInfo + ap.updateFromWifiInfo(wifiInfo, detailedState); + + // The detailed state from the Intent has more states than the WifiInfo's detailed + // state can have (for example, DHCP completion). Set the status using + // the Intent's detailed state. + ap.setStatus(detailedState); + ap.unblockRefresh(); + } + } + + //============================ + // Wifi callbacks + //============================ + + private void handleNetworkStateChanged(NetworkInfo info, String bssid) { + final AccessPointState ap = getCurrentAp(); + NetworkInfo.DetailedState detailedState = info.getDetailedState(); + + if (LOGV) { + Log.v(TAG, "State change received " + info.toString() + ", or " + + detailedState + " on " + bssid + " matched to " + ap); + } + + handleDisablingScanWhileObtainingAddress(detailedState); + + // This will update the AP with its new info + refreshStatus(ap, detailedState); + + boolean isDisconnected = info.getState().equals(State.DISCONNECTED); + if (ap != null && info.isConnectedOrConnecting()) { + setPrimaryAp(ap); + + if (LOGV) { + Log.v(TAG, " Updated " + ap + " to be primary"); + } + + } else if (isDisconnected) { + + /* + * When we drop off a network (for example, the router is powered + * down when we were connected), we received a DISCONNECT event + * without a BSSID. We should not have a primary AP anymore. + */ + setPrimaryAp(null); + + if (LOGV) { + Log.v(TAG, " Cleared primary"); + } + + } else if (detailedState.equals(DetailedState.FAILED)) { + + /* + * Doh, failed for whatever reason. Unset the primary AP, but set + * failed status on the AP that failed. + */ + setPrimaryAp(null); + ap.setStatus(DetailedState.FAILED); + + // Bring up error dialog + error(R.string.wifi_generic_connection_error); + + } else if (LOGV) { + Log.v(TAG, " Did not update any AP to primary, could have updated " + + ap + " but we aren't connected or connecting"); + } + + if ((ap != null) && (info.isConnected() + || (detailedState == DetailedState.OBTAINING_IPADDR))) { + /* + * Sometimes the scan results do not contain the AP even though it's + * clearly connected. This may be because we do passive background + * scanning that isn't as 'strong' as active scanning, so even + * though a network is nearby, it won't be seen by the passive + * scanning. If we are connected (or obtaining IP) then we know it + * is seen. + */ + ap.setSeen(true); + } + + attemptReenableAllAps(); + } + + private void handleDisablingScanWhileObtainingAddress(DetailedState detailedState) { + + if (detailedState == DetailedState.OBTAINING_IPADDR) { + mIsObtainingAddress = true; + + // We will not scan while obtaining an IP address + removeFutureScans(); + + } else { + mIsObtainingAddress = false; + + // Start continuous scan + queueContinuousScan(); + } + } + + private void handleScanResultsAvailable() { + synchronized(this) { + // In the end, we'll moved the ones no longer seen into the mApOtherList + List<AccessPointState> oldScanList = mApScanList; + List<AccessPointState> newScanList = + new ArrayList<AccessPointState>(oldScanList.size()); + + List<ScanResult> list = mWifiManager.getScanResults(); + if (list != null) { + for (int i = list.size() - 1; i >= 0; i--) { + final ScanResult scanResult = list.get(i); + + if (LOGV) { +// Log.v(TAG, " " + scanResult); + } + + if (scanResult == null) { + continue; + } + + /* + * Ignore adhoc, enterprise-secured, or hidden networks. + * Hidden networks show up with empty SSID. + */ + if (AccessPointState.isAdhoc(scanResult) + || AccessPointState.isEnterprise(scanResult) + || TextUtils.isEmpty(scanResult.SSID)) { + continue; + } + + final String ssid = AccessPointState.convertToQuotedString(scanResult.SSID); + String security = AccessPointState.getScanResultSecurity(scanResult); + + // See if this AP is part of a group of APs (e.g., any large + // wifi network has many APs, we'll only show one) that we've + // seen in this scan + AccessPointState ap = findApLocked(newScanList, AccessPointState.NETWORK_ID_ANY, + AccessPointState.BSSID_ANY, ssid, security); + + // Yup, we've seen this network. + if (ap != null) { + // Use the better signal + if (WifiManager.compareSignalLevel(scanResult.level, ap.signal) > 0) { + ap.setSignal(scanResult.level); + } + + if (LOGV) { +// Log.v(TAG, " Already seen, continuing.."); + } + + continue; + } + + // Find the AP in either our old scan list, or our non-seen + // configured networks list + ap = findApLocked(AccessPointState.NETWORK_ID_ANY, AccessPointState.BSSID_ANY, + ssid, security); + + if (ap != null) { + // Remove the AP from both (no harm if one doesn't contain it) + oldScanList.remove(ap); + mApOtherList.remove(ap); + } else { + ap = new AccessPointState(mContext); +// if (LOGV) Log.v(TAG, "Created " + ap); + } + + // Give it the latest state + ap.updateFromScanResult(scanResult); + + if (mCallback != null) { + mCallback.onAccessPointSetChanged(ap, true); + } + + newScanList.add(ap); + } + } + + // oldScanList contains the ones no longer seen + List<AccessPointState> otherList = mApOtherList; + for (int i = oldScanList.size() - 1; i >= 0; i--) { + final AccessPointState ap = oldScanList.get(i); + + if (ap.configured) { + + // Keep it around, since it is configured + ap.setSeen(false); + otherList.add(ap); + + } else { + + // Remove it since it is not configured and not seen + removeApFromUi(ap); + } + } + + mApScanList = newScanList; + } + + onScanningEnded(); + } + + private void handleSupplicantConnectionChanged(boolean connected) { + if (mCallback != null) { + mCallback.onAccessPointsStateChanged(connected); + } + + if (connected) { + refreshAll(true); + } + } + + private void handleWifiStateChanged(int wifiState) { + + if (wifiState == WIFI_STATE_ENABLED) { + loadConfiguredAccessPoints(); + attemptScan(); + + } else if (wifiState == WIFI_STATE_DISABLED) { + removeFutureScans(); + if (LOGV) Log.v(TAG, "Clearing AP lists because wifi is disabled"); + clearApLists(); + } + + if (mCallback != null) { + mCallback.onAccessPointsStateChanged(wifiState == WIFI_STATE_ENABLED); + } + } + + private void handleSignalChanged(int rssi) { + + if (mCurrentPrimaryAp != null) { + mCurrentPrimaryAp.setSignal(rssi); + } + } + + private void handleSupplicantStateChanged(SupplicantState state, boolean hasError, int error) { + mCurrentSupplicantState = state; + + if (SupplicantState.FOUR_WAY_HANDSHAKE.equals(state)) { + mLastAuthenticatingAp = getCurrentAp(); + } + + if (hasError) { + handleSupplicantStateError(error); + } + } + + private void handleSupplicantStateError(int supplicantError) { + if (supplicantError == WifiManager.ERROR_AUTHENTICATING) { + if (mCallback != null) { + if (mLastAuthenticatingAp != null) { + mCallback.onRetryPassword(mLastAuthenticatingAp); + } + } + } + } + + private void handleNetworkIdsChanged() { + synchronized (this) { + final List<WifiConfiguration> configs = getConfiguredNetworks(); + + for (int i = configs.size() - 1; i >= 0; i--) { + final WifiConfiguration config = configs.get(i); + + AccessPointState ap; + // Since network IDs have changed, we can't use it to find our previous AP state + ap = findApLocked(AccessPointState.NETWORK_ID_ANY, config.BSSID, config.SSID, + AccessPointState.getWifiConfigurationSecurity(config)); + + if (ap == null) { + continue; + } + + ap.setNetworkId(config.networkId); + } + } + } + + private class MyHandler extends Handler { + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MESSAGE_ATTEMPT_SCAN: + attemptScan(); + break; + } + } + } + +} diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java new file mode 100644 index 0000000..ceb995b --- /dev/null +++ b/src/com/android/settings/wifi/WifiSettings.java @@ -0,0 +1,438 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.ProgressCategory; +import com.android.settings.R; + +import android.app.Dialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.preference.Preference; +import android.preference.PreferenceActivity; +import android.preference.PreferenceScreen; +import android.preference.CheckBoxPreference; +import android.provider.Settings; +import android.util.Log; +import android.view.ContextMenu; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ContextMenu.ContextMenuInfo; +import android.widget.AdapterView; +import android.widget.Toast; +import android.widget.AdapterView.AdapterContextMenuInfo; + +import java.util.Set; +import java.util.WeakHashMap; + +/** + * Settings screen for WiFi. This will be launched from the main system settings. + */ +public class WifiSettings extends PreferenceActivity implements WifiLayer.Callback, + DialogInterface.OnDismissListener { + + private static final String TAG = "WifiSettings"; + + //============================ + // Preference/activity member variables + //============================ + + private static final String INSTANCE_KEY_DIALOG_BUNDLE = + "com.android.settings.wifi.WifiSettings:dialogBundle"; + /* + * We don't use Activity's dialog management because AlertDialog isn't fully + * able to change many of its features after it's been created, and the + * dialog management only creates once. + */ + private Dialog mDialog; + + private static final String KEY_ADD_OTHER_NETWORK = "add_other_network"; + + private static final int CONTEXT_MENU_ID_CONNECT = Menu.FIRST; + private static final int CONTEXT_MENU_ID_FORGET = Menu.FIRST + 1; + private static final int CONTEXT_MENU_ID_CHANGE_PASSWORD = Menu.FIRST + 2; + + private static final int MENU_ID_SCAN = Menu.FIRST; + private static final int MENU_ID_ADVANCED = Menu.FIRST + 1; + + private static final String KEY_WIFI_ENABLED = "wifi_enabled"; + private static final String KEY_OPEN_NETWORK_NOTIFICATIONS_ENABLED = + "open_network_notifications_enabled"; + private static final String KEY_ACCESS_POINTS = "access_points"; + + private ProgressCategory mApCategory; + private CheckBoxPreference mWifiEnabled; + private WifiEnabler mWifiEnabler; + private CheckBoxPreference mOpenNetworkNotificationsEnabled; + private Preference mAddOtherNetwork; + + private WeakHashMap<AccessPointState, AccessPointPreference> mAps; + + //============================ + // Wifi member variables + //============================ + + private WifiLayer mWifiLayer; + + //============================ + // Activity lifecycle + //============================ + + public WifiSettings() { + mAps = new WeakHashMap<AccessPointState, AccessPointPreference>(); + mWifiLayer = new WifiLayer(this, this); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + onCreatePreferences(); + mWifiLayer.onCreate(); + + onCreatedWifi(); + mWifiLayer.onCreatedCallback(); + } + + /** + * Shouldn't have any dependency on the wifi layer. + */ + private void onCreatePreferences() { + addPreferencesFromResource(R.xml.wifi_settings); + + final PreferenceScreen preferenceScreen = getPreferenceScreen(); + + mApCategory = (ProgressCategory) preferenceScreen.findPreference(KEY_ACCESS_POINTS); + // We don't want the ordering to be the order preferences are added, + // instead we want*: + // 1) preferred, visible APs + // 2) visible APs + // 3) preferred, APs out of range + // * this ordering logic is in AccessPointPreference's compareTo + mApCategory.setOrderingAsAdded(false); + + mWifiEnabled = (CheckBoxPreference) preferenceScreen.findPreference(KEY_WIFI_ENABLED); + mWifiEnabler = new WifiEnabler(this, (WifiManager) getSystemService(WIFI_SERVICE), + mWifiEnabled); + + mOpenNetworkNotificationsEnabled = (CheckBoxPreference) preferenceScreen + .findPreference(KEY_OPEN_NETWORK_NOTIFICATIONS_ENABLED); + mOpenNetworkNotificationsEnabled.setChecked(Settings.System.getInt(getContentResolver(), + Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0) == 1); + + mAddOtherNetwork = preferenceScreen.findPreference(KEY_ADD_OTHER_NETWORK); + + registerForContextMenu(getListView()); + } + + private void onCreatedWifi() { + } + + @Override + protected void onResume() { + super.onResume(); + mWifiLayer.onResume(); + mWifiEnabler.resume(); + } + + @Override + protected void onPause() { + super.onPause(); + mWifiLayer.onPause(); + mWifiEnabler.pause(); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + if (mDialog != null) { + mDialog.dismiss(); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + super.onCreateOptionsMenu(menu); + + menu.add(0, MENU_ID_SCAN, 0, R.string.scan_wifi) + .setIcon(R.drawable.ic_menu_scan_network); + + menu.add(0, MENU_ID_ADVANCED, 0, R.string.wifi_menu_advanced) + .setIcon(R.drawable.ic_menu_manage); + + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + super.onOptionsItemSelected(item); + + switch (item.getItemId()) { + + case MENU_ID_SCAN: + mWifiLayer.attemptScan(); + return true; + + case MENU_ID_ADVANCED: + Intent intent = new Intent(this, IpSettings.class); + startActivity(intent); + return true; + + default: + return false; + } + } + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + + if (mDialog != null) { + Bundle dialogBundle = mDialog.onSaveInstanceState(); + outState.putBundle(INSTANCE_KEY_DIALOG_BUNDLE, dialogBundle); + } + } + + @Override + protected void onRestoreInstanceState(Bundle state) { + super.onRestoreInstanceState(state); + + Bundle dialogBundle = state.getBundle(INSTANCE_KEY_DIALOG_BUNDLE); + if (dialogBundle != null) { + mDialog = new AccessPointDialog(this, mWifiLayer); + mDialog.onRestoreInstanceState(dialogBundle); + showDialog(mDialog); + } + } + + /** + * {@inheritDoc} + */ + public void onDismiss(DialogInterface dialog) { + if (dialog == mDialog) { + mDialog = null; + } + } + + @Override + public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { + super.onCreateContextMenu(menu, v, menuInfo); + + AccessPointState state = getStateFromMenuInfo(menuInfo); + if (state == null) { + return; + } + + menu.setHeaderTitle(state.getHumanReadableSsid()); + + if (state.isConnectable()) { + menu.add(0, CONTEXT_MENU_ID_CONNECT, 0, R.string.wifi_context_menu_connect); + } + + if (state.isForgetable()) { + menu.add(0, CONTEXT_MENU_ID_FORGET, 1, R.string.wifi_context_menu_forget); + + if (state.hasPassword()) { + menu.add(0, CONTEXT_MENU_ID_CHANGE_PASSWORD, 2, + R.string.wifi_context_menu_change_password); + } + } + } + + @Override + public boolean onContextItemSelected(MenuItem item) { + + AccessPointState state = getStateFromMenuInfo(item.getMenuInfo()); + if (state == null) { + return false; + } + + switch (item.getItemId()) { + + case CONTEXT_MENU_ID_CONNECT: + connectToNetwork(state); + return true; + + case CONTEXT_MENU_ID_FORGET: + mWifiLayer.forgetNetwork(state); + return true; + + case CONTEXT_MENU_ID_CHANGE_PASSWORD: + showAccessPointDialog(state, AccessPointDialog.MODE_CONFIGURE); + return true; + + default: + return false; + } + } + + /** + * Decides what needs to happen to connect to a particular access point. If + * it is secured and doesn't already have a password, it will bring up a + * password box. Otherwise it will just connect. + */ + private void connectToNetwork(AccessPointState state) { + if (state.hasSecurity() && !state.hasPassword()) { + showAccessPointDialog(state, AccessPointDialog.MODE_INFO); + } else { + mWifiLayer.connectToNetwork(state); + } + } + + private AccessPointState getStateFromMenuInfo(ContextMenuInfo menuInfo) { + if ((menuInfo == null) || !(menuInfo instanceof AdapterContextMenuInfo)) { + return null; + } + + AdapterContextMenuInfo adapterMenuInfo = (AdapterContextMenuInfo) menuInfo; + Preference pref = (Preference) getPreferenceScreen().getRootAdapter().getItem( + adapterMenuInfo.position); + if (pref == null || !(pref instanceof AccessPointPreference)) { + return null; + } + + return ((AccessPointPreference) pref).getAccessPointState(); + } + + //============================ + // Preference callbacks + //============================ + + @Override + public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { + super.onPreferenceTreeClick(preferenceScreen, preference); + + if (preference == mAddOtherNetwork) { + showAddOtherNetworkDialog(); + } else if (preference == mOpenNetworkNotificationsEnabled) { + Settings.System.putInt(getContentResolver(), + Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, + mOpenNetworkNotificationsEnabled.isChecked() ? 1 : 0); + } else if (preference instanceof AccessPointPreference) { + AccessPointState state = ((AccessPointPreference) preference).getAccessPointState(); + showAccessPointDialog(state, AccessPointDialog.MODE_INFO); + } + + return false; + } + + //============================ + // Wifi-related + //============================ + + public WifiLayer getWifiLayer() { + return mWifiLayer; + } + + private void showAddOtherNetworkDialog() { + AccessPointDialog dialog = new AccessPointDialog(this, mWifiLayer); + dialog.setState(new AccessPointState(this)); + dialog.setMode(AccessPointDialog.MODE_CONFIGURE); + dialog.setTitle(R.string.wifi_add_other_network); + dialog.setAutoSecurityAllowed(false); + showDialog(dialog); + } + + public void showAccessPointDialog(AccessPointState state, int mode) { + AccessPointDialog dialog = new AccessPointDialog(this, mWifiLayer); + dialog.setMode(mode); + dialog.setState(state); + showDialog(dialog); + } + + private void showDialog(Dialog dialog) { + // Have only one dialog open at a time + if (mDialog != null) { + mDialog.dismiss(); + } + + mDialog = dialog; + dialog.setOnDismissListener(this); + if (dialog != null) { + dialog.show(); + } + } + + //============================ + // Wifi callbacks + //============================ + + public void onError(int messageResId) { + Toast.makeText(this, messageResId, Toast.LENGTH_LONG).show(); + } + + public void onScanningStatusChanged(boolean started) { + mApCategory.setProgress(started); + } + + public void onAccessPointSetChanged(AccessPointState ap, boolean added) { + + AccessPointPreference pref = mAps.get(ap); + + if (WifiLayer.LOGV) { + Log.v(TAG, "onAccessPointSetChanged with " + ap + " and " + + (added ? "added" : "removed") + ", found pref " + pref); + } + + if (added) { + + if (pref == null) { + pref = new AccessPointPreference(this, ap); + mAps.put(ap, pref); + } else { + pref.setEnabled(true); + } + + mApCategory.addPreference(pref); + + } else { + + mAps.remove(ap); + + if (pref != null) { + mApCategory.removePreference(pref); + } + + } + } + + public void onAccessPointsStateChanged(boolean enabled) { + if (enabled) { + mApCategory.setEnabled(true); + } else { + mApCategory.removeAll(); + mAps.clear(); + } + + mAddOtherNetwork.setEnabled(enabled); + } + + public void onRetryPassword(AccessPointState ap) { + + if ((mDialog != null) && mDialog.isShowing()) { + // If we're already showing a dialog, ignore this request + return; + } + + showAccessPointDialog(ap, AccessPointDialog.MODE_RETRY_PASSWORD); + } + +} diff --git a/src/com/android/settings/wifi/WifiStatus.java b/src/com/android/settings/wifi/WifiStatus.java new file mode 100644 index 0000000..d4b6431 --- /dev/null +++ b/src/com/android/settings/wifi/WifiStatus.java @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.wifi; + +import com.android.settings.R; + +import android.content.Context; +import android.net.NetworkInfo; +import android.net.wifi.WifiInfo; +import android.text.TextUtils; + +public class WifiStatus { + + // e.g., "Connecting" + public static String sScanning; + public static String sConnecting; + public static String sAuthenticating; + public static String sObtainingIp; + public static String sConnected; + public static String sDisconnecting; + public static String sDisconnected; + public static String sFailed; + + // e.g., "Connecting to %1$s" + public static String sScanningFragment; + public static String sConnectingFragment; + public static String sAuthenticatingFragment; + public static String sObtainingIpFragment; + public static String sConnectedFragment; + public static String sDisconnectingFragment; + public static String sDisconnectedFragment; + public static String sFailedFragment; + + private static void fillStrings(Context context) { + sScanning = context.getString(R.string.status_scanning); + sConnecting = context.getString(R.string.status_connecting); + sAuthenticating = context.getString(R.string.status_authenticating); + sObtainingIp = context.getString(R.string.status_obtaining_ip); + sConnected = context.getString(R.string.status_connected); + sDisconnecting = context.getString(R.string.status_disconnecting); + sDisconnected = context.getString(R.string.status_disconnected); + sFailed = context.getString(R.string.status_failed); + + sScanningFragment = context.getString(R.string.fragment_status_scanning); + sConnectingFragment = context.getString(R.string.fragment_status_connecting); + sAuthenticatingFragment = context.getString(R.string.fragment_status_authenticating); + sObtainingIpFragment = context.getString(R.string.fragment_status_obtaining_ip); + sConnectedFragment = context.getString(R.string.fragment_status_connected); + sDisconnectingFragment = context.getString(R.string.fragment_status_disconnecting); + sDisconnectedFragment = context.getString(R.string.fragment_status_disconnected); + sFailedFragment = context.getString(R.string.fragment_status_failed); + } + + public static String getStatus(Context context, String ssid, + NetworkInfo.DetailedState detailedState) { + + if (!TextUtils.isEmpty(ssid) && isLiveConnection(detailedState)) { + return getPrintableFragment(context, detailedState, ssid); + } else { + return getPrintable(context, detailedState); + } + } + + public static boolean isLiveConnection(NetworkInfo.DetailedState detailedState) { + return detailedState != NetworkInfo.DetailedState.DISCONNECTED + && detailedState != NetworkInfo.DetailedState.FAILED + && detailedState != NetworkInfo.DetailedState.IDLE + && detailedState != NetworkInfo.DetailedState.SCANNING; + } + + public static String getPrintable(Context context, + NetworkInfo.DetailedState detailedState) { + + if (sScanning == null) { + fillStrings(context); + } + + switch (detailedState) { + case AUTHENTICATING: + return sAuthenticating; + case CONNECTED: + return sConnected; + case CONNECTING: + return sConnecting; + case DISCONNECTED: + return sDisconnected; + case DISCONNECTING: + return sDisconnecting; + case FAILED: + return sFailed; + case OBTAINING_IPADDR: + return sObtainingIp; + case SCANNING: + return sScanning; + default: + return null; + } + } + + public static String getPrintableFragment(Context context, + NetworkInfo.DetailedState detailedState, String apName) { + + if (sScanningFragment == null) { + fillStrings(context); + } + + String fragment = null; + switch (detailedState) { + case AUTHENTICATING: + fragment = sAuthenticatingFragment; + break; + case CONNECTED: + fragment = sConnectedFragment; + break; + case CONNECTING: + fragment = sConnectingFragment; + break; + case DISCONNECTED: + fragment = sDisconnectedFragment; + break; + case DISCONNECTING: + fragment = sDisconnectingFragment; + break; + case FAILED: + fragment = sFailedFragment; + break; + case OBTAINING_IPADDR: + fragment = sObtainingIpFragment; + break; + case SCANNING: + fragment = sScanningFragment; + break; + } + + return String.format(fragment, apName); + } + +} diff --git a/tests/Android.mk b/tests/Android.mk new file mode 100644 index 0000000..f54aeee --- /dev/null +++ b/tests/Android.mk @@ -0,0 +1,17 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +# We only want this apk build for tests. +LOCAL_MODULE_TAGS := tests +LOCAL_CERTIFICATE := platform + +LOCAL_JAVA_LIBRARIES := android.test.runner + +# Include all test java files. +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +LOCAL_PACKAGE_NAME := SettingsTests + +LOCAL_INSTRUMENTATION_FOR := Settings + +include $(BUILD_PACKAGE) diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml new file mode 100644 index 0000000..cf2e03c --- /dev/null +++ b/tests/AndroidManifest.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.settings.tests"> + + <application> + <uses-library android:name="android.test.runner" /> + </application> + + <instrumentation android:name="SettingsLaunchPerformance" + android:targetPackage="com.android.settings" + android:label="Settings Launch Performance"> + </instrumentation> + +</manifest> diff --git a/tests/src/com/android/settings/SettingsLaunchPerformance.java b/tests/src/com/android/settings/SettingsLaunchPerformance.java new file mode 100644 index 0000000..05154e2 --- /dev/null +++ b/tests/src/com/android/settings/SettingsLaunchPerformance.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.android.settings.tests; + +import android.app.Activity; +import android.test.LaunchPerformanceBase; +import android.os.Bundle; + +import java.util.Map; + +/** + * Instrumentation class for Settings launch performance testing. + */ +public class SettingsLaunchPerformance extends LaunchPerformanceBase { + + public static final String LOG_TAG = "SettingsLaunchPerformance"; + + public SettingsLaunchPerformance() { + super(); + } + + @Override + public void onCreate(Bundle arguments) { + super.onCreate(arguments); + + mIntent.setClassName(getTargetContext(), "com.android.settings.Settings"); + start(); + } + + /** + * Calls LaunchApp and finish. + */ + @Override + public void onStart() { + super.onStart(); + LaunchApp(); + finish(Activity.RESULT_OK, mResults); + } +} |