Merge "Show Bluetooth dialog in a specific case" am: e1e657dac3

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

Change-Id: I9e231ac0e16c8e8217be53cc89335758b14be6a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hieu Dang
2023-02-14 02:02:08 +00:00
committed by Automerger Merge Worker
3 changed files with 22 additions and 8 deletions

View File

@@ -50,10 +50,8 @@ public final class BluetoothPairingRequest extends BroadcastReceiver {
PowerManager powerManager = context.getSystemService(PowerManager.class);
int pairingVariant = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT,
BluetoothDevice.ERROR);
String deviceAddress = device != null ? device.getAddress() : null;
String deviceName = device != null ? device.getName() : null;
boolean shouldShowDialog = LocalBluetoothPreferences.shouldShowDialogInForeground(
context, deviceAddress, deviceName);
context, device);
// Skips consent pairing dialog if the device was recently associated with CDM
if (pairingVariant == BluetoothDevice.PAIRING_VARIANT_CONSENT