Add bluetooth package to permission request intent

Limit the component that may resolve this intent to the
bluetooth package.

Bug: 158219161
Test: Security Fix
Tag: #security
Change-Id: If732f940a7aa256f5975349118e8eb6cf5584676
This commit is contained in:
Chris Manton
2020-11-10 16:45:44 -08:00
committed by Jakub Pawlowski
parent e615d96b9b
commit 1951d27669

View File

@@ -131,6 +131,7 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
// "Clear All Notifications" button
Intent deleteIntent = new Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REPLY);
deleteIntent.setPackage("com.android.bluetooth");
deleteIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
deleteIntent.putExtra(BluetoothDevice.EXTRA_CONNECTION_ACCESS_RESULT,
BluetoothDevice.CONNECTION_ACCESS_NO);