Show Bluetooth dialog in a specific case
If the application that initiate the bonding with BluetoothDevice#createBond is in foreground, then should dialog only instead of showing the notification & dialog Bug: 175931562 Tag: #refactor Test: manual Change-Id: I3673a0b58cbf9caabf62c951b84b49e17cfb13b8
This commit is contained in:
@@ -108,8 +108,6 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
|
||||
mRequestType);
|
||||
connectionAccessIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
|
||||
|
||||
String deviceAddress = mDevice != null ? mDevice.getAddress() : null;
|
||||
String deviceName = mDevice != null ? mDevice.getName() : null;
|
||||
String title = null;
|
||||
String message = null;
|
||||
PowerManager powerManager =
|
||||
@@ -117,7 +115,7 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
|
||||
|
||||
if (powerManager.isScreenOn()
|
||||
&& LocalBluetoothPreferences.shouldShowDialogInForeground(
|
||||
context, deviceAddress, deviceName)) {
|
||||
context, mDevice)) {
|
||||
context.startActivity(connectionAccessIntent);
|
||||
} else {
|
||||
// Put up a notification that leads to the dialog
|
||||
|
Reference in New Issue
Block a user