Merge "Merge "Fix pairing dialog doesn't show the correct pairing key." into sc-dev am: 4f9d0f4eb4 am: 9e9c2508bf" into sc-v2-dev-plus-aosp am: e959cc554f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14730711

Change-Id: Icf4d8d743fe6fef9949402dddb961d653032e2c0
This commit is contained in:
Automerger Merge Worker
2021-05-26 11:35:34 +00:00

View File

@@ -177,6 +177,15 @@ public final class BluetoothPairingService extends Service {
pairingDialogIntent.setClass(this, BluetoothPairingService.class); pairingDialogIntent.setClass(this, BluetoothPairingService.class);
pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice); pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, type); pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, type);
if (type == BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION
|| type == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY
|| type == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN) {
int pairingKey = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_KEY,
BluetoothDevice.ERROR);
pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_PAIRING_KEY, pairingKey);
}
PendingIntent pairIntent = PendingIntent.getService(this, 0, pairingDialogIntent, PendingIntent pairIntent = PendingIntent.getService(this, 0, pairingDialogIntent,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE); PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);