b/2050798 Bluetooth Passkeys should always be 6 digits so show leading zeros if needed.

Removed extra new lines in the passkey and pin dialogs because the string didn't fit in landscape mode. (scrollbars to appeared)
This commit is contained in:
Michael Chan
2009-09-02 12:30:05 -07:00
parent 684736a9d4
commit 77395cc39c
2 changed files with 7 additions and 6 deletions

View File

@@ -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");