Loading core/java/android/nfc/cardemulation/AidGroup.java +5 −6 Original line number Diff line number Diff line Loading @@ -15,10 +15,6 @@ import android.util.Log; /** * The AidGroup class represents a group of Application Identifiers (AIDs). * * <p>An instance of this object can be used with * {@link CardEmulation#registerAidsForService(android.content.ComponentName, String, java.util.List)} * to tell the OS which AIDs are handled by your HCE- or SE-based service. * * <p>The format of AIDs is defined in the ISO/IEC 7816-4 specification. This class * requires the AIDs to be input as a hexadecimal string, with an even amount of * hexadecimal characters, e.g. "F014811481". Loading Loading @@ -60,7 +56,10 @@ public final class AidGroup implements Parcelable { } else { this.category = CardEmulation.CATEGORY_OTHER; } this.aids = aids; this.aids = new ArrayList<String>(aids.size()); for (String aid : aids) { this.aids.add(aid.toUpperCase()); } this.description = null; } Loading Loading @@ -144,7 +143,7 @@ public final class AidGroup implements Parcelable { if (inGroup) { String aid = parser.getAttributeValue(null, "value"); if (aid != null) { aids.add(aid); aids.add(aid.toUpperCase()); } } else { Log.d(TAG, "Ignoring <aid> tag while not in group"); Loading core/java/android/nfc/cardemulation/ApduServiceInfo.java +3 −3 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ public final class ApduServiceInfo implements Parcelable { public String getCategoryForAid(String aid) { ArrayList<AidGroup> groups = getAidGroups(); for (AidGroup group : groups) { if (group.aids.contains(aid)) { if (group.aids.contains(aid.toUpperCase())) { return group.category; } } Loading Loading @@ -425,7 +425,7 @@ public final class ApduServiceInfo implements Parcelable { public ApduServiceInfo createFromParcel(Parcel source) { ResolveInfo info = ResolveInfo.CREATOR.createFromParcel(source); String description = source.readString(); boolean onHost = (source.readInt() != 0) ? true : false; boolean onHost = source.readInt() != 0; ArrayList<AidGroup> staticAidGroups = new ArrayList<AidGroup>(); int numStaticGroups = source.readInt(); if (numStaticGroups > 0) { Loading @@ -436,7 +436,7 @@ public final class ApduServiceInfo implements Parcelable { if (numDynamicGroups > 0) { source.readTypedList(dynamicAidGroups, AidGroup.CREATOR); } boolean requiresUnlock = (source.readInt() != 0) ? true : false; boolean requiresUnlock = source.readInt() != 0; int bannerResource = source.readInt(); int uid = source.readInt(); return new ApduServiceInfo(info, onHost, description, staticAidGroups, Loading Loading
core/java/android/nfc/cardemulation/AidGroup.java +5 −6 Original line number Diff line number Diff line Loading @@ -15,10 +15,6 @@ import android.util.Log; /** * The AidGroup class represents a group of Application Identifiers (AIDs). * * <p>An instance of this object can be used with * {@link CardEmulation#registerAidsForService(android.content.ComponentName, String, java.util.List)} * to tell the OS which AIDs are handled by your HCE- or SE-based service. * * <p>The format of AIDs is defined in the ISO/IEC 7816-4 specification. This class * requires the AIDs to be input as a hexadecimal string, with an even amount of * hexadecimal characters, e.g. "F014811481". Loading Loading @@ -60,7 +56,10 @@ public final class AidGroup implements Parcelable { } else { this.category = CardEmulation.CATEGORY_OTHER; } this.aids = aids; this.aids = new ArrayList<String>(aids.size()); for (String aid : aids) { this.aids.add(aid.toUpperCase()); } this.description = null; } Loading Loading @@ -144,7 +143,7 @@ public final class AidGroup implements Parcelable { if (inGroup) { String aid = parser.getAttributeValue(null, "value"); if (aid != null) { aids.add(aid); aids.add(aid.toUpperCase()); } } else { Log.d(TAG, "Ignoring <aid> tag while not in group"); Loading
core/java/android/nfc/cardemulation/ApduServiceInfo.java +3 −3 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ public final class ApduServiceInfo implements Parcelable { public String getCategoryForAid(String aid) { ArrayList<AidGroup> groups = getAidGroups(); for (AidGroup group : groups) { if (group.aids.contains(aid)) { if (group.aids.contains(aid.toUpperCase())) { return group.category; } } Loading Loading @@ -425,7 +425,7 @@ public final class ApduServiceInfo implements Parcelable { public ApduServiceInfo createFromParcel(Parcel source) { ResolveInfo info = ResolveInfo.CREATOR.createFromParcel(source); String description = source.readString(); boolean onHost = (source.readInt() != 0) ? true : false; boolean onHost = source.readInt() != 0; ArrayList<AidGroup> staticAidGroups = new ArrayList<AidGroup>(); int numStaticGroups = source.readInt(); if (numStaticGroups > 0) { Loading @@ -436,7 +436,7 @@ public final class ApduServiceInfo implements Parcelable { if (numDynamicGroups > 0) { source.readTypedList(dynamicAidGroups, AidGroup.CREATOR); } boolean requiresUnlock = (source.readInt() != 0) ? true : false; boolean requiresUnlock = source.readInt() != 0; int bannerResource = source.readInt(); int uid = source.readInt(); return new ApduServiceInfo(info, onHost, description, staticAidGroups, Loading