Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f9d0f4e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix pairing dialog doesn't show the correct pairing key." into sc-dev

parents 7164ec88 c4912162
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -177,6 +177,15 @@ public final class BluetoothPairingService extends Service {
        pairingDialogIntent.setClass(this, BluetoothPairingService.class);
        pairingDialogIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
        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.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);