summaryrefslogtreecommitdiffstats
path: root/src/com/android/nfc
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2011-09-06 17:04:42 -0500
committerJeff Hamilton <jham@android.com>2011-09-06 17:04:42 -0500
commit14a4b124592b50dcec47d9b07232fff0188a4e02 (patch)
tree0886431a7766bb76ac52c73c940855c241cb5228 /src/com/android/nfc
parent8745d0aefb801df1789bc70c5765b4b288b1e159 (diff)
downloadpackages_apps_nfc-14a4b124592b50dcec47d9b07232fff0188a4e02.zip
packages_apps_nfc-14a4b124592b50dcec47d9b07232fff0188a4e02.tar.gz
packages_apps_nfc-14a4b124592b50dcec47d9b07232fff0188a4e02.tar.bz2
Include stopped apps when broadcasting SE events.
Bug: 5249686 Change-Id: I5b3f2708ef28de58655ac2901f85f0575210f01c
Diffstat (limited to 'src/com/android/nfc')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index a4b6de7..0102680 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1419,7 +1419,7 @@ public class NfcService extends Application implements DeviceHostListener {
aidIntent.setAction(ACTION_AID_SELECTED);
aidIntent.putExtra(EXTRA_AID, aid);
if (DBG) Log.d(TAG, "Broadcasting " + ACTION_AID_SELECTED);
- mContext.sendBroadcast(aidIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(aidIntent);
break;
case MSG_SE_EMV_CARD_REMOVAL:
@@ -1428,7 +1428,7 @@ public class NfcService extends Application implements DeviceHostListener {
Intent cardRemovalIntent = new Intent();
cardRemovalIntent.setAction(ACTION_EMV_CARD_REMOVAL);
if (DBG) Log.d(TAG, "Broadcasting " + ACTION_EMV_CARD_REMOVAL);
- mContext.sendBroadcast(cardRemovalIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(cardRemovalIntent);
break;
case MSG_SE_APDU_RECEIVED:
@@ -1441,7 +1441,7 @@ public class NfcService extends Application implements DeviceHostListener {
apduReceivedIntent.putExtra(EXTRA_APDU_BYTES, apduBytes);
}
if (DBG) Log.d(TAG, "Broadcasting " + ACTION_APDU_RECEIVED);
- mContext.sendBroadcast(apduReceivedIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(apduReceivedIntent);
break;
case MSG_SE_MIFARE_ACCESS:
@@ -1456,7 +1456,7 @@ public class NfcService extends Application implements DeviceHostListener {
mifareAccessIntent.putExtra(EXTRA_MIFARE_BLOCK, mifareBlock);
}
if (DBG) Log.d(TAG, "Broadcasting " + ACTION_MIFARE_ACCESS_DETECTED);
- mContext.sendBroadcast(mifareAccessIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(mifareAccessIntent);
break;
case MSG_LLCP_LINK_ACTIVATION:
@@ -1500,7 +1500,7 @@ public class NfcService extends Application implements DeviceHostListener {
if (DBG) Log.d(TAG, "SE FIELD ACTIVATED");
Intent eventFieldOnIntent = new Intent();
eventFieldOnIntent.setAction(ACTION_RF_FIELD_ON_DETECTED);
- mContext.sendBroadcast(eventFieldOnIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(eventFieldOnIntent);
break;
}
@@ -1508,7 +1508,7 @@ public class NfcService extends Application implements DeviceHostListener {
if (DBG) Log.d(TAG, "SE FIELD DEACTIVATED");
Intent eventFieldOffIntent = new Intent();
eventFieldOffIntent.setAction(ACTION_RF_FIELD_OFF_DETECTED);
- mContext.sendBroadcast(eventFieldOffIntent, NFCEE_ADMIN_PERM);
+ sendSeBroadcast(eventFieldOffIntent);
break;
}
@@ -1518,6 +1518,11 @@ public class NfcService extends Application implements DeviceHostListener {
}
}
+ private void sendSeBroadcast(Intent intent) {
+ intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
+ mContext.sendBroadcast(intent, NFCEE_ADMIN_PERM);
+ }
+
private boolean llcpActivated(NfcDepEndpoint device) {
Log.d(TAG, "LLCP Activation message");