Add new pairing dialog for keyboard pairings.
Change-Id: I672a3d874a7876fca6bd38091444dc9c5fb3a2f1
This commit is contained in:
@@ -55,9 +55,11 @@ public class BluetoothPairingRequest extends BroadcastReceiver {
|
||||
pairingIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
|
||||
pairingIntent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, type);
|
||||
if (type == BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION ||
|
||||
type == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) {
|
||||
int passkey = intent.getIntExtra(BluetoothDevice.EXTRA_PASSKEY, BluetoothDevice.ERROR);
|
||||
pairingIntent.putExtra(BluetoothDevice.EXTRA_PASSKEY, passkey);
|
||||
type == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY ||
|
||||
type == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN) {
|
||||
int pairingKey = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_KEY,
|
||||
BluetoothDevice.ERROR);
|
||||
pairingIntent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pairingKey);
|
||||
}
|
||||
pairingIntent.setAction(BluetoothDevice.ACTION_PAIRING_REQUEST);
|
||||
pairingIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
Reference in New Issue
Block a user