Don't show the same activity multiple times.
Bug: 3398076
Change-Id: Ib1a0ac03299f713b00bc93de2e8bb7a3b531711c
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 36a21ef..6d627de 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -2742,7 +2742,10 @@
for (ComponentInfo info : registered) {
// Don't allow wild card matching
if (filterMatch(tagTechs, info.techs)) {
- matches.add(info.resolveInfo);
+ // Add the activity as a match if it's not already in the list
+ if (!matches.contains(info.resolveInfo)) {
+ matches.add(info.resolveInfo);
+ }
}
}