Protect Bluetooth device information when using NFC pairing
Bug: 140417248
Test: Manual test
Merged-In: I22528d6574a5d5db584aab7eb648b5e083598895
Change-Id: Ia9ac9013da05450753c32537d6c2ac26cb930724
(cherry picked from commit 5700c012b29a3220a4a29e761e9c55866c778057)
diff --git a/src/com/android/nfc/handover/ConfirmConnectActivity.java b/src/com/android/nfc/handover/ConfirmConnectActivity.java
index 75310e1..c87fc36 100644
--- a/src/com/android/nfc/handover/ConfirmConnectActivity.java
+++ b/src/com/android/nfc/handover/ConfirmConnectActivity.java
@@ -50,6 +50,7 @@
public void onClick(DialogInterface dialog, int id) {
Intent allowIntent = new Intent(BluetoothPeripheralHandover.ACTION_ALLOW_CONNECT);
allowIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
+ allowIntent.setPackage("com.android.nfc");
sendBroadcast(allowIntent);
ConfirmConnectActivity.this.mAlert = null;
ConfirmConnectActivity.this.finish();
@@ -60,6 +61,7 @@
public void onClick(DialogInterface dialog, int id) {
Intent denyIntent = new Intent(BluetoothPeripheralHandover.ACTION_DENY_CONNECT);
denyIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
+ denyIntent.setPackage("com.android.nfc");
sendBroadcast(denyIntent);
ConfirmConnectActivity.this.mAlert = null;
ConfirmConnectActivity.this.finish();
@@ -79,6 +81,7 @@
mAlert.dismiss();
Intent denyIntent = new Intent(BluetoothPeripheralHandover.ACTION_DENY_CONNECT);
denyIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
+ denyIntent.setPackage("com.android.nfc");
sendBroadcast(denyIntent);
mAlert = null;
}