Skip to content

Commit a559aa4

Browse files
Martijn CoenenNick Pelly
authored andcommitted
Fix technology extra naming for IsoDep and NfcB (API part).
Change-Id: Iaa8f1b4dec5d626ffb17a33d71d2f92dd0d99636
1 parent 8f49c02 commit a559aa4

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

core/java/android/nfc/technology/IsoDep.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@
3939
*/
4040
public final class IsoDep extends BasicTagTechnology {
4141
/** @hide */
42-
public static final String EXTRA_ATTRIB = "attrib";
42+
public static final String EXTRA_HI_LAYER_RESP = "hiresp";
4343
/** @hide */
4444
public static final String EXTRA_HIST_BYTES = "histbytes";
4545

46-
private byte[] mAttrib = null;
46+
private byte[] mHiLayerResponse = null;
4747
private byte[] mHistBytes = null;
4848

4949
public IsoDep(NfcAdapter adapter, Tag tag, Bundle extras)
5050
throws RemoteException {
5151
super(adapter, tag, TagTechnology.ISO_DEP);
5252
if (extras != null) {
53-
mAttrib = extras.getByteArray(EXTRA_ATTRIB);
53+
mHiLayerResponse = extras.getByteArray(EXTRA_HI_LAYER_RESP);
5454
mHistBytes = extras.getByteArray(EXTRA_HIST_BYTES);
5555
}
5656
}
@@ -63,5 +63,5 @@ public IsoDep(NfcAdapter adapter, Tag tag, Bundle extras)
6363
/**
6464
* 3B only
6565
*/
66-
public byte[] getAttrib() { return mAttrib; }
66+
public byte[] getHiLayerResponse() { return mHiLayerResponse; }
6767
}

core/java/android/nfc/technology/NfcB.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,34 @@
3737
*/
3838
public final class NfcB extends BasicTagTechnology {
3939
/** @hide */
40-
public static final String EXTRA_ATQB = "atqb";
40+
public static final String EXTRA_APPDATA = "appdata";
41+
/** @hide */
42+
public static final String EXTRA_PROTINFO = "protinfo";
4143

42-
private byte[] mAtqb;
44+
private byte[] mAppData;
45+
private byte[] mProtInfo;
4346

4447
public NfcB(NfcAdapter adapter, Tag tag, Bundle extras)
4548
throws RemoteException {
4649
super(adapter, tag, TagTechnology.NFC_B);
47-
mAtqb = extras.getByteArray(EXTRA_ATQB);
50+
mAppData = extras.getByteArray(EXTRA_APPDATA);
51+
mProtInfo = extras.getByteArray(EXTRA_PROTINFO);
52+
}
53+
54+
/**
55+
* Returns the Application Data bytes from the ATQB/SENSB_RES
56+
* bytes discovered at tag discovery.
57+
*/
58+
public byte[] getApplicationData() {
59+
return mAppData;
4860
}
4961

5062
/**
51-
* Returns the ATQB/SENSB_RES bytes discovered at tag discovery.
63+
* Returns the Protocol Info bytes from the ATQB/SENSB_RES
64+
* bytes discovered at tag discovery.
5265
*/
53-
public byte[] getAtqb() {
54-
return mAtqb;
66+
public byte[] getProtocolInfo() {
67+
return mProtInfo;
5568
}
69+
5670
}

0 commit comments

Comments
 (0)