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 4a7cd75..130c1d5 100644
--- a/src/com/android/nfc/handover/ConfirmConnectActivity.java
+++ b/src/com/android/nfc/handover/ConfirmConnectActivity.java
@@ -47,6 +47,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();
@@ -57,6 +58,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();
@@ -73,6 +75,7 @@
             mAlert.dismiss();
             Intent denyIntent = new Intent(BluetoothPeripheralHandover.ACTION_DENY_CONNECT);
             denyIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
+            denyIntent.setPackage("com.android.nfc");
             sendBroadcast(denyIntent);
         }
     }