Merge change 23701 into eclair
* changes:
Fix bug 2088099 where the TTS example doesn't play in the Settings app when the UI is in Japanese. Rewrite of the initialization of the default language in the TTS Settings. The previous implementation had the following issues: - the "Listen to an example" didn't use the default settings - the string used for the example didn't match the selected language (this was in order to not imply that TTS is doing translation, but that proved confusing to users). The language initialization is now implemented in initDefaultLang() and ensures that the default locale is one supported in the array of available locales. The speech rate is also initialized from the settings or the default rate (if no value was stored in the settings).
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d4f9381..47d8c4d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -443,6 +443,7 @@
<activity android:name=".bluetooth.BluetoothPairingDialog"
android:label="@string/bluetooth_pin_entry"
+ android:excludeFromRecents="true"
android:theme="@*android:style/Theme.Dialog.Alert">
<intent-filter>
<action android:name="android.bluetooth.intent.action.PAIRING_REQUEST" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2af9b18..a73f910 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -513,11 +513,11 @@
<!-- Title for the bluetooth device info screen. -->
<string name="bluetooth_device_info">Bluetooth device info</string>
<!-- Message when bluetooth dialog for pin entry is showing -->
- <string name="bluetooth_enter_pin_msg"><xliff:g id="device_name">%1$s</xliff:g>\n\nType PIN to pair.\n(Try 0000 or 1234.)</string>
+ <string name="bluetooth_enter_pin_msg"><xliff:g id="device_name">%1$s</xliff:g>\nType PIN to pair.\n(Try 0000 or 1234.)</string>
<!-- Message when bluetooth dialog for passkey entry is showing -->
- <string name="bluetooth_enter_passkey_msg"><xliff:g id="device_name">%1$s</xliff:g>\n\nType passkey to pair.\n</string>
+ <string name="bluetooth_enter_passkey_msg"><xliff:g id="device_name">%1$s</xliff:g>\nType passkey to pair.\n</string>
<!-- Message when bluetooth dialog for confirmation of passkey is showing -->
- <string name="bluetooth_confirm_passkey_msg">To pair with \u0022<xliff:g id="device_name">%1$s</xliff:g>\u0022, confirm that it is showing the passkey: <xliff:g id="passkey">%2$d</xliff:g>.</string>
+ <string name="bluetooth_confirm_passkey_msg">To pair with \u0022<xliff:g id="device_name">%1$s</xliff:g>\u0022, confirm that it is showing the passkey: <xliff:g id="passkey">%2$s</xliff:g>.</string>
<!-- Button text for accepting an incoming pairing request -->
<string name="bluetooth_pairing_accept">Pair</string>
<!-- Button text for declining an incoming pairing request -->
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
index b5c9ec1..68ec653 100644
--- a/src/com/android/settings/WirelessSettings.java
+++ b/src/com/android/settings/WirelessSettings.java
@@ -85,8 +85,8 @@
super.onResume();
mWifiEnabler.resume();
- mAirplaneModeEnabler.resume();
mBtEnabler.resume();
+ mAirplaneModeEnabler.resume();
}
@Override
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
index 1e0da90..ac5dfba 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -53,7 +53,7 @@
private LocalBluetoothManager mLocalManager;
private BluetoothDevice mDevice;
private int mType;
- private int mConfirmationPasskey;
+ private String mConfirmationPasskey;
private EditText mPairingView;
private Button mOkButton;
@@ -95,12 +95,13 @@
} else if (mType == BluetoothDevice.PAIRING_VARIANT_PASSKEY) {
createUserEntryDialog();
} else if (mType == BluetoothDevice.PAIRING_VARIANT_CONFIRMATION){
- mConfirmationPasskey =
+ int passkey =
intent.getIntExtra(BluetoothIntent.PASSKEY, BluetoothClass.ERROR);
- if (mConfirmationPasskey == BluetoothClass.ERROR) {
+ if (passkey == BluetoothClass.ERROR) {
Log.e(TAG, "Invalid ConfirmationPasskey received, not showing any dialog");
return;
}
+ mConfirmationPasskey = String.format("%06d", passkey);
createConfirmationDialog();
} else {
Log.e(TAG, "Incorrect pairing type received, not showing any dialog");