diff options
author | Martijn Coenen <maco@google.com> | 2015-04-15 10:07:44 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-15 10:07:44 +0000 |
commit | 741e89121badbe044689c178de371d83770e5f25 (patch) | |
tree | 608738cb577c2899f0c45c5fad811a2f0474c312 | |
parent | b4e218832173229ca2cb25e420c557f919a8ef09 (diff) | |
parent | 1f440cb0b8d2c84fd1bb2e06fcc94d86717f648a (diff) | |
download | frameworks_base-741e89121badbe044689c178de371d83770e5f25.zip frameworks_base-741e89121badbe044689c178de371d83770e5f25.tar.gz frameworks_base-741e89121badbe044689c178de371d83770e5f25.tar.bz2 |
am 1f440cb0: am 895f3c27: am 6a47a861: Merge "Add getPrefixAids()."
* commit '1f440cb0b8d2c84fd1bb2e06fcc94d86717f648a':
Add getPrefixAids().
-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. */ |