Merge "Reset selected InputMethodSubtype when the checkbox for the selected InputMethodSubtype was disabled"
diff --git a/proguard.flags b/proguard.flags
index 457972c..7cd46e7 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -7,3 +7,6 @@
-keep class com.android.settings.bluetooth.*
-keep class com.android.settings.applications.*
-keep class com.android.settings.inputmethod.*
+-keep class com.android.settings.MasterClear
+-keep class com.android.settings.MasterClearConfirm
+
diff --git a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
index 2e96da5..a6a8e8a 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
@@ -26,7 +26,7 @@
<TextView
android:id="@+id/wifi_setup_title"
- android:layout_width="fill_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
@@ -39,13 +39,13 @@
android:id="@+id/scanning_progress_bar"
android:layout_width="100dip"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
android:layout_above="@+id/scanning_progress_text"
+ android:layout_alignParentRight="true"
style="?android:attr/progressBarStyleHorizontal" />
<TextView
android:id="@+id/scanning_progress_text"
- android:layout_width="fill_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_above="@+id/top_divider"
@@ -85,27 +85,23 @@
android:layout_height="wrap_content" />
</FrameLayout>
-
- <RelativeLayout
+ <LinearLayout
android:id="@+id/right_buttons"
- android:layout_width="300dip"
- android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
<Button android:id="@+id/wifi_setup_connect"
android:layout_width="260dip"
android:layout_height="60dip"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_connect"
android:visibility="gone" />
<Button android:id="@+id/wifi_setup_forget"
android:layout_width="260dip"
android:layout_height="60dip"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_forget"
android:visibility="gone" />
@@ -113,8 +109,6 @@
<Button android:id="@+id/wifi_setup_add_network"
android:layout_width="260dip"
android:layout_height="60dip"
- android:layout_above="@+id/wifi_setup_refresh_list"
- android:layout_alignParentRight="true"
android:textSize="24dip"
android:text="@string/wifi_setup_add_network"
android:enabled="false" />
@@ -122,8 +116,6 @@
<Button android:id="@+id/wifi_setup_refresh_list"
android:layout_width="260dip"
android:layout_height="60dip"
- android:layout_above="@+id/wifi_setup_skip_or_next"
- android:layout_alignParentRight="true"
android:textSize="24dip"
android:text="@string/wifi_setup_refresh_list"
android:enabled="false" />
@@ -132,12 +124,10 @@
android:layout_width="260dip"
android:layout_height="60dip"
android:layout_marginTop="30dip"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
android:textSize="24dip"
android:text="@string/wifi_setup_skip"
android:enabled="false" />
- </RelativeLayout>
+ </LinearLayout>
<Button android:id="@+id/wifi_setup_detail"
android:layout_width="260dip"
diff --git a/res/layout/master_clear_primary.xml b/res/layout/master_clear.xml
similarity index 66%
rename from res/layout/master_clear_primary.xml
rename to res/layout/master_clear.xml
index dd25900..16222d3 100644
--- a/res/layout/master_clear_primary.xml
+++ b/res/layout/master_clear.xml
@@ -1,29 +1,31 @@
<?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.
-*/
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/info_layout">
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ >
<ScrollView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
+ android:layout_marginLeft="12dp"
+ android:layout_marginRight="12dp"
+ android:layout_marginTop="12dp"
android:layout_weight="1">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -42,13 +44,14 @@
<CheckBox android:id="@+id/erase_external"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="top"
+ android:layout_gravity="center_vertical"
android:paddingRight="8dp"
android:focusable="false"
android:clickable="false"
android:duplicateParentState="true" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
@@ -70,7 +73,8 @@
android:id="@+id/initiate_master_clear"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dip"
- android:layout_width="150dip"
+ android:layout_marginBottom="12dip"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/master_clear_button_text"
android:gravity="center" />
diff --git a/res/layout/master_clear_confirm.xml b/res/layout/master_clear_confirm.xml
new file mode 100644
index 0000000..0599b10
--- /dev/null
+++ b/res/layout/master_clear_confirm.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="12dp"
+ android:layout_marginRight="12dp"
+ android:layout_marginTop="12dp"
+ 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="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/master_clear_final_button_text"
+ android:gravity="center" />
+
+</LinearLayout>
diff --git a/res/layout/master_clear_final.xml b/res/layout/master_clear_final.xml
deleted file mode 100644
index 8de789a..0000000
--- a/res/layout/master_clear_final.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?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/values/strings.xml b/res/values/strings.xml
index 2d1a599..27bcf19 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13,7 +13,6 @@
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">
<!-- Strings for Dialog yes button -->
<string name="yes">"Yes"</string>
@@ -215,7 +214,7 @@
<!-- Bluetooth settings. Message when connecting to a device -->
<string name="bluetooth_connecting">Connecting\u2026</string>
<!-- Bluetooth settings. Message when the device state is unknown -->
- <string name="bluetooth_unknown"></string>
+ <string name="bluetooth_unknown" />
<!--Bluetooth settings screen, summary text under individual Bluetooth devices when not paired yet -->
<string name="bluetooth_not_connected">Pair with this device</string>
<!--Bluetooth settings screen, summary text under individual Bluetooth devices when pairing -->
@@ -240,13 +239,17 @@
<string name="bluetooth_permission_request">"Bluetooth permission request"</string>
<!-- Strings for asking to the user whether to allow an app to enable bluetooth -->
- <string name="bluetooth_ask_enablement">"An application on your phone is requesting permission to turn on Bluetooth. Do you want to do this?"</string>
+ <string name="bluetooth_ask_enablement">"An application is requesting permission to turn on Bluetooth. Do you want to do this?"</string>
<!-- Strings for asking to the user whether to allow an app to enable discovery mode -->
- <string name="bluetooth_ask_discovery">"An application on your phone is requesting permission to make your phone discoverable by other Bluetooth devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
+ <string name="bluetooth_ask_discovery" product="tablet">"An application on your tablet is requesting permission to make your tablet discoverable by other Bluetooth devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
+ <!-- Strings for asking to the user whether to allow an app to enable discovery mode -->
+ <string name="bluetooth_ask_discovery" product="default">"An application on your phone is requesting permission to make your phone discoverable by other Bluetooth devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
<!-- Strings for asking to the user whether to allow an app to enable bluetooth and discovery mode -->
- <string name="bluetooth_ask_enablement_and_discovery">"An application on your phone is requesting permission to turn on Bluetooth and to make your phone discoverable by other devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
+ <string name="bluetooth_ask_enablement_and_discovery" product="tablet">"An application on your tablet is requesting permission to turn on Bluetooth and to make your tablet discoverable by other devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
+ <!-- Strings for asking to the user whether to allow an app to enable bluetooth and discovery mode -->
+ <string name="bluetooth_ask_enablement_and_discovery" product="default">"An application on your phone is requesting permission to turn on Bluetooth and to make your phone discoverable by other devices for <xliff:g id="timeout">%1$d</xliff:g> seconds. Do you want to do this?"</string>
<!-- Strings for msg to display to user while bluetooth is turning on -->
<string name="bluetooth_turning_on">"Turning on Bluetooth\u2026"</string>
@@ -261,7 +264,7 @@
<!-- Do not translate. Used for diagnostic screens, precise translation is not necessary -->
<string name="bluetooth_device_info_connectButton_text">Turn on Bluetooth</string>
<!-- Do not translate. Used for diagnostic screens, precise translation is not necessary -->
- <string name="bluetooth_device_info_deviceInfo_text"></string>
+ <string name="bluetooth_device_info_deviceInfo_text" />
<!-- Date & time settings screen title -->
<string name="date_and_time">Date & time settings</string>
@@ -442,7 +445,7 @@
<!-- Message when the SD card is mounted as read only -->
<string name="sdcard_settings_read_only_status" product="default">SD card mounted read-only</string>
<!-- SetupWizard strings used by DateTimeSettingsSetupWizard. The button label for going to the next screen without storing the setting. [CHAR LIMIT=5] -->
- <string name="skip_label" >Skip</string>
+ <string name="skip_label">Skip</string>
<!-- SetupWizard strings used by DateTimeSettingsSetupWizard. The button label for going to the next screen. -->
<string name="next_label">Next</string>
@@ -461,7 +464,9 @@
<!-- The title of the activity to adjust display settings -->
<string name="display_label">Display</string>
<!-- The title of the activity to see phone info -->
- <string name="phone_info_label">Phone info</string>
+ <string name="phone_info_label" product="tablet">Tablet info</string>
+ <!-- The title of the activity to see phone info -->
+ <string name="phone_info_label" product="default">Phone info</string>
<!-- The title of the activity to adjust SD card settings [CHAR LIMIT=25] -->
<string name="sd_card_settings_label" product="nosdcard">USB storage</string>
<!-- The title of the activity to adjust SD card settings-->
@@ -615,7 +620,7 @@
<string name="unlock_set_unlock_password_summary">Enter a password to unlock screen</string>
<!-- Summary for preference that has been disabled by DevicePolicyAdmin -->
- <string name="unlock_set_unlock_disabled_summary">Disabled by remote phone administrator</string>
+ <string name="unlock_set_unlock_disabled_summary">Disabled by remote device administrator</string>
<!-- Title for option to turn of password/pin/pattern unlock. -->
@@ -809,7 +814,9 @@
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the A2DP profile. -->
<string name="bluetooth_profile_a2dp">Media</string>
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the headset or handsfree profile. -->
- <string name="bluetooth_profile_headset">Phone</string>
+ <string name="bluetooth_profile_headset" product="tablet">Tablet</string>
+ <!-- Bluetooth settings. The user-visible string that is used whenever referring to the headset or handsfree profile. -->
+ <string name="bluetooth_profile_headset" product="default">Phone</string>
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the OPP profile. -->
<string name="bluetooth_profile_opp">Transfer</string>
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the HID profile. -->
@@ -820,7 +827,9 @@
<!-- Bluetooth settings. The summary string when a device is connected to the A2DP profile. -->
<string name="bluetooth_summary_connected_to_a2dp">Connected to media audio</string>
<!-- Bluetooth settings. The summary string when a device is connected to the headset profile. -->
- <string name="bluetooth_summary_connected_to_headset">Connected to phone audio</string>
+ <string name="bluetooth_summary_connected_to_headset" product="tablet">Connected to tablet audio</string>
+ <!-- Bluetooth settings. The summary string when a device is connected to the headset profile. -->
+ <string name="bluetooth_summary_connected_to_headset" product="default">Connected to phone audio</string>
<!-- Bluetooth settings. The summary string when a device is connected to the A2DP and headset profiles. -->
<string name="bluetooth_summary_connected_to_a2dp_headset">Connected to phone and media audio</string>
<!-- Bluetooth settings. The summary string when a device is connected to the HID profile. -->
@@ -828,6 +837,17 @@
<!-- Bluetooth settings. The summary string when a device is connected to the PAN profile. [CHAR LIMIT=35]-->
<string name="bluetooth_summary_connected_to_pan">Tethered</string>
+ <!-- Bluetooth settings. Message for disconnecting from the A2DP profile. -->
+ <string name="bluetooth_disconnect_a2dp_profile"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected from media audio.</string>
+ <!-- Bluetooth settings. Message for disconnecting from the headset profile. -->
+ <string name="bluetooth_disconnect_headset_profile" product="tablet"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected from tablet audio.</string>
+ <!-- Bluetooth settings. Message for disconnecting from the headset profile. -->
+ <string name="bluetooth_disconnect_headset_profile" product="default"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected from phone audio.</string>
+ <!-- Bluetooth settings. Message for disconnecting from the HID profile. -->
+ <string name="bluetooth_disconnect_hid_profile"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected from input device.</string>
+ <!-- Bluetooth settings. Message for disconnecting from the PAN profile. -->
+ <string name="bluetooth_disconnect_pan_profile"><xliff:g id="device_name">%1$s</xliff:g> will be disconnected from tethering.</string>
+
<!-- Bluetooth settings. Connection options screen. The title of the screen. -->
<string name="bluetooth_device_advanced_title"><xliff:g id="device_name">%1$s</xliff:g> options</string>
<!-- Bluetooth settings. Connection options screen. Title of device actions section. [CHAR LIMIT=30] -->
@@ -1151,7 +1171,7 @@
<!-- Sound settings screen, setting option summary text when going into silent mode. Media WILL NOT be silenced in silent mode, but alarms WILL be silenced. -->
<string name="silent_mode_incl_alarm_summary">All sounds except media are silenced</string>
<!-- Sound settings screen, setting option name to pick ringtone (a list dialog comes up)-->
- <string name="ringtone_title">Phone ringtone</string>
+ <string name="ringtone_title">Incoming call ringtone</string>
<!-- Sound settings screen, setting option summary text -->
<string name="ringtone_summary">""</string>
<!-- Sound settings screen, volume title -->
@@ -1233,19 +1253,27 @@
<!-- Dock audio summary for docked to car dock -->
<string name="dock_audio_summary_car">Settings for the attached car dock</string>
<!-- Dock audio summary for undocked -->
- <string name="dock_audio_summary_none">Phone not docked</string>
+ <string name="dock_audio_summary_none" product="tablet">Tablet not docked</string>
+ <!-- Dock audio summary for undocked -->
+ <string name="dock_audio_summary_none" product="default">Phone not docked</string>
<!-- Dock audio summary for docked to unknown -->
<string name="dock_audio_summary_unknown">Settings for the attached dock</string>
<!-- Dock not found dialog title -->
<string name="dock_not_found_title">Dock not found</string>
<!-- Dock not found dialog text -->
- <string name="dock_not_found_text">The phone must be docked to configure dock audio</string>
+ <string name="dock_not_found_text" product="tablet">The tablet must be docked to configure dock audio</string>
+ <!-- Dock not found dialog text -->
+ <string name="dock_not_found_text" product="default">The phone must be docked to configure dock audio</string>
<!-- Dock settings screen, dock events SFX setting check box label -->
<string name="dock_sounds_enable_title">Dock insertion sound</string>
<!-- Dock settings screen, setting option summary text when check box is selected -->
- <string name="dock_sounds_enable_summary_on">Play sound when inserting or removing phone from dock</string>
+ <string name="dock_sounds_enable_summary_on" product="tablet">Play sound when inserting or removing tablet from dock</string>
+ <!-- Dock settings screen, setting option summary text when check box is selected -->
+ <string name="dock_sounds_enable_summary_on" product="default">Play sound when inserting or removing phone from dock</string>
<!-- Sound settings screen, setting option summary text when check box is clear -->
- <string name="dock_sounds_enable_summary_off">Don\'t play sound when inserting or removing phone from dock</string>
+ <string name="dock_sounds_enable_summary_off" product="tablet">Don\'t play sound when inserting or removing tablet from dock</string>
+ <!-- Sound settings screen, setting option summary text when check box is clear -->
+ <string name="dock_sounds_enable_summary_off" product="default">Don\'t play sound when inserting or removing phone from dock</string>
<!-- Acounts & Sync settings screen setting option name to go into the screen for data sync settings-->
<string name="sync_settings">Accounts & sync</string>
@@ -1269,9 +1297,13 @@
<!-- Sound & display settings screen, accelerometer-based rotation check box label -->
<string name="accelerometer_title">Auto-rotate screen</string>
<!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected -->
- <string name="accelerometer_summary_on">Switch orientation automatically when rotating phone</string>
+ <string name="accelerometer_summary_on" product="tablet">Switch orientation automatically when rotating tablet</string>
+ <!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected -->
+ <string name="accelerometer_summary_on" product="default">Switch orientation automatically when rotating phone</string>
<!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is clear -->
- <string name="accelerometer_summary_off">Switch orientation automatically when rotating phone</string>
+ <string name="accelerometer_summary_off" product="tablet">Switch orientation automatically when rotating tablet</string>
+ <!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is clear -->
+ <string name="accelerometer_summary_off" product="default">Switch orientation automatically when rotating phone</string>
<!-- Sound & display settings screen, setting option name to change brightness -->
<string name="brightness">Brightness</string>
<!-- Sound & display settings screen, setting option summary to change brightness -->
@@ -1292,9 +1324,13 @@
<!-- SIM card lock settings screen, setting check box label -->
<string name="sim_pin_toggle">Lock SIM card</string>
<!-- SIM card lock settings screen, setting option summary text when SIM lock check box is selected -->
- <string name="sim_lock_on">Require PIN to use phone</string>
+ <string name="sim_lock_on" product="tablet">Require PIN to use tablet</string>
+ <!-- SIM card lock settings screen, setting option summary text when SIM lock check box is selected -->
+ <string name="sim_lock_on" product="default">Require PIN to use phone</string>
<!-- SIM card lock settings screen, setting option summary text when SIM lock check box is clear -->
- <string name="sim_lock_off">Require PIN to use phone</string>
+ <string name="sim_lock_off" product="tablet">Require PIN to use tablet</string>
+ <!-- SIM card lock settings screen, setting option summary text when SIM lock check box is clear -->
+ <string name="sim_lock_off" product="default">Require PIN to use phone</string>
<!-- SIM card lock settings screen, setting option name to change the SIM PIN -->
<string name="sim_pin_change">Change SIM PIN</string>
<!-- SIM card lock settings screen, SIM PIN dialog message instruction -->
@@ -1326,7 +1362,9 @@
<string name="sim_enter_cancel">Cancel</string>
<!-- Advanced (used for diagnostics) device info activity title -->
- <string name="device_info_settings">Phone status</string>
+ <string name="device_info_settings" product="tablet">Tablet status</string>
+ <!-- Advanced (used for diagnostics) device info activity title -->
+ <string name="device_info_settings" product="default">Phone status</string>
<!-- About phone screen, list item title. Takes the user to the screen for seeing and installing system updates. -->
<string name="system_update_settings_list_item_title">System updates</string>
@@ -1438,6 +1476,8 @@
<!-- SD card & phone storage settings item title that will result in the phone formatting the SD card. [CHAR LIMIT=25] -->
<string name="sd_format" product="default">Erase SD card</string>
<!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. [CHAR LIMIT=30] -->
+ <string name="sd_format_summary" product="tablet">Erases all data on the tablet\'s internal USB storage, such as music and photos</string>
+ <!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. [CHAR LIMIT=30] -->
<string name="sd_format_summary" product="nosdcard">Erases all data on the phone\'s internal USB storage, such as music and photos</string>
<!-- SD card & phone storage settings item title that will result in the phone unmounting the SD card. -->
<string name="sd_format_summary" product="default">Erases all data on the phone\'s SD card, such as music and photos</string>
@@ -1547,21 +1587,28 @@
<!-- SD card & phone storage settings screen, setting option name under Internal phone storage heading -->
<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>
+ <string name="master_clear_summary" product="tablet">Erases all data on tablet</string>
+ <!-- SD card & phone storage settings screen, setting option summary text under Internal phone storage heading -->
+ <string name="master_clear_summary" product="default">Erases all data on phone</string>
+ <!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset [CHAR LIMIT=NONE] -->
+ <string name="master_clear_desc" product="tablet">"This will erase all data from your tablet\'s <b>internal storage</b>, including:\n\n<li>Your Google account</li>\n<li>System and application data and settings</li>\n<li>Downloaded applications</li>\n\nTo clear all data on this tablet the <b>USB storage</b> needs to be erased.\n\n"</string>
<!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset [CHAR LIMIT=NONE] -->
<string name="master_clear_desc" product="nosdcard">"This will erase all data from your phone\'s <b>internal storage</b>, including:\n\n<li>Your Google account</li>\n<li>System and application data and settings</li>\n<li>Downloaded applications</li>\n\nTo clear all data on this phone the <b>USB storage</b> needs to be erased.\n\n"</string>
<!-- SD card & phone storage settings screen, message on screen after user selects Factory data reset -->
- <string name="master_clear_desc" product="default" >"This will erase all data from your phone\'s <b>internal storage</b>, including:\n\n<li>Your Google account</li>\n<li>System and application data and settings</li>\n<li>Downloaded applications</li>\n\nTo also clear music, pictures, and other user data, the <b>SD card</b> needs to be erased.\n\n"</string>
+ <string name="master_clear_desc" product="default">"This will erase all data from your phone\'s <b>internal storage</b>, including:\n\n<li>Your Google account</li>\n<li>System and application data and settings</li>\n<li>Downloaded applications</li>\n\nTo also clear music, pictures, and other user data, the <b>SD card</b> needs to be erased.\n\n"</string>
<!-- SD card & phone storage settings screen, label for check box to erase USB storage [CHAR LIMIT=30] -->
<string name="erase_external_storage" product="nosdcard">Erase USB storage</string>
<!-- SD card & phone storage settings screen, label for check box to erase SD card [CHAR LIMIT=30] -->
<string name="erase_external_storage" product="default">Erase SD card</string>
<!-- SD card & phone storage settings screen, description for check box to erase USB storage [CHAR LIMIT=30] -->
- <string name="erase_external_storage_description" product="nosdcard">Erase all the data on the phone\'s internal USB storage, such as music or photos.</string>
+ <string name="erase_external_storage_description" product="tablet">Erase all the data on the tablet\'s internal USB storage, such as music or photos.</string>
<!-- SD card & phone storage settings screen, description for check box to erase USB storage [CHAR LIMIT=30] -->
+ <string name="erase_external_storage_description" product="nosdcard">Erase all the data on the phone\'s internal USB storage, such as music or photos.</string>
<string name="erase_external_storage_description" product="default">Erase all the data on the phone\'s SD card, such as music or photos.</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>
+ <string name="master_clear_button_text" product="tablet">Reset tablet</string>
+ <!-- SD card & phone storage settings screen, button on screen after user selects Factory data reset -->
+ <string name="master_clear_button_text" product="default">Reset phone</string>
<!-- SD card & phone storage settings screen, message on screen after user selects Reset phone button -->
<string name="master_clear_final_desc">Erase all of your personal information and any downloaded applications? It is impossible to reverse this action!</string>
<!-- SD card & phone storage settings screen, button on screen after user selects Reset phone button -->
@@ -1569,9 +1616,11 @@
<!-- Message to draw an unlock pattern before clearing the device -->
<string name="master_clear_gesture_prompt">Draw your unlock pattern</string>
<!-- Explanation of drawing unlockp attern to reset phone -->
- <string name="master_clear_gesture_explanation">You must draw your unlock pattern to confirm a phone reset.</string>
+ <string name="master_clear_gesture_explanation">You must draw your unlock pattern to confirm a factory data reset.</string>
<!-- Master clear failed message -->
<string name="master_clear_failed">No reset was performed because the System Clear service is not available.</string>
+ <!-- Master clear confirmation screen title [CHAR LIMIT=30] -->
+ <string name="master_clear_confirm_title">Confirm reset</string>
<!-- Media Format -->
<!-- SD card & phone storage settings screen, setting option name under Internal phone storage heading [CHAR LIMIT=25] -->
@@ -1622,19 +1671,29 @@
<!-- Tethering controls, the item summary for the user to go into the tethering settings -->
<!-- Tethering controls, the item summary for the user to go into the tethering settings when only USB tethering is available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_usb">Share your phone\'s mobile data connection via USB</string>
+ <string name="tether_settings_summary_usb" product="tablet">Share your tablet\'s mobile data connection via USB</string>
+ <!-- Tethering controls, the item summary for the user to go into the tethering settings when only USB tethering is available [CHAR LIMIT=100]-->
+ <string name="tether_settings_summary_usb" product="default">Share your phone\'s mobile data connection via USB</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when only Wifi tethering is available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_wifi">Share your phone\'s mobile connection as a portable Wi-Fi hotspot</string>
+ <string name="tether_settings_summary_wifi">Share your mobile data connection as a portable Wi-Fi hotspot</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when only Bluetooth tethering is available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_bluetooth">Share your phone\'s mobile connection via Bluetooth</string>
+ <string name="tether_settings_summary_bluetooth">Share your mobile data connection via Bluetooth</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Wifi tethering are available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_usb_wifi">Share your phone\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
+ <string name="tether_settings_summary_usb_wifi" product="tablet">Share your tablet\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
+ <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Wifi tethering are available [CHAR LIMIT=100]-->
+ <string name="tether_settings_summary_usb_wifi" product="default">Share your phone\'s mobile data connection via USB or as a portable Wi-Fi hotspot</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Bluetooth tethering are available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_usb_bluetooth">Share your phone\'s mobile data connection via USB or Bluetooth</string>
+ <string name="tether_settings_summary_usb_bluetooth" product="tablet">Share your tablet\'s mobile data connection via USB or Bluetooth</string>
+ <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB and Bluetooth tethering are available [CHAR LIMIT=100]-->
+ <string name="tether_settings_summary_usb_bluetooth" product="default">Share your phone\'s mobile data connection via USB or Bluetooth</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when Bluetooth and Wifi tethering are available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_wifi_bluetooth">Share your phone\'s mobile data connection via Bluetooth or as a portable Wi-Fi hotspot</string>
+ <string name="tether_settings_summary_wifi_bluetooth" product="tablet">Share your tablet\'s mobile data connection via Bluetooth or as a portable Wi-Fi hotspot</string>
+ <!-- Tethering controls, the item summary for the user to go into the tethering settings when Bluetooth and Wifi tethering are available [CHAR LIMIT=100]-->
+ <string name="tether_settings_summary_wifi_bluetooth" product="default">Share your phone\'s mobile data connection via Bluetooth or as a portable Wi-Fi hotspot</string>
<!-- Tethering controls, the item summary for the user to go into the tethering settings when USB, Wifi, and Bluetooth tethering are available [CHAR LIMIT=100]-->
- <string name="tether_settings_summary_all">Share your phone\'s mobile data connection via USB, Wi-Fi, or Bluetooth</string>
+ <string name="tether_settings_summary_all" product="tablet">Share your tablet\'s mobile data connection via USB, Wi-Fi, or Bluetooth</string>
+ <!-- Tethering controls, the item summary for the user to go into the tethering settings when USB, Wifi, and Bluetooth tethering are available [CHAR LIMIT=100]-->
+ <string name="tether_settings_summary_all" product="default">Share your phone\'s mobile data connection via USB, Wi-Fi, or Bluetooth</string>
<!-- USB Tethering options -->
<string name="usb_title">USB</string>
@@ -1706,9 +1765,11 @@
<!-- About --> <skip />
<!-- Main settings screen, setting title for the user to go into the About phone screen -->
- <string name="about_settings">About phone</string>
+ <string name="about_settings" product="tablet">About tablet</string>
+ <!-- Main settings screen, setting title for the user to go into the About phone screen -->
+ <string name="about_settings" product="default">About phone</string>
<!-- Main settings screen, setting summary for the user to go into the About phone screen-->
- <string name="about_settings_summary">View legal info, phone status, software version</string>
+ <string name="about_settings_summary">View legal info, status, software version</string>
<!-- About phone settings screen, setting option name to go to dialog that shows legal info -->
<string name="legal_information">Legal information</string>
<!-- About phone settings screen, setting option name to see a list of contributors -->
@@ -1725,7 +1786,9 @@
<!-- About phone settings screen, running the System Tutorial -->
<string name="system_tutorial_list_item_title">System tutorial</string>
<!-- About phone settings screen, summary of what System Tutorial does -->
- <string name="system_tutorial_list_item_summary">Learn how to use your phone</string>
+ <string name="system_tutorial_list_item_summary" product="tablet">Learn how to use your tablet</string>
+ <!-- About phone settings screen, summary of what System Tutorial does -->
+ <string name="system_tutorial_list_item_summary" product="default">Learn how to use your phone</string>
<!-- Title for actual Settings license activity. --> <skip />
<!-- About phone settings, Legal information setting option name and title of dialog box holding license info -->
@@ -1740,7 +1803,7 @@
<!-- About phone settings, Safety Legal information setting option name and title of dialog box holding safety legal info -->
<string name="settings_safetylegal_activity_title">Safety information</string>
<!-- About phone settings screen, Safety legal dialog message when data network is not connected -->
- <string name="settings_safetylegal_activity_unreachable">Your phone is not connected to a data service. To view this information now, go to %s from any computer connected to the Internet.</string>
+ <string name="settings_safetylegal_activity_unreachable">You do not have a data connection. To view this information now, go to %s from any computer connected to the Internet.</string>
<!-- About phone settings screen, Safety Legal dialog title until the link is fully loaded -->
<string name="settings_safetylegal_activity_loading">Loading\u2026</string>
@@ -1774,11 +1837,11 @@
<!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern". We first ask the user toe nter the current pattern, and this is the message seen -->
<string name="lockpattern_need_to_unlock">Confirm saved pattern</string>
<!-- Do not translate. -->
- <string name="lockpattern_need_to_unlock_footer"></string>
+ <string name="lockpattern_need_to_unlock_footer" />
<!-- 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>
<!-- Do not translate. -->
- <string name="lockpattern_need_to_unlock_wrong_footer"></string>
+ <string name="lockpattern_need_to_unlock_wrong_footer" />
<!-- Security & location settings screen, change unlock pattern screen instruction on top of screen. This si when they are supposed to draw a new unlock pattern (for example, if they are changing their unlock patterns)..-->
<string name="lockpattern_recording_intro_header">Draw an unlock pattern</string>
<!-- Security & location settings screen, change unlock pattern screen hint on bottom of screen. We are telling them to press the menu button to see more options or help. -->
@@ -1827,9 +1890,19 @@
<!-- ChooseLockPatternTutorial, button labels: Continue to the next page of the tutorial -->
<string name="next_button_label">Next</string>
<!-- ChooseLockPatternTutorial, tutorial screen title -->
- <string name="lock_title">Securing your phone</string>
+ <string name="lock_title" product="tablet">Securing your tablet</string>
+ <!-- ChooseLockPatternTutorial, tutorial screen title -->
+ <string name="lock_title" product="default">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.
+ <string name="lock_intro_message" product="tablet"><font size="17">Protect your tablet 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? Touch \u201CNext\u201D</b>.
+ \n<font height="3">\n</font>To leave your tablet unprotected, touch \u201CCancel\u201D.</font>
+ </string>
+ <!-- ChooseLockPatternTutorial, tutorial screen text -->
+ <string name="lock_intro_message" product="default"><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.
@@ -1861,7 +1934,12 @@
<!-- Applications settings screen, setting check box summary. This is the summary for "Unknown sources" checkbox -->
<string name="install_unknown_applications">Allow installation of non-Market applications</string>
<!-- Applications settings screen, message text of alert that appears if user selects the "Unknown sources" check box -->
- <string name="install_all_warning">Your phone and personal data are more vulnerable to attack by applications
+ <string name="install_all_warning" product="tablet">Your tablet 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 tablet or loss of data that may result from using
+ these applications.</string>
+ <!-- Applications settings screen, message text of alert that appears if user selects the "Unknown sources" check box -->
+ <string name="install_all_warning" product="default">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>
@@ -1972,7 +2050,9 @@
<!-- Manage applications, text for dialog if clear data fails-->
<string name="clear_failed_dlg_text">Failed clearing data for application</string>
<!-- Manage applications, individual application info screen, text that appears under the "Permissions" heading. This describes the permissions that the application has. -->
- <string name="security_settings_desc">This application can access the following on your phone:</string>
+ <string name="security_settings_desc" product="tablet">This application can access the following on your tablet:</string>
+ <!-- Manage applications, individual application info screen, text that appears under the "Permissions" heading. This describes the permissions that the application has. -->
+ <string name="security_settings_desc" product="default">This application can access the following on your phone:</string>
<string name="computing_size">Computing\u2026</string>
<string name="invalid_size_value">Unable to compute package size</string>
<!-- String displayed when list is empty -->
@@ -1982,7 +2062,9 @@
<!-- Manage applications, text for Move button -->
<string name="move_app">Move</string>
<!-- Manage applications, text for Move button to move app to internal storage -->
- <string name="move_app_to_internal">Move to phone</string>
+ <string name="move_app_to_internal" product="tablet">Move to tablet</string>
+ <!-- Manage applications, text for Move button to move app to internal storage -->
+ <string name="move_app_to_internal" product="default">Move to phone</string>
<!-- Manage applications, text for Move button to move app to sdcard [CHAR LIMIT=25] -->
<string name="move_app_to_sdcard" product="nosdcard">Move to USB storage</string>
<!-- Manage applications, text for Move button to move app to sdcard -->
@@ -2086,7 +2168,11 @@
<!-- Running service details, stop confirmation dialog title. Displays when user selects selects to stop a system service. -->
<string name="runningservicedetails_stop_dlg_title">Stop system service?</string>
<!-- Running service details, stop confirmation descriptive text. Displays when user selects selects to stop a system service. -->
- <string name="runningservicedetails_stop_dlg_text">Are you sure you want to stop this system service? If you do, some
+ <string name="runningservicedetails_stop_dlg_text" product="tablet">Are you sure you want to stop this system service? If you do, some
+ features of your tablet may stop working correctly until you power it off
+ and then on again.</string>
+ <!-- Running service details, stop confirmation descriptive text. Displays when user selects selects to stop a system service. -->
+ <string name="runningservicedetails_stop_dlg_text" product="default">Are you sure you want to stop this system service? If you do, some
features of your phone may stop working correctly until you power it off
and then on again.</string>
@@ -2152,7 +2238,9 @@
<!-- This is for diagnostics screen. The title of a screen with various items realted to launching screens that will giev the user info. For example, it contains "Phone information" and "Battery information" -->
<string name="testing">Testing</string>
<!-- In the Testing screen. The item title of the activity that shows a bunch of phone-related information. -->
- <string name="testing_phone_info">Phone information</string>
+ <string name="testing_phone_info" product="tablet">Tablet information</string>
+ <!-- In the Testing screen. The item title of the activity that shows a bunch of phone-related information. -->
+ <string name="testing_phone_info" product="default">Phone information</string>
<!-- In the Testing screen. The item title of the activity that shows a bunch of battery-related information. -->
<string name="testing_battery_info">Battery information</string>
<!-- Do not translate. In the Testing screen. The item title of the activity that shows a bunch of SIM-related operations. -->
@@ -2257,7 +2345,7 @@
<string name="usage_time_label">Usage time</string>
<!-- Accessibility settings -->
- <skip/>
+ <skip />
<!-- Settings title in main settings screen for accessibility settings -->
<string name="accessibility_settings">Accessibility</string>
@@ -2298,7 +2386,12 @@
<string name="accessibility_script_injection_enabled_summary">Allow applications to download accessibility scripts from Google</string>
<!-- Warning message about security implications of downloading accessibility scripts,
displayed as a dialog message when the user selects to enable script downloading. [CHAR LIMIT="NONE"] -->
- <string name="accessibility_script_injection_security_warning">Some applications can ask Google
+ <string name="accessibility_script_injection_security_warning" product="tablet">Some applications can ask Google
+ to download scripts to your tablet that make their content more accessible. Are you sure you
+ want to allow Google to install accessibility scripts on your tablet?</string>
+ <!-- Warning message about security implications of downloading accessibility scripts,
+ displayed as a dialog message when the user selects to enable script downloading. [CHAR LIMIT="NONE"] -->
+ <string name="accessibility_script_injection_security_warning" product="default">Some applications can ask Google
to download scripts to your phone that make their content more accessible. Are you sure you
want to allow Google to install accessibility scripts on your phone?</string>
<!-- Accessibility settings: Power button category -->
@@ -2309,7 +2402,7 @@
<string name="accessibility_power_button_ends_call_summary">During a call, pressing Power ends call instead of turning off screen</string>
<!-- App Fuel Gauge strings -->
- <skip/>
+ <skip />
<!-- Activity title for App Fuel Gauge summary -->
<string name="power_usage_summary_title">Battery use</string>
@@ -2334,7 +2427,7 @@
<!-- [CHAR LIMIT=25] Label for battery stats wake lock state graph -->
<string name="battery_stats_wake_lock_label">Awake</string>
<!-- [CHAR LIMIT=25] Label for battery stats phone signal strength graph -->
- <string name="battery_stats_phone_signal_label">Phone signal</string>
+ <string name="battery_stats_phone_signal_label">Mobile network signal</string>
<!-- Battery usage during last unplugged period -->
<string name="battery_stats_last_duration">@string/menu_stats_last_unplugged</string>
<!-- CPU awake time title -->
@@ -2367,7 +2460,9 @@
<!-- Label for power consumed by Calling -->
<string name="power_phone">Voice calls</string>
<!-- Label for power consumed when Idle -->
- <string name="power_idle">Phone idle</string>
+ <string name="power_idle" product="tablet">Tablet idle</string>
+ <!-- Label for power consumed when Idle -->
+ <string name="power_idle" product="default">Phone idle</string>
<!-- Label for CPU usage time -->
<string name="usage_type_cpu">CPU total</string>
@@ -2380,7 +2475,9 @@
<!-- [CHAR LIMIT=25] Label for WIFI usage time -->
<string name="usage_type_wifi_running">Wi-Fi running</string>
<!-- Label for Phone usage time -->
- <string name="usage_type_phone">Phone</string>
+ <string name="usage_type_phone" product="tablet">Tablet</string>
+ <!-- Label for Phone usage time -->
+ <string name="usage_type_phone" product="default">Phone</string>
<!-- Label for Data sent -->
<string name="usage_type_data_send">Data sent</string>
<!-- Label for Data received -->
@@ -2410,7 +2507,9 @@
<string name="battery_desc_voice">Battery used by voice calls</string>
<!-- Description for standby detail -->
- <string name="battery_desc_standby">Battery used when phone is idle</string>
+ <string name="battery_desc_standby" product="tablet">Battery used when tablet is idle</string>
+ <!-- Description for standby detail -->
+ <string name="battery_desc_standby" product="default">Battery used when phone is idle</string>
<!-- Description for cell radio detail -->
<string name="battery_desc_radio">Battery used by cell radio</string>
@@ -2773,7 +2872,7 @@
<!-- Sound settings screen, setting option summary text -->
<string name="emergency_tone_summary">Set behavior when an emergency call is placed</string>
- <!-- Privacy Settings screen --><skip/>
+ <!-- Privacy Settings screen --><skip />
<!-- Privacy settings menu title -->
<string name="privacy_settings">Privacy</string>
<!-- Privacy settings activity title -->
@@ -2795,7 +2894,7 @@
<!-- Dialog title for confirmation to erase backup data from server -->
<string name="backup_erase_dialog_message">Are you sure you want to stop backing up your Wi-Fi passwords, bookmarks, and other settings and application data and erase all copies on Google servers?</string>
- <!-- Device admin settings screen --><skip/>
+ <!-- Device admin settings screen --><skip />
<!-- Device admin settings activity title -->
<string name="device_admin_settings_title">Device administration settings</string>
<!-- Label for screen showing the active device policy -->
@@ -2902,7 +3001,7 @@
<!-- Header title for list of accounts on Accounts & Synchronization settings [CHAR LIMIT=30] -->
<string name="header_manage_accounts">Manage accounts</string>
- <!-- Sync status messages on Accounts & Synchronization settings --><skip/>
+ <!-- Sync status messages on Accounts & Synchronization settings --><skip />
<!-- Sync status shown when sync is enabled [CHAR LIMIT=20] -->
<string name="sync_enabled">Sync is ON</string>
<!-- Sync status shown when sync is disabled [CHAR LIMIT=20] -->
diff --git a/res/xml/privacy_settings.xml b/res/xml/privacy_settings.xml
index 742c621..86fc306 100644
--- a/res/xml/privacy_settings.xml
+++ b/res/xml/privacy_settings.xml
@@ -33,15 +33,11 @@
</PreferenceCategory>
<PreferenceCategory
- android:title="@string/personal_data_section_title">
+ android:title="@string/personal_data_section_title"/>
<!-- Factory reset -->
- <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
+ android:title="@string/master_clear_title"
+ android:summary="@string/master_clear_summary"
+ android:fragment="com.android.settings.MasterClear" />
</PreferenceScreen>
diff --git a/src/com/android/settings/ChooseLockSettingsHelper.java b/src/com/android/settings/ChooseLockSettingsHelper.java
index abcfc05..d31fe3b 100644
--- a/src/com/android/settings/ChooseLockSettingsHelper.java
+++ b/src/com/android/settings/ChooseLockSettingsHelper.java
@@ -16,21 +16,28 @@
package com.android.settings;
+import com.android.internal.widget.LockPatternUtils;
+
import android.app.Activity;
+import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Intent;
-import com.android.internal.widget.LockPatternUtils;
-
public class ChooseLockSettingsHelper {
private LockPatternUtils mLockPatternUtils;
private Activity mActivity;
+ private Fragment mFragment;
public ChooseLockSettingsHelper(Activity activity) {
mActivity = activity;
mLockPatternUtils = new LockPatternUtils(activity);
}
+ public ChooseLockSettingsHelper(Activity activity, Fragment fragment) {
+ this(activity);
+ mFragment = fragment;
+ }
+
public LockPatternUtils utils() {
return mLockPatternUtils;
}
@@ -76,7 +83,11 @@
intent.putExtra(ConfirmLockPattern.HEADER_TEXT, message);
intent.putExtra(ConfirmLockPattern.FOOTER_TEXT, details);
intent.setClassName("com.android.settings", "com.android.settings.ConfirmLockPattern");
- mActivity.startActivityForResult(intent, request);
+ if (mFragment != null) {
+ mFragment.startActivityForResult(intent, request);
+ } else {
+ mActivity.startActivityForResult(intent, request);
+ }
return true;
}
@@ -89,7 +100,11 @@
if (!mLockPatternUtils.isLockPasswordEnabled()) return false;
final Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.ConfirmLockPassword");
- mActivity.startActivityForResult(intent, request);
+ if (mFragment != null) {
+ mFragment.startActivityForResult(intent, request);
+ } else {
+ mActivity.startActivityForResult(intent, request);
+ }
return true;
}
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index e653d90..a2ef7f4 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -16,14 +16,18 @@
package com.android.settings;
-import com.android.internal.os.storage.ExternalStorageFormatter;
-import com.android.internal.widget.LockPatternUtils;
+import com.android.settings.R;
import android.app.Activity;
+import android.app.Fragment;
import android.content.Intent;
+import android.content.res.Resources;
import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceActivity;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
@@ -34,44 +38,20 @@
* 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.
+ *
+ * This is the initial screen.
*/
-public class MasterClear extends Activity {
+public class MasterClear extends Fragment {
private static final int KEYGUARD_REQUEST = 55;
- private LayoutInflater mInflater;
- private LockPatternUtils mLockUtils;
+ static final String ERASE_EXTERNAL_EXTRA = "erase_sd";
- private View mInitialView;
+ private View mContentView;
private Button mInitiateButton;
private View mExternalStorageContainer;
private CheckBox mExternalStorage;
- 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) {
- if (Utils.isMonkeyRunning()) {
- return;
- }
-
- if (mExternalStorage.isChecked()) {
- Intent intent = new Intent(ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET);
- intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME);
- startService(intent);
- } else {
- sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
- // Intent handling is asynchronous -- assume it will happen soon.
- }
- }
- };
-
/**
* Keyguard validation is run using the standard {@link ConfirmLockPattern}
* component as a subactivity
@@ -79,14 +59,15 @@
* @return true if confirmation launched
*/
private boolean runKeyguardConfirmation(int request) {
- return new ChooseLockSettingsHelper(this)
+ Resources res = getActivity().getResources();
+ return new ChooseLockSettingsHelper(getActivity(), this)
.launchConfirmationActivity(request,
- getText(R.string.master_clear_gesture_prompt),
- getText(R.string.master_clear_gesture_explanation));
+ res.getText(R.string.master_clear_gesture_prompt),
+ res.getText(R.string.master_clear_gesture_explanation));
}
@Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode != KEYGUARD_REQUEST) {
@@ -96,40 +77,33 @@
// 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 if (resultCode == Activity.RESULT_CANCELED) {
- finish();
+ showFinalConfirmation();
} else {
establishInitialState();
}
}
+ private void showFinalConfirmation() {
+ Preference preference = new Preference(getActivity());
+ preference.setFragment(MasterClearConfirm.class.getName());
+ preference.setTitle(R.string.master_clear_confirm_title);
+ preference.getExtras().putBoolean(ERASE_EXTERNAL_EXTRA, mExternalStorage.isChecked());
+ ((PreferenceActivity) getActivity()).onPreferenceStartFragment(null, preference);
+ }
+
/**
* 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 (!runKeyguardConfirmation(KEYGUARD_REQUEST)) {
- establishFinalConfirmationState();
- }
+
+ public void onClick(View v) {
+ if (!runKeyguardConfirmation(KEYGUARD_REQUEST)) {
+ showFinalConfirmation();
}
- };
-
- /**
- * 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
@@ -144,48 +118,25 @@
* 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);
- mExternalStorageContainer =
- mInitialView.findViewById(R.id.erase_external_container);
- mExternalStorage =
- (CheckBox) mInitialView.findViewById(R.id.erase_external);
- mExternalStorageContainer.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- mExternalStorage.toggle();
- }
- });
- }
+ mInitiateButton = (Button) mContentView.findViewById(R.id.initiate_master_clear);
+ mInitiateButton.setOnClickListener(mInitiateListener);
+ mExternalStorageContainer = mContentView.findViewById(R.id.erase_external_container);
+ mExternalStorage = (CheckBox) mContentView.findViewById(R.id.erase_external);
- setContentView(mInitialView);
+ mExternalStorageContainer.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ mExternalStorage.toggle();
+ }
+ });
}
@Override
- protected void onCreate(Bundle savedState) {
- super.onCreate(savedState);
-
- mInitialView = null;
- mFinalView = null;
- mInflater = LayoutInflater.from(this);
- mLockUtils = new LockPatternUtils(this);
-
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ mContentView = inflater.inflate(R.layout.master_clear, null);
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();
-
- if (!isFinishing()) {
- establishInitialState();
- }
+ return mContentView;
}
}
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
new file mode 100644
index 0000000..9c15c73
--- /dev/null
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings;
+
+import com.android.internal.os.storage.ExternalStorageFormatter;
+import com.android.internal.widget.LockPatternUtils;
+
+import android.app.Activity;
+import android.app.Fragment;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+
+/**
+ * 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.
+ *
+ * This is the confirmation screen.
+ */
+public class MasterClearConfirm extends Fragment {
+
+ private View mContentView;
+ private boolean mEraseSdCard;
+ 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) {
+ if (Utils.isMonkeyRunning()) {
+ return;
+ }
+
+ if (mEraseSdCard) {
+ Intent intent = new Intent(ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET);
+ intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME);
+ getActivity().startService(intent);
+ } else {
+ getActivity().sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
+ // Intent handling is asynchronous -- assume it will happen soon.
+ }
+ }
+ };
+
+ /**
+ * Configure the UI for the final confirmation interaction
+ */
+ private void establishFinalConfirmationState() {
+ mFinalButton = (Button) mContentView.findViewById(R.id.execute_master_clear);
+ mFinalButton.setOnClickListener(mFinalClickListener);
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ mContentView = inflater.inflate(R.layout.master_clear_confirm, null);
+ establishFinalConfirmationState();
+ return mContentView;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ Bundle args = getArguments();
+ mEraseSdCard = args != null ? args.getBoolean(MasterClear.ERASE_EXTERNAL_EXTRA) : false;
+ }
+}
diff --git a/src/com/android/settings/PrivacySettings.java b/src/com/android/settings/PrivacySettings.java
index 826c9cf..3f62f19 100644
--- a/src/com/android/settings/PrivacySettings.java
+++ b/src/com/android/settings/PrivacySettings.java
@@ -98,7 +98,7 @@
}
}
- return false;
+ return super.onPreferenceTreeClick(preferenceScreen, preference);
}
private void showEraseBackupDialog() {
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 4211814..890da3d 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -155,7 +155,6 @@
mDialogFragment.show(getActivity().getFragmentManager(), Integer.toString(dialogId));
}
- @Override
public Dialog onCreateDialog(int dialogId) {
return null;
}
diff --git a/src/com/android/settings/UserDictionarySettings.java b/src/com/android/settings/UserDictionarySettings.java
index 7bd5d56..b13126a 100644
--- a/src/com/android/settings/UserDictionarySettings.java
+++ b/src/com/android/settings/UserDictionarySettings.java
@@ -16,8 +16,6 @@
package com.android.settings;
-import com.android.settings.SettingsPreferenceFragment.SettingsDialogFragment;
-
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -30,7 +28,6 @@
import android.provider.UserDictionary;
import android.text.InputType;
import android.util.Log;
-import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -38,7 +35,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
-import android.view.ContextMenu.ContextMenuInfo;
import android.widget.AlphabetIndexer;
import android.widget.EditText;
import android.widget.ImageView;
@@ -47,7 +43,8 @@
import android.widget.SectionIndexer;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
-import android.widget.AdapterView.AdapterContextMenuInfo;
+
+import com.android.settings.SettingsPreferenceFragment.SettingsDialogFragment;
import java.util.Locale;
@@ -73,9 +70,6 @@
private static final String EXTRA_WORD = "word";
- private static final int CONTEXT_MENU_EDIT = Menu.FIRST;
- private static final int CONTEXT_MENU_DELETE = Menu.FIRST + 1;
-
private static final int OPTIONS_MENU_ADD = Menu.FIRST;
private static final int DIALOG_ADD_OR_EDIT = 0;
@@ -116,7 +110,6 @@
listView.setFastScrollEnabled(true);
listView.setEmptyView(emptyView);
- registerForContextMenu(listView);
setHasOptionsMenu(true);
if (savedInstanceState != null) {
@@ -163,41 +156,10 @@
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
- getActivity().openContextMenu(v);
- }
-
- @Override
- public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
- if (!(menuInfo instanceof AdapterContextMenuInfo)) return;
-
- AdapterContextMenuInfo adapterMenuInfo = (AdapterContextMenuInfo) menuInfo;
- menu.setHeaderTitle(getWord(adapterMenuInfo.position));
- menu.add(0, CONTEXT_MENU_EDIT, 0,
- R.string.user_dict_settings_context_menu_edit_title);
- menu.add(0, CONTEXT_MENU_DELETE, 0,
- R.string.user_dict_settings_context_menu_delete_title);
- }
-
- @Override
- public boolean onContextItemSelected(MenuItem item) {
- ContextMenuInfo menuInfo = item.getMenuInfo();
- if (!(menuInfo instanceof AdapterContextMenuInfo)) return false;
-
- AdapterContextMenuInfo adapterMenuInfo = (AdapterContextMenuInfo) menuInfo;
- String word = getWord(adapterMenuInfo.position);
- if (word == null) return true;
-
- switch (item.getItemId()) {
- case CONTEXT_MENU_DELETE:
- deleteWord(word);
- return true;
-
- case CONTEXT_MENU_EDIT:
- showAddOrEditDialog(word);
- return true;
+ String word = getWord(position);
+ if (word != null) {
+ showAddOrEditDialog(word);
}
-
- return false;
}
@Override
@@ -231,14 +193,16 @@
@Override
public Dialog onCreateDialog(int id) {
final Activity activity = getActivity();
- final View content = activity.getLayoutInflater().inflate(R.layout.dialog_edittext, null);
+ final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(activity);
+ final LayoutInflater inflater = LayoutInflater.from(dialogBuilder.getContext());
+ final View content = inflater.inflate(R.layout.dialog_edittext, null);
final EditText editText = (EditText) content.findViewById(R.id.edittext);
editText.setText(mDialogEditingWord);
// No prediction in soft keyboard mode. TODO: Create a better way to disable prediction
editText.setInputType(InputType.TYPE_CLASS_TEXT
| InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
- AlertDialog dialog = new AlertDialog.Builder(activity)
+ AlertDialog dialog = dialogBuilder
.setTitle(mDialogEditingWord != null
? R.string.user_dict_settings_edit_dialog_title
: R.string.user_dict_settings_add_dialog_title)
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
index acbb99c..4b7a0e0 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -46,8 +46,8 @@
TextWatcher {
private static final String TAG = "BluetoothPairingDialog";
- private final int BLUETOOTH_PIN_MAX_LENGTH = 16;
- private final int BLUETOOTH_PASSKEY_MAX_LENGTH = 6;
+ private static final int BLUETOOTH_PIN_MAX_LENGTH = 16;
+ private static final int BLUETOOTH_PASSKEY_MAX_LENGTH = 6;
private LocalBluetoothManager mLocalManager;
private BluetoothDevice mDevice;
private int mType;
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 841c9abc..e206c3d 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -251,7 +251,6 @@
}
}
- @Override
public void onUserLeaveHint() {
mLocalManager.stopScanning();
}
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
index 22fa005..bfd2e99 100644
--- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
+++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
@@ -104,9 +104,9 @@
* @param profile Profile to describe
* @return Description of the device and profile
*/
- private String describe(CachedBluetoothDevice cachedDevice, Profile profile) {
+ private String describe(Profile profile) {
StringBuilder sb = new StringBuilder();
- sb.append("Address:").append(cachedDevice.mDevice);
+ sb.append("Address:").append(mDevice);
if (profile != null) {
sb.append(" Profile:").append(profile.name());
}
@@ -114,10 +114,6 @@
return sb.toString();
}
- private String describe(Profile profile) {
- return describe(this, profile);
- }
-
public void onProfileStateChanged(Profile profile, int newProfileState) {
if (D) {
Log.d(TAG, "onProfileStateChanged: profile " + profile.toString() +
@@ -166,20 +162,13 @@
}
public void disconnect(Profile profile) {
- disconnectInt(this, profile);
- }
-
- private boolean disconnectInt(CachedBluetoothDevice cachedDevice, Profile profile) {
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
- int status = profileManager.getConnectionStatus(cachedDevice.mDevice);
- if (profileManager.disconnect(cachedDevice.mDevice)) {
+ if (profileManager.disconnect(mDevice)) {
if (D) {
Log.d(TAG, "Command sent successfully:DISCONNECT " + describe(profile));
}
- return true;
}
- return false;
}
public void askDisconnect() {
@@ -204,6 +193,57 @@
}
};
+ showDisconnectDialog(context, disconnectListener, message);
+ }
+
+ public void askDisconnect(final Profile profile) {
+ Context context = mLocalManager.getForegroundActivity();
+ if (context == null) {
+ // Cannot ask, since we need an activity context
+ disconnect(profile);
+ return;
+ }
+
+ Resources res = context.getResources();
+
+ String name = getName();
+ if (TextUtils.isEmpty(name)) {
+ name = res.getString(R.string.bluetooth_device);
+ }
+ int disconnectMessage;
+ switch (profile) {
+ case A2DP:
+ disconnectMessage = R.string.bluetooth_disconnect_a2dp_profile;
+ break;
+ case HEADSET:
+ disconnectMessage = R.string.bluetooth_disconnect_headset_profile;
+ break;
+ case HID:
+ disconnectMessage = R.string.bluetooth_disconnect_hid_profile;
+ break;
+ case PAN:
+ disconnectMessage = R.string.bluetooth_disconnect_pan_profile;
+ break;
+ default:
+ Log.w(TAG, "askDisconnect: unexpected profile " + profile);
+ disconnectMessage = R.string.bluetooth_disconnect_blank;
+ break;
+ }
+ String message = res.getString(disconnectMessage, name);
+
+ DialogInterface.OnClickListener disconnectListener =
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ disconnect(profile);
+ }
+ };
+
+ showDisconnectDialog(context, disconnectListener, message);
+ }
+
+ private void showDisconnectDialog(Context context,
+ DialogInterface.OnClickListener disconnectListener,
+ String message) {
if (mDialog == null) {
mDialog = new AlertDialog.Builder(context)
.setPositiveButton(android.R.string.ok, disconnectListener)
@@ -213,6 +253,10 @@
if (mDialog.isShowing()) {
mDialog.dismiss();
}
+ // use disconnectListener for the correct profile(s)
+ CharSequence okText = context.getText(android.R.string.ok);
+ mDialog.setButton(DialogInterface.BUTTON_POSITIVE,
+ okText, disconnectListener);
}
mDialog.setTitle(getName());
mDialog.setMessage(message);
@@ -311,7 +355,7 @@
CachedBluetoothDevice cachedDevice = cachedDeviceManager.findDevice(btDevice);
if (cachedDevice != null && !cachedDevice.equals(device)) {
- disconnectInt(cachedDevice, profile);
+ cachedDevice.disconnect(profile);
}
}
}
@@ -321,7 +365,7 @@
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
- int status = profileManager.getConnectionStatus(cachedDevice.mDevice);
+
if (profileManager.connect(cachedDevice.mDevice)) {
if (D) {
Log.d(TAG, "Command sent successfully:CONNECT " + describe(profile));
diff --git a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
index f8a66f6..d6f192a 100644
--- a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
+++ b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
@@ -21,7 +21,6 @@
import com.android.settings.bluetooth.LocalBluetoothProfileManager.Profile;
import android.bluetooth.BluetoothDevice;
-import android.content.Context;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
@@ -35,8 +34,8 @@
import java.util.HashMap;
/**
- * ConnectSpecificProfilesActivity presents the user with all of the profiles
- * for a particular device, and allows him to choose which should be connected
+ * This preference fragment presents the user with all of the profiles
+ * for a particular device, and allows them to be individually connected
* (or disconnected).
*/
public class DeviceProfilesSettings extends SettingsPreferenceFragment
@@ -155,9 +154,6 @@
pref.setOrder(getProfilePreferenceIndex(profile));
pref.setOnExpandClickListener(this);
- LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
- .getProfileManager(mManager, profile);
-
/**
* Gray out profile while connecting and disconnecting
*/
@@ -172,7 +168,7 @@
public boolean onPreferenceTreeClick(PreferenceScreen screen, Preference preference) {
String key = preference.getKey();
if (preference instanceof BluetoothProfilePreference) {
- onProfileClicked(preference, Profile.valueOf(key));
+ onProfileClicked(Profile.valueOf(key));
return true;
} else if (key.equals(KEY_UNPAIR)) {
unpairDevice();
@@ -196,18 +192,24 @@
return true;
}
- private void onProfileClicked(Preference preference, Profile profile) {
+ private void onProfileClicked(Profile profile) {
+ BluetoothDevice device = mCachedDevice.getDevice();
LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
.getProfileManager(mManager, profile);
- // TODO: Get the current state and flip it, updating the summary for the preference
-// profileManager.setPreferred(mCachedDevice.getDevice(), checked);
-//
-// if (checked) {
-// mCachedDevice.connect(profile);
-// } else {
-// mCachedDevice.disconnect(profile);
-// }
+ int status = profileManager.getConnectionStatus(device);
+ boolean isConnected =
+ SettingsBtStatus.isConnectionStatusConnected(status);
+
+ // TODO: only change the preference on disconnect if user confirms
+ // TODO: add method to change priority of individual profiles
+ // profileManager.setPreferred(device, !isConnected);
+
+ if (isConnected) {
+ mCachedDevice.askDisconnect(profile);
+ } else {
+ mCachedDevice.connect(profile);
+ }
}
public void onDeviceAttributesChanged(CachedBluetoothDevice cachedDevice) {
diff --git a/src/com/android/settings/bluetooth/DockService.java b/src/com/android/settings/bluetooth/DockService.java
index e817e78..0641a03 100644
--- a/src/com/android/settings/bluetooth/DockService.java
+++ b/src/com/android/settings/bluetooth/DockService.java
@@ -496,7 +496,7 @@
private CharSequence[] initBtSettings(DockService service, BluetoothDevice device, int state,
boolean firstTime) {
// TODO Avoid hardcoding dock and profiles. Read from system properties
- int numOfProfiles = 0;
+ int numOfProfiles;
switch (state) {
case Intent.EXTRA_DOCK_STATE_DESK:
numOfProfiles = 1;
@@ -729,7 +729,7 @@
profileManager.setPreferred(device, mCheckedItems[i]);
if (DEBUG) {
if (mCheckedItems[i] != profileManager.isPreferred(device)) {
- Log.e(TAG, "Can't save prefered value");
+ Log.e(TAG, "Can't save preferred value");
}
}
}
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothManager.java b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
index b46cc96..07d3931 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothManager.java
@@ -70,7 +70,7 @@
// If a device was picked from the device picker or was in discoverable mode
// in the last 60 seconds, show the pairing dialogs in foreground instead
// of raising notifications
- private static long GRACE_PERIOD_TO_SHOW_DIALOGS_IN_FOREGROUND = 60 * 1000;
+ private static final int GRACE_PERIOD_TO_SHOW_DIALOGS_IN_FOREGROUND = 60 * 1000;
public static final String SHARED_PREFERENCES_KEY_DISCOVERING_TIMESTAMP =
"last_discovering_time";
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
index f7ad3d3..a01fdec 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
@@ -225,7 +225,7 @@
}
// TODO: int instead of enum
- public enum Profile {
+ public static enum Profile {
HEADSET(R.string.bluetooth_profile_headset),
A2DP(R.string.bluetooth_profile_a2dp),
OPP(R.string.bluetooth_profile_opp),
@@ -433,7 +433,7 @@
public boolean disconnect(BluetoothDevice device) {
List<BluetoothDevice> deviceList = getConnectedDevices();
if (deviceList.size() != 0 && deviceList.get(0).equals(device)) {
- // Downgrade prority as user is disconnecting the headset.
+ // Downgrade priority as user is disconnecting the headset.
if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) {
mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
}
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
index 0801504..fde5d90 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
@@ -74,6 +74,8 @@
// This is a tweak for letting users not confused with WiFi state during a first first steps.
private int mIgnoringWifiNotificationCount = 5;
+ private boolean mShowingConnectingMessageManually = false;
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -127,6 +129,14 @@
break;
case R.id.wifi_setup_connect:
mWifiSettings.submit();
+
+ // updateConnectionState() isn't called soon after the user's "connect" action,
+ // and the user still sees "not connected" message for a while, which looks strange.
+ // We instead manually show "connecting" message before the system gets actual
+ // "connecting" message from Wi-Fi module.
+ showConnectingStatus();
+ mShowingConnectingMessageManually = true;
+ mIgnoringWifiNotificationCount = 2;
break;
case R.id.wifi_setup_forget:
mWifiSettings.forget();
@@ -167,10 +177,8 @@
break;
}
case CONNECTING: {
- mProgressBar.setIndeterminate(false);
- mProgressBar.setProgress(1);
- mStatusText.setText(R.string.wifi_setup_status_connecting);
- mProgressText.setText(Summary.get(this, state));
+ mShowingConnectingMessageManually = false;
+ showConnectingStatus();
break;
}
case CONNECTED: {
@@ -200,12 +208,15 @@
break;
}
default: // Not connected.
- if (mWifiSettings.getAccessPointsCount() == 0 &&
- mIgnoringWifiNotificationCount > 0) {
+ if (mWifiSettings.getAccessPointsCount() == 0 && mIgnoringWifiNotificationCount > 0) {
mIgnoringWifiNotificationCount--;
mProgressBar.setIndeterminate(true);
mProgressText.setText(Summary.get(this, DetailedState.SCANNING));
+ } else if (mShowingConnectingMessageManually && mIgnoringWifiNotificationCount > 0) {
+ mIgnoringWifiNotificationCount--;
+ showConnectingStatus();
} else {
+ mShowingConnectingMessageManually = false;
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(0);
mStatusText.setText(R.string.wifi_setup_status_select_network);
@@ -217,6 +228,13 @@
}
}
+ private void showConnectingStatus() {
+ mProgressBar.setIndeterminate(false);
+ mProgressBar.setProgress(1);
+ mStatusText.setText(R.string.wifi_setup_status_connecting);
+ mProgressText.setText(Summary.get(this, DetailedState.CONNECTING));
+ }
+
private void enableButtons() {
((Button)findViewById(R.id.wifi_setup_refresh_list)).setEnabled(true);
((Button)findViewById(R.id.wifi_setup_add_network)).setEnabled(true);