Loading nfc/api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -124,6 +124,7 @@ package android.nfc { @FlaggedApi("android.nfc.nfc_oem_extension") public abstract class NfcRoutingTableEntry { @FlaggedApi("android.nfc.nfc_oem_extension") public abstract class NfcRoutingTableEntry { method public int getNfceeId(); method public int getNfceeId(); method public int getRouteType(); method public int getType(); method public int getType(); field public static final int TYPE_AID = 0; // 0x0 field public static final int TYPE_AID = 0; // 0x0 field public static final int TYPE_PROTOCOL = 1; // 0x1 field public static final int TYPE_PROTOCOL = 1; // 0x1 Loading nfc/java/android/nfc/Entry.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -25,11 +25,13 @@ public final class Entry implements Parcelable { private final byte mType; private final byte mType; private final byte mNfceeId; private final byte mNfceeId; private final String mEntry; private final String mEntry; private final String mRoutingType; public Entry(String entry, byte type, byte nfceeId) { public Entry(String entry, byte type, byte nfceeId, String routingType) { mEntry = entry; mEntry = entry; mType = type; mType = type; mNfceeId = nfceeId; mNfceeId = nfceeId; mRoutingType = routingType; } } public byte getType() { public byte getType() { Loading @@ -44,6 +46,10 @@ public final class Entry implements Parcelable { return mEntry; return mEntry; } } public String getRoutingType() { return mRoutingType; } @Override @Override public int describeContents() { public int describeContents() { return 0; return 0; Loading @@ -53,6 +59,7 @@ public final class Entry implements Parcelable { this.mEntry = in.readString(); this.mEntry = in.readString(); this.mNfceeId = in.readByte(); this.mNfceeId = in.readByte(); this.mType = in.readByte(); this.mType = in.readByte(); this.mRoutingType = in.readString(); } } public static final @NonNull Parcelable.Creator<Entry> CREATOR = public static final @NonNull Parcelable.Creator<Entry> CREATOR = Loading @@ -73,5 +80,6 @@ public final class Entry implements Parcelable { dest.writeString(mEntry); dest.writeString(mEntry); dest.writeByte(mNfceeId); dest.writeByte(mNfceeId); dest.writeByte(mType); dest.writeByte(mType); dest.writeString(mRoutingType); } } } } nfc/java/android/nfc/NfcOemExtension.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -887,18 +887,22 @@ public final class NfcOemExtension { switch (entry.getType()) { switch (entry.getType()) { case TYPE_TECHNOLOGY -> result.add( case TYPE_TECHNOLOGY -> result.add( new RoutingTableTechnologyEntry(entry.getNfceeId(), new RoutingTableTechnologyEntry(entry.getNfceeId(), RoutingTableTechnologyEntry.techStringToInt(entry.getEntry())) RoutingTableTechnologyEntry.techStringToInt(entry.getEntry()), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_PROTOCOL -> result.add( case TYPE_PROTOCOL -> result.add( new RoutingTableProtocolEntry(entry.getNfceeId(), new RoutingTableProtocolEntry(entry.getNfceeId(), RoutingTableProtocolEntry.protocolStringToInt(entry.getEntry())) RoutingTableProtocolEntry.protocolStringToInt(entry.getEntry()), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_AID -> result.add( case TYPE_AID -> result.add( new RoutingTableAidEntry(entry.getNfceeId(), entry.getEntry()) new RoutingTableAidEntry(entry.getNfceeId(), entry.getEntry(), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_SYSTEMCODE -> result.add( case TYPE_SYSTEMCODE -> result.add( new RoutingTableSystemCodeEntry(entry.getNfceeId(), new RoutingTableSystemCodeEntry(entry.getNfceeId(), entry.getEntry().getBytes(StandardCharsets.UTF_8)) entry.getEntry().getBytes(StandardCharsets.UTF_8), routeStringToInt(entry.getRoutingType())) ); ); } } } } Loading nfc/java/android/nfc/NfcRoutingTableEntry.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.nfc; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntDef; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.nfc.cardemulation.CardEmulation; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; Loading @@ -35,6 +36,7 @@ import java.lang.annotation.RetentionPolicy; public abstract class NfcRoutingTableEntry { public abstract class NfcRoutingTableEntry { private final int mNfceeId; private final int mNfceeId; private final int mType; private final int mType; private final int mRouteType; /** /** * AID routing table type. * AID routing table type. Loading Loading @@ -67,9 +69,11 @@ public abstract class NfcRoutingTableEntry { public @interface RoutingTableType {} public @interface RoutingTableType {} /** @hide */ /** @hide */ protected NfcRoutingTableEntry(int nfceeId, @RoutingTableType int type) { protected NfcRoutingTableEntry(int nfceeId, @RoutingTableType int type, @CardEmulation.ProtocolAndTechnologyRoute int routeType) { mNfceeId = nfceeId; mNfceeId = nfceeId; mType = type; mType = type; mRouteType = routeType; } } /** /** Loading @@ -88,4 +92,14 @@ public abstract class NfcRoutingTableEntry { public int getType() { public int getType() { return mType; return mType; } } /** * Get the route type of this entry. * @return an integer defined in * {@link android.nfc.cardemulation.CardEmulation.ProtocolAndTechnologyRoute} */ @CardEmulation.ProtocolAndTechnologyRoute public int getRouteType() { return mRouteType; } } } nfc/java/android/nfc/RoutingTableAidEntry.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.nfc; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.NonNull; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.nfc.cardemulation.CardEmulation; /** /** * Represents an Application ID (AID) entry in current routing table. * Represents an Application ID (AID) entry in current routing table. Loading @@ -29,8 +30,9 @@ public class RoutingTableAidEntry extends NfcRoutingTableEntry { private final String mValue; private final String mValue; /** @hide */ /** @hide */ public RoutingTableAidEntry(int nfceeId, String value) { public RoutingTableAidEntry(int nfceeId, String value, super(nfceeId, TYPE_AID); @CardEmulation.ProtocolAndTechnologyRoute int routeType) { super(nfceeId, TYPE_AID, routeType); this.mValue = value; this.mValue = value; } } Loading Loading
nfc/api/system-current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -124,6 +124,7 @@ package android.nfc { @FlaggedApi("android.nfc.nfc_oem_extension") public abstract class NfcRoutingTableEntry { @FlaggedApi("android.nfc.nfc_oem_extension") public abstract class NfcRoutingTableEntry { method public int getNfceeId(); method public int getNfceeId(); method public int getRouteType(); method public int getType(); method public int getType(); field public static final int TYPE_AID = 0; // 0x0 field public static final int TYPE_AID = 0; // 0x0 field public static final int TYPE_PROTOCOL = 1; // 0x1 field public static final int TYPE_PROTOCOL = 1; // 0x1 Loading
nfc/java/android/nfc/Entry.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -25,11 +25,13 @@ public final class Entry implements Parcelable { private final byte mType; private final byte mType; private final byte mNfceeId; private final byte mNfceeId; private final String mEntry; private final String mEntry; private final String mRoutingType; public Entry(String entry, byte type, byte nfceeId) { public Entry(String entry, byte type, byte nfceeId, String routingType) { mEntry = entry; mEntry = entry; mType = type; mType = type; mNfceeId = nfceeId; mNfceeId = nfceeId; mRoutingType = routingType; } } public byte getType() { public byte getType() { Loading @@ -44,6 +46,10 @@ public final class Entry implements Parcelable { return mEntry; return mEntry; } } public String getRoutingType() { return mRoutingType; } @Override @Override public int describeContents() { public int describeContents() { return 0; return 0; Loading @@ -53,6 +59,7 @@ public final class Entry implements Parcelable { this.mEntry = in.readString(); this.mEntry = in.readString(); this.mNfceeId = in.readByte(); this.mNfceeId = in.readByte(); this.mType = in.readByte(); this.mType = in.readByte(); this.mRoutingType = in.readString(); } } public static final @NonNull Parcelable.Creator<Entry> CREATOR = public static final @NonNull Parcelable.Creator<Entry> CREATOR = Loading @@ -73,5 +80,6 @@ public final class Entry implements Parcelable { dest.writeString(mEntry); dest.writeString(mEntry); dest.writeByte(mNfceeId); dest.writeByte(mNfceeId); dest.writeByte(mType); dest.writeByte(mType); dest.writeString(mRoutingType); } } } }
nfc/java/android/nfc/NfcOemExtension.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -887,18 +887,22 @@ public final class NfcOemExtension { switch (entry.getType()) { switch (entry.getType()) { case TYPE_TECHNOLOGY -> result.add( case TYPE_TECHNOLOGY -> result.add( new RoutingTableTechnologyEntry(entry.getNfceeId(), new RoutingTableTechnologyEntry(entry.getNfceeId(), RoutingTableTechnologyEntry.techStringToInt(entry.getEntry())) RoutingTableTechnologyEntry.techStringToInt(entry.getEntry()), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_PROTOCOL -> result.add( case TYPE_PROTOCOL -> result.add( new RoutingTableProtocolEntry(entry.getNfceeId(), new RoutingTableProtocolEntry(entry.getNfceeId(), RoutingTableProtocolEntry.protocolStringToInt(entry.getEntry())) RoutingTableProtocolEntry.protocolStringToInt(entry.getEntry()), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_AID -> result.add( case TYPE_AID -> result.add( new RoutingTableAidEntry(entry.getNfceeId(), entry.getEntry()) new RoutingTableAidEntry(entry.getNfceeId(), entry.getEntry(), routeStringToInt(entry.getRoutingType())) ); ); case TYPE_SYSTEMCODE -> result.add( case TYPE_SYSTEMCODE -> result.add( new RoutingTableSystemCodeEntry(entry.getNfceeId(), new RoutingTableSystemCodeEntry(entry.getNfceeId(), entry.getEntry().getBytes(StandardCharsets.UTF_8)) entry.getEntry().getBytes(StandardCharsets.UTF_8), routeStringToInt(entry.getRoutingType())) ); ); } } } } Loading
nfc/java/android/nfc/NfcRoutingTableEntry.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.nfc; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntDef; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.nfc.cardemulation.CardEmulation; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; Loading @@ -35,6 +36,7 @@ import java.lang.annotation.RetentionPolicy; public abstract class NfcRoutingTableEntry { public abstract class NfcRoutingTableEntry { private final int mNfceeId; private final int mNfceeId; private final int mType; private final int mType; private final int mRouteType; /** /** * AID routing table type. * AID routing table type. Loading Loading @@ -67,9 +69,11 @@ public abstract class NfcRoutingTableEntry { public @interface RoutingTableType {} public @interface RoutingTableType {} /** @hide */ /** @hide */ protected NfcRoutingTableEntry(int nfceeId, @RoutingTableType int type) { protected NfcRoutingTableEntry(int nfceeId, @RoutingTableType int type, @CardEmulation.ProtocolAndTechnologyRoute int routeType) { mNfceeId = nfceeId; mNfceeId = nfceeId; mType = type; mType = type; mRouteType = routeType; } } /** /** Loading @@ -88,4 +92,14 @@ public abstract class NfcRoutingTableEntry { public int getType() { public int getType() { return mType; return mType; } } /** * Get the route type of this entry. * @return an integer defined in * {@link android.nfc.cardemulation.CardEmulation.ProtocolAndTechnologyRoute} */ @CardEmulation.ProtocolAndTechnologyRoute public int getRouteType() { return mRouteType; } } }
nfc/java/android/nfc/RoutingTableAidEntry.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.nfc; import android.annotation.FlaggedApi; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.NonNull; import android.annotation.SystemApi; import android.annotation.SystemApi; import android.nfc.cardemulation.CardEmulation; /** /** * Represents an Application ID (AID) entry in current routing table. * Represents an Application ID (AID) entry in current routing table. Loading @@ -29,8 +30,9 @@ public class RoutingTableAidEntry extends NfcRoutingTableEntry { private final String mValue; private final String mValue; /** @hide */ /** @hide */ public RoutingTableAidEntry(int nfceeId, String value) { public RoutingTableAidEntry(int nfceeId, String value, super(nfceeId, TYPE_AID); @CardEmulation.ProtocolAndTechnologyRoute int routeType) { super(nfceeId, TYPE_AID, routeType); this.mValue = value; this.mValue = value; } } Loading