Protect Bluetooth device information when using NFC pairing

Bug: 140417248
Issue: FP3SEC-583
Test: Manual test
Change-Id: Ia9ac9013da05450753c32537d6c2ac26cb930724
(cherry picked from commit d30b6d4447c2965aef72b30527bceb577ff5ff52)
(cherry picked from commit d0ef643b2c5933b17d792bfb10ec06142621deec)
diff --git a/src/com/android/nfc/handover/ConfirmConnectActivity.java b/src/com/android/nfc/handover/ConfirmConnectActivity.java
index 72fcb78..f226604 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.handover");
                         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.handover");
                        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.handover");
             sendBroadcast(denyIntent);
             mAlert = null;
         }