diff options
author | Martijn Coenen <maco@google.com> | 2015-04-15 08:00:10 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-15 08:00:13 +0000 |
commit | 6a47a86112e271d200f77d5ec66f5f50979135ca (patch) | |
tree | 9287b2a349c71009fe6ad354b5c5fafdb34badf0 /core | |
parent | 82992b7270842637d1af3dcc7c9ae954bdfa312c (diff) | |
parent | ed3a29ea08eec2676fe157c92948d1a7e3c215a3 (diff) | |
download | frameworks_base-6a47a86112e271d200f77d5ec66f5f50979135ca.zip frameworks_base-6a47a86112e271d200f77d5ec66f5f50979135ca.tar.gz frameworks_base-6a47a86112e271d200f77d5ec66f5f50979135ca.tar.bz2 |
Merge "Add getPrefixAids()."
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/nfc/cardemulation/ApduServiceInfo.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java index 00b2ee3..f10e530 100644 --- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java +++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java @@ -40,6 +40,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -262,7 +263,7 @@ public final class ApduServiceInfo implements Parcelable { * for that category. * @return List of AIDs registered by the service */ - public ArrayList<String> getAids() { + public List<String> getAids() { final ArrayList<String> aids = new ArrayList<String>(); for (AidGroup group : getAidGroups()) { aids.addAll(group.aids); @@ -270,6 +271,18 @@ public final class ApduServiceInfo implements Parcelable { return aids; } + public List<String> getPrefixAids() { + final ArrayList<String> prefixAids = new ArrayList<String>(); + for (AidGroup group : getAidGroups()) { + for (String aid : group.aids) { + if (aid.endsWith("*")) { + prefixAids.add(aid); + } + } + } + return prefixAids; + } + /** * Returns the registered AID group for this category. */ |