summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-09-06 16:45:16 +0200
committerMartijn Coenen <maco@google.com>2012-09-06 16:48:08 +0200
commitf9f309b683526876dae196a706ac520f05eb22c0 (patch)
tree043a764bbe303ae90fdde4a91496b19974af8ddf /src
parenta396754698497971bfa0d7725b6866349f3af6e4 (diff)
downloadpackages_apps_nfc-f9f309b683526876dae196a706ac520f05eb22c0.zip
packages_apps_nfc-f9f309b683526876dae196a706ac520f05eb22c0.tar.gz
packages_apps_nfc-f9f309b683526876dae196a706ac520f05eb22c0.tar.bz2
Do not dispatch empty NDEF tags as NDEF_DISCOVERED.
To avoid encouraging sloppy filtering. This was actually already the behavior pre-JB. Change-Id: I556f250db086b70345123a151378728080b4779c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/nfc/NfcDispatcher.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/nfc/NfcDispatcher.java b/src/com/android/nfc/NfcDispatcher.java
index b3ab97c..f628dea 100644
--- a/src/com/android/nfc/NfcDispatcher.java
+++ b/src/com/android/nfc/NfcDispatcher.java
@@ -305,7 +305,10 @@ public class NfcDispatcher {
if (message == null) {
return false;
}
- dispatch.setNdefIntent();
+ Intent intent = dispatch.setNdefIntent();
+
+ // Bail out if the intent does not contain filterable NDEF data
+ if (intent == null) return false;
// Try to start AAR activity with matching filter
List<String> aarPackages = extractAarPackages(message);