diff --git a/res/values/strings.xml b/res/values/strings.xml
index fa0de463cbf..695e0311ca5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -513,11 +513,11 @@
Bluetooth device info
- %1$s\n\nType PIN to pair.\n(Try 0000 or 1234.)
+ %1$s\nType PIN to pair.\n(Try 0000 or 1234.)
- %1$s\n\nType passkey to pair.\n
+ %1$s\nType passkey to pair.\n
- To pair with \u0022%1$s\u0022, confirm that it is showing the passkey: %2$d.
+ To pair with \u0022%1$s\u0022, confirm that it is showing the passkey: %2$s.
Pair
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
index 1e0da903a0d..ac5dfbaa584 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -53,7 +53,7 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
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 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
} 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");