Merge "Automatically turn on "Use system language" when no subtypes become selected Bug: 3327257" into honeycomb
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ce70f87..17c2fcd 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -714,7 +714,8 @@
<!-- Lock screen settings -->
<activity android:name="ConfirmLockPattern"/>
- <activity android:name="ConfirmLockPassword"/>
+ <activity android:name="ConfirmLockPassword"
+ android:windowSoftInputMode="stateUnchanged|adjustResize"/>
<activity android:name="ChooseLockGeneric"
android:label="@string/lockpassword_choose_lock_generic_header">
@@ -726,7 +727,8 @@
<activity android:name="ChooseLockPattern" android:exported="false"/>
- <activity android:name="ChooseLockPassword" android:exported="false"/>
+ <activity android:name="ChooseLockPassword" android:exported="false"
+ android:windowSoftInputMode="stateUnchanged|adjustResize"/>
<activity android:name="ChooseLockPatternTutorial" android:exported="false"/>
diff --git a/res/layout-xlarge-land/choose_lock_password.xml b/res/layout-xlarge-land/choose_lock_password.xml
index 5f7cfaf..586e7d5 100644
--- a/res/layout-xlarge-land/choose_lock_password.xml
+++ b/res/layout-xlarge-land/choose_lock_password.xml
@@ -25,7 +25,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="72dip"
+ android:layout_marginTop="20dip"
android:orientation="horizontal">
<!-- "Enter PIN(Password) to unlock" -->
diff --git a/res/layout-xlarge-land/confirm_lock_password.xml b/res/layout-xlarge-land/confirm_lock_password.xml
index d03923e..7ae8944 100644
--- a/res/layout-xlarge-land/confirm_lock_password.xml
+++ b/res/layout-xlarge-land/confirm_lock_password.xml
@@ -26,7 +26,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="72dip"
+ android:layout_marginTop="20dip"
android:orientation="horizontal">
<!-- "Enter PIN(Password) to unlock" -->
diff --git a/res/layout-xlarge/date_time_settings_setupwizard.xml b/res/layout-xlarge/date_time_settings_setupwizard.xml
index 0b5d6bf..73aba01 100644
--- a/res/layout-xlarge/date_time_settings_setupwizard.xml
+++ b/res/layout-xlarge/date_time_settings_setupwizard.xml
@@ -18,7 +18,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="96dip"
+ android:paddingTop="160dip"
android:paddingLeft="128dip"
android:paddingRight="128dip"
android:paddingBottom="96dip">
@@ -41,7 +41,7 @@
<View
android:id="@+id/top_divider"
android:layout_width="match_parent"
- android:layout_height="1px"
+ android:layout_height="3dip"
android:layout_below="@id/title"
android:background="@color/divider_color" />
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 3e59faa..d3af1f8 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
@@ -20,8 +20,8 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="120dip"
- android:paddingLeft="96dip"
- android:paddingRight="96dip"
+ android:paddingLeft="128dip"
+ android:paddingRight="128dip"
android:paddingBottom="0dip" >
<RelativeLayout
@@ -64,13 +64,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal" />
-
- <View
- android:id="@+id/divider"
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:layout_alignBottom="@id/scanning_progress_bar"
- android:background="@color/divider_color" />
</RelativeLayout>
<TextView
@@ -80,7 +73,7 @@
android:layout_below="@+id/top_divider"
android:layout_alignParentLeft="true"
android:layout_marginLeft="16dip"
- android:layout_marginTop="32dip"
+ android:layout_marginTop="16dip"
android:layout_marginBottom="0dip"
android:text="@string/wifi_setup_status_select_network"
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -112,7 +105,7 @@
android:id="@+id/wifi_config_ui"
android:layout_width="416dip"
android:layout_height="wrap_content"
- android:paddingTop="32dip"
+ android:paddingTop="16dip"
android:visibility="gone" />
</FrameLayout>
diff --git a/res/values-es-rUS-xlarge/strings.xml b/res/values-es-rUS-xlarge/strings.xml
index 2c0eadf..6bee12a 100644
--- a/res/values-es-rUS-xlarge/strings.xml
+++ b/res/values-es-rUS-xlarge/strings.xml
@@ -62,6 +62,8 @@
<!-- XL -->
<string name="date_time_date_format" msgid="7461449249664299378">"Seleccionar formato de fecha"</string>
<!-- XL -->
+ <!-- outdated translation 8167667824619597923 --> <string name="lock_after_timeout" msgid="7600891513842005">"Bloquear el dispositivo después del tiempo de espera"</string>
+ <!-- XL -->
<string name="owner_info_settings_title" msgid="5868468517033834142">"Datos de propietario"</string>
<!-- XL -->
<string name="owner_info_settings_edit_text_hint" msgid="8714689633531483174">"Introduce el texto para la pantalla de bloqueo."</string>
@@ -70,7 +72,21 @@
<!-- XL -->
<string name="location_security_settings_title" msgid="2760622897087864574">"Configuración de ubicación & seguridad"</string>
<!-- XL -->
- <string name="unlock_set_unlock_pattern_summary" msgid="2255207039632944974">"Establece el patrón para desbloquear la pantalla."</string>
+ <!-- outdated translation 7222261825322058694 --> <string name="lock_settings_picker_title" msgid="2690788880781812819">"Seguridad de desbloqueo de la pantalla"</string>
+ <!-- XL -->
+ <!-- outdated translation 347866107250190753 --> <string name="unlock_set_unlock_launch_picker_title" msgid="3679744779726501637">"Configurar bloqueo de pantalla"</string>
+ <!-- XL -->
+ <!-- outdated translation 7839021413264124726 --> <string name="unlock_set_unlock_off_summary" msgid="7637549453338831016">"No mostrar el bloqueo de pantalla"</string>
+ <!-- XL -->
+ <!-- outdated translation 6897899776351307938 --> <string name="unlock_set_unlock_none_title" msgid="8302920869082326280">"Ninguno"</string>
+ <!-- XL -->
+ <!-- outdated translation 8885805726462075726 --> <string name="unlock_set_unlock_none_summary" msgid="8836395154986917752">"Inhabilitar seguridad de desbloqueo de la pantalla"</string>
+ <!-- XL -->
+ <!-- outdated translation 2255207039632944974 --> <string name="unlock_set_unlock_pattern_summary" msgid="7704094261502377451">"Establece el patrón para desbloquear la pantalla."</string>
+ <!-- XL -->
+ <!-- outdated translation 7340012856731870485 --> <string name="unlock_set_unlock_pin_summary" msgid="8765565920176739681">"Ingresa un PIN numérico para desbloquear la pantalla."</string>
+ <!-- XL -->
+ <!-- outdated translation 2303105580723976714 --> <string name="unlock_set_unlock_password_summary" msgid="5551818803088356462">"Ingresa una contraseña para desbloquear la pantalla."</string>
<!-- XL -->
<string name="unlock_set_unlock_disabled_summary" msgid="5962903914511361952">"Inhabilitado por el administrador remoto de la tableta"</string>
<!-- XL -->
@@ -126,6 +142,8 @@
<!-- XL -->
<string name="wifi_tether_settings_title" msgid="1163442397537759931">"Configuración de la zona activa Wi-Fi portátil"</string>
<!-- XL -->
+ <!-- outdated translation 221091308884159495 --> <string name="display_settings_title" msgid="891288246221134525">"Pantalla"</string>
+ <!-- XL -->
<string name="silent_mode_title" msgid="1261478570389701519">"Modo silencio"</string>
<!-- XL -->
<string name="silent_mode_summary" msgid="5222199351217769201">"Silenciar todos los sonidos excepto los medios & las alarmas."</string>
@@ -166,7 +184,7 @@
<string name="accelerometer_summary_off" product="tablet" msgid="4678290739639397018">"Cambiar la orientación automáticamente al girar la tableta"</string>
<string name="accelerometer_summary_off" product="default" msgid="5382045890112616097">"Cambiar la orientación automáticamente al girar el teléfono"</string>
<!-- XL -->
- <string name="screen_timeout" msgid="4642702020751106195">"Tiempo de espera de la pantalla"</string>
+ <!-- outdated translation 4642702020751106195 --> <string name="screen_timeout" msgid="6722687152321894360">"Tiempo de espera de la pantalla"</string>
<!-- XL -->
<string name="sim_lock_settings_category" msgid="3725835714557961131">"Configurar bloqueo de tarjeta SIM"</string>
<!-- XL -->
@@ -183,6 +201,9 @@
<!-- XL -->
<string name="build_number" msgid="5240350635232938488">"Crear número"</string>
<!-- XL -->
+ <!-- outdated translation 899895687115294054 --> <string name="device_status_summary" product="tablet" msgid="1593450654160814122">"Número de teléfono, señal, etc."</string>
+ <string name="device_status_summary" product="default" msgid="899895687115294054">"Número de teléfono, señal, etc."</string>
+ <!-- XL -->
<string name="storage_settings" msgid="5625705972110860801">"Almacenamiento"</string>
<!-- XL -->
<string name="sd_eject" product="nosdcard" msgid="2291329760090260835">"Desactivar alm. comp."</string>
@@ -237,6 +258,12 @@
<!-- XL -->
<string name="location_gps_disabled" msgid="368445950600796860">"Localizar a nivel de calle (necesita más batería además de la vista del cielo)"</string>
<!-- XL -->
+ <!-- outdated translation 6158635740500076705 --> <string name="use_location_title" msgid="6603235165943700077">"Utilizar la ubicación para buscar con Google"</string>
+ <!-- XL -->
+ <!-- outdated translation 5137275253035183227 --> <string name="use_location_summary_disabled" msgid="555010365449402016">"Utilizar la ubicación para buscar con Google y otros servicios de Google"</string>
+ <!-- XL -->
+ <!-- outdated translation 7252704818478660952 --> <string name="use_location_summary_enabled" msgid="5155029913791084058">"Ubicación utilizada para mejorar los resultados de la búsqueda y otros servicios de Google"</string>
+ <!-- XL -->
<string name="about_settings" product="tablet" msgid="4492242295431251939">"Acerca de la tableta"</string>
<string name="about_settings" product="default" msgid="5642163368100089859">"Acerca del teléfono"</string>
<!-- XL -->
@@ -245,6 +272,8 @@
<string name="system_tutorial_list_item_summary" product="tablet" msgid="176391697191022240">"Aprende cómo utilizar tu tableta"</string>
<string name="system_tutorial_list_item_summary" product="default" msgid="696702567266318374">"Aprende cómo utilizar tu teléfono"</string>
<!-- XL -->
+ <!-- outdated translation 1032594113258846963 --> <string name="lock_settings_title" msgid="9000564553472290676">"Desbloqueo de pantalla"</string>
+ <!-- XL -->
<string name="lockpattern_change_lock_pattern_label" msgid="4234350892820550249">"Cambiar gráfico de desbloqueo"</string>
<!-- XL -->
<string name="lockpattern_recording_intro_header" msgid="9142059965773629252">"Establecer un gráfico de desbloqueo"</string>
@@ -266,6 +295,7 @@
<string name="lock_title" product="tablet" msgid="9166767874243041429">"Protección de tu tableta"</string>
<string name="lock_title" product="default" msgid="1092944886413119561">"Asegurando tu teléfono"</string>
<!-- XL -->
+ <string name="lock_intro_message" product="tablet" msgid="4721776268392533907">"Protege tu tableta del uso no autorizado creando un gráfico de desbloqueo de pantalla personal. Usa el dedo para unir los puntos en cualquier orden en la pantalla. Debes unir al menos cuatro puntos. "\n\n"¿Listo para comenzar? Toca “Siguiente”."</string>
<string name="lock_intro_message" product="default" msgid="907038783986041076"><font size="17">"Protege a tu teléfono de usos no autorizados al crear un gráfico de desbloqueo en la pantalla personal. "\n<font height="17">\n</font><b>"1"</b>" En la pantalla siguiente, observa cómo se establece un gráfico de ejemplo. "\n<font height="17">\n</font><b>"2"</b>" Cuando estés listo, establece tu propio gráfico de desbloqueo personal. Experimenta con diferentes gráficos pero conecta al menos cuatro puntos. "\n<font height="17">\n</font><b>"3"</b>" Revisa tu gráfico para confirmar. "\n<font height="17">\n</font><b>"¿Estás listo para comenzar? Toca \"Siguiente\""</b>". "\n<font height="3">\n</font>"Si deseas dejar sin protección a tu teléfono, toca \"Cancelar\"."</font></string>
<!-- XL -->
<string name="applications_settings_header" msgid="7998404736890425408">"Configuración de aplicación"</string>
@@ -398,6 +428,16 @@
<!-- XL -->
<string name="bluetooth_notif_message" msgid="2611095882015030198">"Seleccionar para vincular con <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
<!-- XL -->
+ <string name="bluetooth_auto_connect" msgid="5635834571497957651">"Conectar automáticamente"</string>
+ <!-- XL -->
+ <string name="date_picker_title" msgid="6146612274280931937">"Fecha"</string>
+ <!-- XL -->
+ <string name="time_picker_title" msgid="4696843998853074855">"Hora"</string>
+ <!-- XL -->
+ <string name="lockpattern_tutorial_cancel_label" msgid="8891383231976441554">"Cancelar"</string>
+ <!-- XL -->
+ <string name="lockpattern_tutorial_continue_label" msgid="607092788342282292">"Siguiente"</string>
+ <!-- XL -->
<string name="bluetooth_enter_pin_msg" msgid="4795866589006598648">\n"Ingresa el PIN para vincularse con \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\". (Intenta con 0000 ó 1234). Es posible que debas ingresar el mismo PIN en el dispositivo Bluetooth."</string>
<!-- XL -->
<string name="bluetooth_enter_passkey_msg" msgid="5281098098369174842">\n"Ingresa la llave maestra para vincular con \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\"."</string>
@@ -410,8 +450,16 @@
<!-- XL -->
<string name="bluetooth_disconnect_pan_profile" msgid="7327390610936860378">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> se desconectará del anclaje."</string>
<!-- XL -->
+ <string name="bluetooth_pan_profile_summary_use_for" msgid="7152329494274254683">"Utilizar para acceso a Internet"</string>
+ <!-- XL -->
<string name="memory_calculating_size" msgid="4994844259856032553">"Calculando…"</string>
<!-- XL -->
+ <string name="lockpassword_choose_your_pattern_header" msgid="1478083096563754867">"Escoge tu patrón"</string>
+ <!-- XL -->
+ <string name="lockpassword_confirm_your_pattern_header" msgid="4173481161015502997">"Confirma tu patrón"</string>
+ <!-- XL -->
+ <string name="lockpassword_choose_lock_generic_header" msgid="205113288645586976">"Desbloquear selección"</string>
+ <!-- XL -->
<string name="current_input_method" msgid="1106006204280275670">"Método de entrada actual"</string>
<!-- XL -->
<string name="input_method_selector" msgid="4603564747071938112">"Selector de método de entrada"</string>
@@ -428,6 +476,8 @@
<!-- XL -->
<string name="active_input_method_subtypes" msgid="5725808834287911653">"Métodos de entrada activos"</string>
<!-- XL -->
+ <string name="use_system_language_to_select_input_method_subtypes" msgid="6563524811468810194">"Usar el idioma del sistema"</string>
+ <!-- XL -->
<string name="input_methods_and_subtype_enabler_title" msgid="2847364292968799808">"Seleccionar métodos de entrada activos"</string>
<!-- XL -->
<string name="history_details_title" msgid="8910742461149938017">"Detalles del historial"</string>
diff --git a/res/values-xlarge/colors.xml b/res/values-xlarge/colors.xml
index 414f7c2..4447333 100644
--- a/res/values-xlarge/colors.xml
+++ b/res/values-xlarge/colors.xml
@@ -18,5 +18,5 @@
-->
<resources>
- <color name="divider_color">#ff666666</color>
+ <color name="divider_color">#20ffffff</color>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a358070..7012440 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -580,7 +580,7 @@
<!-- Security Picker --><skip />
<!-- Title for security picker to choose the unlock method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
- <string name="lock_settings_picker_title">Screen unlock security</string>
+ <string name="lock_settings_picker_title">Configure lock screen</string>
<!-- Main Security lock settings --><skip />
<!-- Title for PreferenceScreen to launch picker for security method when there is none [CHAR LIMIT=22] -->
@@ -1381,8 +1381,10 @@
<string name="device_status_activity_title">Status</string>
<!-- About phone screen, title of the item to go into the Phone status screen -->
<string name="device_status">Status</string>
+ <!-- About tablet screen, summary of the item that takes you to tablet status screen -->
+ <string name="device_status_summary" product="tablet">Status of the battery, network, and other information</string>
<!-- About phone screen, summary of the item to go into the phone status screen -->
- <string name="device_status_summary">Phone number, signal, etc.</string>
+ <string name="device_status_summary" product="default">Phone number, signal, etc.</string>
<!-- Main settings screen item's title to go into the storage settings screen [CHAR LIMIT=25] -->
<string name="storage_settings" >Storage</string>
<!-- Storage settings screen title -->
@@ -2943,7 +2945,7 @@
<!-- Wifi Setup For Setup Wizard with XL screen -->
<!-- Title shown in Wifi Setup For Setup Wizard with XL screen -->
- <string name="wifi_setup_title">WiFi setup</string>
+ <string name="wifi_setup_title">Wi-Fi setup</string>
<!-- Text message shown when Wifi is not connected.
Used in Wifi Setup For Setup Wizard with XL screen. -->
<string name="wifi_setup_not_connected">Not connected</string>
diff --git a/res/xml/application_settings.xml b/res/xml/application_settings.xml
index 9042ba9..a06377d 100644
--- a/res/xml/application_settings.xml
+++ b/res/xml/application_settings.xml
@@ -34,6 +34,7 @@
android:entries="@array/app_install_location_entries"
android:entryValues="@array/app_install_location_values"/>
+ <!-- Disabled quick launch settings pending UI redesign.
<PreferenceScreen
android:key="quick_launch"
android:title="@string/quick_launch_title"
@@ -42,7 +43,8 @@
android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.quicklaunch.QuickLaunchSettings" />
</PreferenceScreen>
-
+ -->
+
<PreferenceScreen
android:fragment="com.android.settings.applications.ManageApplications"
android:title="@string/manageapplications_settings_title"
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java
index b8db82e..1bebebb 100644
--- a/src/com/android/settings/ChooseLockPassword.java
+++ b/src/com/android/settings/ChooseLockPassword.java
@@ -218,8 +218,8 @@
// Update the breadcrumb (title) if this is embedded in a PreferenceActivity
if (activity instanceof PreferenceActivity) {
final PreferenceActivity preferenceActivity = (PreferenceActivity) activity;
- int id = mIsAlphaMode ? R.string.lockpassword_confirm_your_password_header
- : R.string.lockpassword_confirm_your_pin_header;
+ int id = mIsAlphaMode ? R.string.lockpassword_choose_your_password_header
+ : R.string.lockpassword_choose_your_pin_header;
CharSequence title = getText(id);
preferenceActivity.showBreadCrumbs(title, title);
}
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index aa5decb..54f9fb1 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -286,7 +286,8 @@
public void onDeviceAdded(CachedBluetoothDevice cachedDevice) {
if (mDevicePreferenceMap.get(cachedDevice) != null) {
- throw new IllegalStateException("Got onDeviceAdded, but cachedDevice already exists");
+ Log.e(TAG, "Got onDeviceAdded, but cachedDevice already exists");
+ return;
}
if (mScreenType != SCREEN_TYPE_SETTINGS
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
index 46391d3..88964e0 100644
--- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
+++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
@@ -279,7 +279,7 @@
}
private void connectWithoutResettingTimer(boolean connectAllProfiles) {
- // Try to initialize the profiles if there were not.
+ // Try to initialize the profiles if they were not.
if (mProfiles.size() == 0) {
if (!updateProfiles()) {
// If UUIDs are not available yet, connect will be happen
@@ -299,7 +299,6 @@
.getProfileManager(mLocalManager, profile);
if (profileManager.isPreferred(mDevice)) {
++preferredProfiles;
- disconnectConnected(this, profile);
connectInt(this, profile);
}
}
@@ -322,7 +321,6 @@
LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
.getProfileManager(mLocalManager, profile);
profileManager.setPreferred(mDevice, true);
- disconnectConnected(this, profile);
connectInt(this, profile);
}
}
@@ -332,25 +330,9 @@
mConnectAttempted = SystemClock.elapsedRealtime();
// Reset the only-show-one-error-dialog tracking variable
mIsConnectingErrorPossible = true;
- disconnectConnected(this, profile);
connectInt(this, profile);
}
- private void disconnectConnected(CachedBluetoothDevice device, Profile profile) {
- LocalBluetoothProfileManager profileManager =
- LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
- CachedBluetoothDeviceManager cachedDeviceManager = mLocalManager.getCachedDeviceManager();
- List<BluetoothDevice> devices = profileManager.getConnectedDevices();
- if (devices == null) return;
- for (BluetoothDevice btDevice : devices) {
- CachedBluetoothDevice cachedDevice = cachedDeviceManager.findDevice(btDevice);
-
- if (cachedDevice != null && !cachedDevice.equals(device)) {
- cachedDevice.disconnect(profile);
- }
- }
- }
-
private boolean connectInt(CachedBluetoothDevice cachedDevice, Profile profile) {
if (!cachedDevice.ensurePaired()) return false;
diff --git a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
index 7961281..479cbe0 100644
--- a/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
+++ b/src/com/android/settings/bluetooth/DeviceProfilesSettings.java
@@ -20,8 +20,11 @@
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.bluetooth.LocalBluetoothProfileManager.Profile;
+import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothUuid;
import android.os.Bundle;
+import android.os.ParcelUuid;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.Preference;
@@ -75,6 +78,7 @@
if (device == null) {
Log.w(TAG, "Activity started without a remote Bluetooth device");
finish();
+ return;
}
mManager = LocalBluetoothManager.getInstance(getActivity());
@@ -82,6 +86,7 @@
if (mCachedDevice == null) {
Log.w(TAG, "Device not found, cannot connect to it");
finish();
+ return;
}
addPreferencesFromResource(R.xml.bluetooth_device_advanced);
@@ -89,8 +94,16 @@
mProfileContainer = (PreferenceGroup) findPreference(KEY_PROFILE_CONTAINER);
mAllowIncomingPref = (CheckBoxPreference) findPreference(KEY_ALLOW_INCOMING);
- mAllowIncomingPref.setChecked(isIncomingFileTransfersAllowed());
- mAllowIncomingPref.setOnPreferenceChangeListener(this);
+
+ // Configure incoming file transfer preference if device supports OPP
+ // or else remove the preference item
+ if (isObjectPushSupported(device)) {
+ mAllowIncomingPref.setChecked(isIncomingFileTransfersAllowed());
+ mAllowIncomingPref.setOnPreferenceChangeListener(this);
+ } else {
+ getPreferenceScreen().removePreference(mAllowIncomingPref);
+ mAllowIncomingPref = null;
+ }
mDeviceNamePref = (EditTextPreference) findPreference(KEY_RENAME_DEVICE);
mDeviceNamePref.setSummary(mCachedDevice.getName());
@@ -105,6 +118,15 @@
addPreferencesForProfiles();
}
+ private boolean isObjectPushSupported(BluetoothDevice device) {
+ ParcelUuid[] uuids = device.getUuids();
+ BluetoothClass bluetoothClass = device.getBluetoothClass();
+ return (uuids != null && BluetoothUuid.containsAnyUuid(uuids,
+ LocalBluetoothProfileManager.OPP_PROFILE_UUIDS)) ||
+ (bluetoothClass != null && bluetoothClass.doesClassMatch(
+ BluetoothClass.PROFILE_OPP));
+ }
+
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
index 5c8d868..a2ac743 100644
--- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
+++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java
@@ -471,6 +471,12 @@
@Override
public boolean connect(BluetoothDevice device) {
+ List<BluetoothDevice> sinks = getConnectedDevices();
+ if (sinks != null) {
+ for (BluetoothDevice sink : sinks) {
+ mService.disconnect(sink);
+ }
+ }
return mService.connect(device);
}
@@ -727,6 +733,12 @@
@Override
public boolean connect(BluetoothDevice device) {
+ List<BluetoothDevice> sinks = getConnectedDevices();
+ if (sinks != null) {
+ for (BluetoothDevice sink : sinks) {
+ mService.disconnect(sink);
+ }
+ }
return mService.connect(device);
}
diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java
index 99a8975..e443c1d 100644
--- a/src/com/android/settings/deviceinfo/Status.java
+++ b/src/com/android/settings/deviceinfo/Status.java
@@ -43,6 +43,7 @@
import com.android.internal.telephony.PhoneStateIntentReceiver;
import com.android.internal.telephony.TelephonyProperties;
import com.android.settings.R;
+import com.android.settings.Utils;
import java.lang.ref.WeakReference;
@@ -62,8 +63,22 @@
*/
public class Status extends PreferenceActivity {
+ private static final String KEY_SERVICE_STATE = "service_state";
+ private static final String KEY_OPERATOR_NAME = "operator_name";
+ private static final String KEY_ROAMING_STATE = "roaming_state";
+ private static final String KEY_NETWORK_TYPE = "network_type";
+ private static final String KEY_PHONE_NUMBER = "number";
+ private static final String KEY_IMEI_SV = "imei_sv";
+ private static final String KEY_IMEI = "imei";
+ private static final String KEY_PRL_VERSION = "prl_version";
+ private static final String KEY_MIN_NUMBER = "min_number";
+ private static final String KEY_MEID_NUMBER = "meid_number";
+ private static final String KEY_SIGNAL_STRENGTH = "signal_strength";
+ private static final String KEY_BATTERY_STATUS = "battery_status";
+ private static final String KEY_BATTERY_LEVEL = "battery_level";
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;
@@ -166,69 +181,59 @@
Preference removablePref;
mHandler = new MyHandler(this);
-
+
mTelephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
addPreferencesFromResource(R.xml.device_info_status);
- mBatteryLevel = findPreference("battery_level");
- mBatteryStatus = findPreference("battery_status");
-
+ mBatteryLevel = findPreference(KEY_BATTERY_LEVEL);
+ mBatteryStatus = findPreference(KEY_BATTERY_STATUS);
+
mRes = getResources();
if (sUnknown == null) {
sUnknown = mRes.getString(R.string.device_info_default);
}
-
+
mPhone = PhoneFactory.getDefaultPhone();
// Note - missing in zaku build, be careful later...
- mSignalStrength = findPreference("signal_strength");
+ mSignalStrength = findPreference(KEY_SIGNAL_STRENGTH);
mUptime = findPreference("up_time");
-
+
//NOTE "imei" is the "Device ID" since it represents the IMEI in GSM and the MEID in CDMA
if (mPhone.getPhoneName().equals("CDMA")) {
- setSummaryText("meid_number", mPhone.getMeid());
- setSummaryText("min_number", mPhone.getCdmaMin());
- setSummaryText("prl_version", mPhone.getCdmaPrlVersion());
+ setSummaryText(KEY_MEID_NUMBER, mPhone.getMeid());
+ setSummaryText(KEY_MIN_NUMBER, mPhone.getCdmaMin());
+ setSummaryText(KEY_PRL_VERSION, mPhone.getCdmaPrlVersion());
// device is not GSM/UMTS, do not display GSM/UMTS features
// check Null in case no specified preference in overlay xml
- removablePref = findPreference("imei");
- if (removablePref != null) {
- getPreferenceScreen().removePreference(removablePref);
- }
- removablePref = findPreference("imei_sv");
- if (removablePref != null) {
- getPreferenceScreen().removePreference(removablePref);
- }
+ removePreferenceFromScreen(KEY_IMEI);
+ removePreferenceFromScreen(KEY_IMEI_SV);
} else {
- setSummaryText("imei", mPhone.getDeviceId());
+ setSummaryText(KEY_IMEI, mPhone.getDeviceId());
- setSummaryText("imei_sv",
+ setSummaryText(KEY_IMEI_SV,
((TelephonyManager) getSystemService(TELEPHONY_SERVICE))
.getDeviceSoftwareVersion());
// device is not CDMA, do not display CDMA features
// check Null in case no specified preference in overlay xml
- removablePref = findPreference("prl_version");
- if (removablePref != null) {
- getPreferenceScreen().removePreference(removablePref);
- }
- removablePref = findPreference("meid_number");
- if (removablePref != null) {
- getPreferenceScreen().removePreference(removablePref);
- }
- removablePref = findPreference("min_number");
- if (removablePref != null) {
- getPreferenceScreen().removePreference(removablePref);
- }
+ removePreferenceFromScreen(KEY_PRL_VERSION);
+ removePreferenceFromScreen(KEY_MEID_NUMBER);
+ removePreferenceFromScreen(KEY_MIN_NUMBER);
}
- String rawNumber = mPhone.getLine1Number(); // may be null or empty
- String formattedNumber = null;
- if (!TextUtils.isEmpty(rawNumber)) {
- formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
+ // Remove the phone number preference if the device is not voice capable.
+ if (!Utils.isVoiceCapable(this)) {
+ removePreferenceFromScreen(KEY_PHONE_NUMBER);
+ } else {
+ String rawNumber = mPhone.getLine1Number(); // may be null or empty
+ String formattedNumber = null;
+ if (!TextUtils.isEmpty(rawNumber)) {
+ formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
+ }
+ // If formattedNumber is null or empty, it'll display as "Unknown".
+ setSummaryText(KEY_PHONE_NUMBER, formattedNumber);
}
- // If formattedNumber is null or empty, it'll display as "Unknown".
- setSummaryText("number", formattedNumber);
mPhoneStateReceiver = new PhoneStateIntentReceiver(this, mHandler);
mPhoneStateReceiver.notifySignalStrength(EVENT_SIGNAL_STRENGTH_CHANGED);
@@ -237,7 +242,7 @@
setWifiStatus();
setBtStatus();
}
-
+
@Override
protected void onResume() {
super.onResume();
@@ -266,6 +271,17 @@
}
/**
+ * Removes the specified preference, if it exists.
+ * @param key the key for the Preference item
+ */
+ private void removePreferenceFromScreen(String key) {
+ Preference pref = findPreference(key);
+ if (pref != null) {
+ getPreferenceScreen().removePreference(pref);
+ }
+ }
+
+ /**
* @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
@@ -291,7 +307,7 @@
private void updateNetworkType() {
// Whether EDGE, UMTS, etc...
- setSummary("network_type", TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, sUnknown);
+ setSummary(KEY_NETWORK_TYPE, TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, sUnknown);
}
private void updateDataState() {
@@ -333,14 +349,14 @@
break;
}
- setSummaryText("service_state", display);
+ setSummaryText(KEY_SERVICE_STATE, display);
if (serviceState.getRoaming()) {
- setSummaryText("roaming_state", mRes.getString(R.string.radioInfo_roaming_in));
+ setSummaryText(KEY_ROAMING_STATE, mRes.getString(R.string.radioInfo_roaming_in));
} else {
- setSummaryText("roaming_state", mRes.getString(R.string.radioInfo_roaming_not));
+ setSummaryText(KEY_ROAMING_STATE, mRes.getString(R.string.radioInfo_roaming_not));
}
- setSummaryText("operator_name", serviceState.getOperatorAlphaLong());
+ setSummaryText(KEY_OPERATOR_NAME, serviceState.getOperatorAlphaLong());
}
void updateSignalStrength() {
diff --git a/src/com/android/settings/wifi/AdvancedSettings.java b/src/com/android/settings/wifi/AdvancedSettings.java
index 1968eb0..74948f0 100644
--- a/src/com/android/settings/wifi/AdvancedSettings.java
+++ b/src/com/android/settings/wifi/AdvancedSettings.java
@@ -66,7 +66,8 @@
ListPreference pref = (ListPreference) findPreference(KEY_SLEEP_POLICY);
pref.setOnPreferenceChangeListener(this);
int value = Settings.System.getInt(getContentResolver(),
- Settings.System.WIFI_SLEEP_POLICY, Settings.System.WIFI_SLEEP_POLICY_DEFAULT);
+ Settings.System.WIFI_SLEEP_POLICY,
+ Settings.System.WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED);
pref.setValue(String.valueOf(value));
pref = (ListPreference) findPreference(KEY_FREQUENCY_BAND);