Merge change 22303 into eclair
* changes: Show error messages when Authentication fails.
This commit is contained in:
@@ -80,6 +80,7 @@ public class BluetoothEventRedirector {
|
|||||||
if (bondState == BluetoothDevice.BOND_NOT_BONDED) {
|
if (bondState == BluetoothDevice.BOND_NOT_BONDED) {
|
||||||
int reason = intent.getIntExtra(BluetoothIntent.REASON, BluetoothError.ERROR);
|
int reason = intent.getIntExtra(BluetoothIntent.REASON, BluetoothError.ERROR);
|
||||||
if (reason == BluetoothDevice.UNBOND_REASON_AUTH_REJECTED ||
|
if (reason == BluetoothDevice.UNBOND_REASON_AUTH_REJECTED ||
|
||||||
|
reason == BluetoothDevice.UNBOND_REASON_AUTH_FAILED ||
|
||||||
reason == BluetoothDevice.UNBOND_REASON_REMOTE_DEVICE_DOWN) {
|
reason == BluetoothDevice.UNBOND_REASON_REMOTE_DEVICE_DOWN) {
|
||||||
mManager.getCachedDeviceManager().onBondingError(device, reason);
|
mManager.getCachedDeviceManager().onBondingError(device, reason);
|
||||||
}
|
}
|
||||||
|
@@ -230,11 +230,7 @@ public class BluetoothPairingDialog extends AlertActivity implements DialogInter
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onCancel() {
|
private void onCancel() {
|
||||||
if (mType == BluetoothDevice.PAIRING_VARIANT_CONFIRMATION) {
|
mDevice.cancelPairingUserInput();
|
||||||
mDevice.setPairingConfirmation(false);
|
|
||||||
} else {
|
|
||||||
mDevice.cancelPairingUserInput();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
Reference in New Issue
Block a user