Always show pairing dialog for device-specific keyboard.
Bug: 22876536 Change-Id: Ief9f6343d435747050bb7910f934e4777f5116de
This commit is contained in:
@@ -65,8 +65,10 @@ public final class BluetoothPairingRequest extends BroadcastReceiver {
|
||||
PowerManager powerManager =
|
||||
(PowerManager)context.getSystemService(Context.POWER_SERVICE);
|
||||
String deviceAddress = device != null ? device.getAddress() : null;
|
||||
if (powerManager.isScreenOn() &&
|
||||
LocalBluetoothPreferences.shouldShowDialogInForeground(context, deviceAddress)) {
|
||||
String deviceName = device != null ? device.getName() : null;
|
||||
boolean shouldShowDialog= LocalBluetoothPreferences.shouldShowDialogInForeground(
|
||||
context, deviceAddress, deviceName);
|
||||
if (powerManager.isInteractive() && shouldShowDialog) {
|
||||
// Since the screen is on and the BT-related activity is in the foreground,
|
||||
// just open the dialog
|
||||
context.startActivity(pairingIntent);
|
||||
|
Reference in New Issue
Block a user