Bluetooth: Dismiss pairing dialog on user click
* Existing pairing dialog should be dismissed when user clicks on Yes/No * In a pairing session with multiple pairing dialogs, this is necessary as otherwise the second pairing dialog will not be shown * Modified unit test to test this behavior * Launch pairing dialog as UserHandle.CURRENT to avoid Context warnings Bug: 35833536 Test: make, unit test, pair with Bluetooth devices Change-Id: I1823b78d287134505f59eab7caca2329ecc3a36f
This commit is contained in:
@@ -52,7 +52,7 @@ public final class BluetoothPairingRequest extends BroadcastReceiver {
|
||||
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);
|
||||
context.startActivityAsUser(pairingIntent, UserHandle.CURRENT);
|
||||
} else {
|
||||
// Put up a notification that leads to the dialog
|
||||
intent.setClass(context, BluetoothPairingService.class);
|
||||
|
Reference in New Issue
Block a user