/packages/modules/Nfc/framework/tests/src/android/nfc/tech/ |
D | NfcFTest.java | 62 when(mMockTag.getTechExtras(TagTechnology.NFC_F)).thenReturn(mMockBundle); in setUp() 80 when(tag.getTechExtras(TagTechnology.NFC_F)).thenReturn(mMockBundle); in testGetNfcFInstanceWithTech() 81 when(tag.hasTech(TagTechnology.NFC_F)).thenReturn(true); in testGetNfcFInstanceWithTech() 84 verify(tag).getTechExtras(TagTechnology.NFC_F); in testGetNfcFInstanceWithTech() 85 verify(tag).hasTech(TagTechnology.NFC_F); in testGetNfcFInstanceWithTech() 91 when(tag.hasTech(TagTechnology.NFC_F)).thenReturn(false); in testGetNfcFInstanceWithoutTech() 94 verify(tag).hasTech(TagTechnology.NFC_F); in testGetNfcFInstanceWithoutTech() 95 verify(tag, never()).getTechExtras(TagTechnology.NFC_F); in testGetNfcFInstanceWithoutTech() 102 when(mMockTag.getConnectedTechnology()).thenReturn(TagTechnology.NFC_F); in testTransceive() 117 when(mMockTagService.getMaxTransceiveLength(TagTechnology.NFC_F)).thenReturn(1); in testGetMaxTransceiveLength() [all …]
|
D | NfcATest.java | 60 when(mMockTag.getTechExtras(TagTechnology.NFC_A)).thenReturn(mMockBundle); in setUp() 68 when(mockTag.getTechExtras(TagTechnology.NFC_A)).thenReturn(mMockBundle); in testGetNfcAWithTech() 69 when(mockTag.hasTech(TagTechnology.NFC_A)).thenReturn(true); in testGetNfcAWithTech() 72 verify(mockTag).getTechExtras(TagTechnology.NFC_A); in testGetNfcAWithTech() 73 verify(mockTag).hasTech(TagTechnology.NFC_A); in testGetNfcAWithTech() 78 when(mMockTag.hasTech(TagTechnology.NFC_A)).thenReturn(false); in testGetNfcAWithoutTech() 95 when(mMockTag.getConnectedTechnology()).thenReturn(TagTechnology.NFC_A); in testTransceive() 110 when(mMockTagService.getMaxTransceiveLength(TagTechnology.NFC_A)).thenReturn(1); in testGetMaxTransceiveLength() 120 when(mMockTagService.setTimeout(TagTechnology.NFC_A, 1000)).thenReturn( in testSetTimeout() 125 verify(mMockTagService).setTimeout(TagTechnology.NFC_A, 1000); in testSetTimeout() [all …]
|
D | NfcBarcodeTest.java | 51 when(mMockTag.getTechExtras(TagTechnology.NFC_BARCODE)).thenReturn(mMockBundle); in setUp() 59 when(mockTag.hasTech(TagTechnology.NFC_BARCODE)).thenReturn(true); in testGetNfcBarcodeInstance() 60 when(mockTag.getTechExtras(TagTechnology.NFC_BARCODE)).thenReturn(mMockBundle); in testGetNfcBarcodeInstance() 63 verify(mockTag).hasTech(TagTechnology.NFC_BARCODE); in testGetNfcBarcodeInstance() 64 verify(mockTag).getTechExtras(TagTechnology.NFC_BARCODE); in testGetNfcBarcodeInstance() 70 when(mockTag.hasTech(TagTechnology.NFC_BARCODE)).thenReturn(true); in testGetNfcBarcodeInstanceWithException() 71 when(mockTag.getTechExtras(TagTechnology.NFC_BARCODE)).thenReturn(null); in testGetNfcBarcodeInstanceWithException() 74 verify(mockTag).hasTech(TagTechnology.NFC_BARCODE); in testGetNfcBarcodeInstanceWithException() 75 verify(mockTag).getTechExtras(TagTechnology.NFC_BARCODE); in testGetNfcBarcodeInstanceWithException() 80 when(mMockTag.hasTech(TagTechnology.NFC_BARCODE)).thenReturn(false); in testGetNfcBarcodeWithoutTech() [all …]
|
D | NfcBTest.java | 58 when(mMockTag.getTechExtras(TagTechnology.NFC_B)).thenReturn(mMockBundle); in setUp() 76 when(tag.hasTech(TagTechnology.NFC_B)).thenReturn(true); in testGetNfcBInstance() 77 when(tag.getTechExtras(TagTechnology.NFC_B)).thenReturn(mMockBundle); in testGetNfcBInstance() 80 verify(tag).hasTech(TagTechnology.NFC_B); in testGetNfcBInstance() 81 verify(tag).getTechExtras(TagTechnology.NFC_B); in testGetNfcBInstance() 87 when(tag.hasTech(TagTechnology.NFC_B)).thenReturn(false); in testGetNfcBNullInstance() 90 verify(tag).hasTech(TagTechnology.NFC_B); in testGetNfcBNullInstance() 91 verify(tag, never()).getTechExtras(TagTechnology.NFC_B); in testGetNfcBNullInstance() 99 when(mMockTag.getConnectedTechnology()).thenReturn(TagTechnology.NFC_B); in testTransceive() 114 when(mMockTagService.getMaxTransceiveLength(TagTechnology.NFC_B)).thenReturn(1); in testGetMaxTransceiveLength()
|
D | NfcVTest.java | 59 when(mMockTag.getTechExtras(TagTechnology.NFC_V)).thenReturn(mMockBundle); in setUp() 77 when(tag.hasTech(TagTechnology.NFC_V)).thenReturn(true); in testGetNfcVInstance() 78 when(tag.getTechExtras(TagTechnology.NFC_V)).thenReturn(mMockBundle); in testGetNfcVInstance() 81 verify(tag).getTechExtras(TagTechnology.NFC_V); in testGetNfcVInstance() 82 verify(tag).hasTech(TagTechnology.NFC_V); in testGetNfcVInstance() 88 when(tag.hasTech(TagTechnology.NFC_V)).thenReturn(false); in testGetNfcVNullInstance() 91 verify(tag, never()).getTechExtras(TagTechnology.NFC_V); in testGetNfcVNullInstance() 92 verify(tag).hasTech(TagTechnology.NFC_V); in testGetNfcVNullInstance() 99 when(mMockTag.getConnectedTechnology()).thenReturn(TagTechnology.NFC_V); in testTransceive() 114 when(mMockTagService.getMaxTransceiveLength(TagTechnology.NFC_V)).thenReturn(1); in testGetMaxTransceiveLength()
|
/packages/modules/Nfc/framework/java/android/nfc/ |
D | Tag.java | 31 import android.nfc.tech.TagTechnology; 171 case TagTechnology.ISO_DEP: in generateTechStringList() 174 case TagTechnology.MIFARE_CLASSIC: in generateTechStringList() 177 case TagTechnology.MIFARE_ULTRALIGHT: in generateTechStringList() 180 case TagTechnology.NDEF: in generateTechStringList() 183 case TagTechnology.NDEF_FORMATABLE: in generateTechStringList() 186 case TagTechnology.NFC_A: in generateTechStringList() 189 case TagTechnology.NFC_B: in generateTechStringList() 192 case TagTechnology.NFC_F: in generateTechStringList() 195 case TagTechnology.NFC_V: in generateTechStringList() [all …]
|
/packages/modules/Nfc/tests/cts/tests/src/android/nfc/tech/cts/ |
D | MifareClassicTest.java | 34 import android.nfc.tech.TagTechnology; 65 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGet_isMifareClassic() 74 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_A}, new Bundle[]{}, 0, 0L, in testGet_tagNotMifareClassic() 87 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetType_classic() 100 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetType_plus() 113 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetType_pro() 126 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetSize_1K() 139 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetSize_mini() 152 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetSize_2K() 165 new int[]{TagTechnology.MIFARE_CLASSIC, TagTechnology.NFC_A}, in testGetSize_4K() [all …]
|
D | MifareUltralightTest.java | 34 import android.nfc.tech.TagTechnology; 68 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_A}, new Bundle[]{}, 0, 0L, in testGet_notUltralight() 90 new int[]{TagTechnology.MIFARE_ULTRALIGHT, TagTechnology.NFC_A}, in testGetType_ultralightC() 159 when(mNfcTagMock.getMaxTransceiveLength(TagTechnology.MIFARE_ULTRALIGHT)).thenReturn(16); in testGetMaxTransceiveLength() 210 new int[]{TagTechnology.MIFARE_ULTRALIGHT, TagTechnology.NFC_A}, in testGetTag() 301 new int[]{TagTechnology.MIFARE_ULTRALIGHT, TagTechnology.NFC_A}, in createMifareUltralight()
|
D | NfcBarcodeTest.java | 31 import android.nfc.tech.TagTechnology; 63 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{}, 0, 0L, in testGet_tagNotNfcBarcode() 72 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_BARCODE}, new Bundle[]{null}, 0, in testGet_nullTechExtras() 96 Tag tag = new Tag(ID, new int[]{TagTechnology.NFC_BARCODE}, new Bundle[]{extras}, 0, 0L, in testGetBarcode_unknown() 107 Tag tag = new Tag(new byte[]{0x01, 0x02, 0x03, 0x04}, new int[]{TagTechnology.NFC_BARCODE}, in testGetTag() 194 Tag tag = new Tag(ID, new int[]{TagTechnology.NFC_BARCODE}, new Bundle[]{extras}, 0, 0L, in createNfcBarcode()
|
D | NfcBTest.java | 34 import android.nfc.tech.TagTechnology; 71 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_A}, new Bundle[]{}, 0, 0L, in testGet_notNfcB() 112 when(mNfcTagMock.getMaxTransceiveLength(TagTechnology.NFC_B)).thenReturn(16); in testGetMaxTransceieveLength() 123 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{extras}, 0, 0L, in testGetTag() 213 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{extras}, 0, 0L, in createNfcB()
|
D | NfcVTest.java | 34 import android.nfc.tech.TagTechnology; 71 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{}, 0, 0L, in testGet_tagNotNfcV() 111 when(mNfcTagMock.getMaxTransceiveLength(TagTechnology.NFC_V)).thenReturn(16); in testGetMaxTransceiveLength() 122 new int[]{TagTechnology.NFC_V}, in testGetTag() 212 new int[]{TagTechnology.NFC_V}, in createNfcV()
|
D | NdefFormatableTest.java | 34 import android.nfc.tech.TagTechnology; 66 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF_FORMATABLE}, new Bundle[]{}, 0, in testGet_isNdefFormatable() 75 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF}, new Bundle[]{}, 0, 0L, in testGet_notNdefFormatable() 207 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF_FORMATABLE}, new Bundle[]{}, 0, in testGetTag() 224 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF_FORMATABLE}, new Bundle[]{}, 0, in testIsConnected_notConnected() 252 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF_FORMATABLE}, new Bundle[]{}, 0, in testReconnect_notConnected() 287 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NDEF_FORMATABLE}, new Bundle[]{}, 0, in createConnectedNdefFormatable()
|
D | NfcATest.java | 34 import android.nfc.tech.TagTechnology; 71 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{}, 0, 0L, in testGet_tagNotNfcA() 111 when(mNfcTagMock.getMaxTransceiveLength(TagTechnology.NFC_A)).thenReturn(16); in testGetMaxTransceiveLength() 159 Tag tag = new Tag(new byte[]{0x01, 0x02, 0x03, 0x04}, new int[]{TagTechnology.NFC_A}, in testGetTag() 248 Tag tag = new Tag(new byte[]{0x01, 0x02, 0x03, 0x04}, new int[]{TagTechnology.NFC_A}, in createNfcA()
|
D | NfcFTest.java | 34 import android.nfc.tech.TagTechnology; 70 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_B}, new Bundle[]{}, 0, 0L, in testGet_tagNotNfcF() 110 when(mNfcTagMock.getMaxTransceiveLength(TagTechnology.NFC_F)).thenReturn(16); in testGetMaxTransceiveLength() 158 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_F}, new Bundle[]{extras}, 0, 0L, in testGetTag() 247 Tag tag = new Tag(new byte[]{}, new int[]{TagTechnology.NFC_F}, new Bundle[]{extras}, 0, 0L, in createNfcF()
|
/packages/modules/Nfc/NfcNci/nci/src/com/android/nfc/dhimpl/ |
D | NativeNfcTag.java | 31 import android.nfc.tech.TagTechnology; 180 if ((technology == TagTechnology.NDEF) in connectWithStatus() 181 || (technology == TagTechnology.NDEF_FORMATABLE)) { in connectWithStatus() 383 if (hasTech(TagTechnology.NDEF)) { in checkNdef() 455 if (hasTech(TagTechnology.MIFARE_CLASSIC)) { in makeReadOnly() 598 addTechnology(TagTechnology.NDEF_FORMATABLE, handle, libnfcType); in addNdefFormatableTechnology() 615 addTechnology(TagTechnology.NDEF, handle, libnfcType); in addNdefTechnology() 737 case TagTechnology.NFC_A: in getTechExtras() 748 case TagTechnology.NFC_B: in getTechExtras() 764 case TagTechnology.NFC_F: in getTechExtras() [all …]
|
D | NativeNfcManager.java | 26 import android.nfc.tech.TagTechnology; 409 case (TagTechnology.NFC_A): in getMaxTransceiveLength() 410 case (TagTechnology.MIFARE_CLASSIC): in getMaxTransceiveLength() 411 case (TagTechnology.MIFARE_ULTRALIGHT): in getMaxTransceiveLength() 413 case (TagTechnology.NFC_B): in getMaxTransceiveLength() 418 case (TagTechnology.NFC_V): in getMaxTransceiveLength() 420 case (TagTechnology.ISO_DEP): in getMaxTransceiveLength() 422 case (TagTechnology.NFC_F): in getMaxTransceiveLength() 434 if (getMaxTransceiveLength(TagTechnology.ISO_DEP) > 261) return true; in getExtendedLengthApdusSupported()
|
/packages/modules/Nfc/framework/java/android/nfc/tech/ |
D | NfcA.java | 58 if (!tag.hasTech(TagTechnology.NFC_A)) return null; in get() 68 super(tag, TagTechnology.NFC_A); in NfcA() 69 Bundle extras = tag.getTechExtras(TagTechnology.NFC_A); in NfcA() 148 int err = mTag.getTagService().setTimeout(TagTechnology.NFC_A, timeout); in setTimeout() 167 return mTag.getTagService().getTimeout(TagTechnology.NFC_A); in getTimeout()
|
D | NfcF.java | 58 if (!tag.hasTech(TagTechnology.NFC_F)) return null; in get() 68 super(tag, TagTechnology.NFC_F); in NfcF() 69 Bundle extras = tag.getTechExtras(TagTechnology.NFC_F); in NfcF() 152 int err = mTag.getTagService().setTimeout(TagTechnology.NFC_F, timeout); in setTimeout() 171 return mTag.getTagService().getTimeout(TagTechnology.NFC_F); in getTimeout()
|
D | IsoDep.java | 61 if (!tag.hasTech(TagTechnology.ISO_DEP)) return null; in get() 72 super(tag, TagTechnology.ISO_DEP); in IsoDep() 73 Bundle extras = tag.getTechExtras(TagTechnology.ISO_DEP); in IsoDep() 95 int err = mTag.getTagService().setTimeout(TagTechnology.ISO_DEP, timeout); in setTimeout() 114 return mTag.getTagService().getTimeout(TagTechnology.ISO_DEP); in getTimeout()
|
D | MifareUltralight.java | 94 if (!tag.hasTech(TagTechnology.MIFARE_ULTRALIGHT)) return null; in get() 104 super(tag, TagTechnology.MIFARE_ULTRALIGHT); in MifareUltralight() 112 Bundle extras = tag.getTechExtras(TagTechnology.MIFARE_ULTRALIGHT); in MifareUltralight() 244 TagTechnology.MIFARE_ULTRALIGHT, timeout); in setTimeout() 263 return mTag.getTagService().getTimeout(TagTechnology.MIFARE_ULTRALIGHT); in getTimeout()
|
D | NfcBarcode.java | 51 if (!tag.hasTech(TagTechnology.NFC_BARCODE)) return null; in get() 64 super(tag, TagTechnology.NFC_BARCODE); in NfcBarcode() 65 Bundle extras = tag.getTechExtras(TagTechnology.NFC_BARCODE); in NfcBarcode()
|
D | NfcV.java | 55 if (!tag.hasTech(TagTechnology.NFC_V)) return null; in get() 65 super(tag, TagTechnology.NFC_V); in NfcV() 66 Bundle extras = tag.getTechExtras(TagTechnology.NFC_V); in NfcV()
|
D | NfcB.java | 54 if (!tag.hasTech(TagTechnology.NFC_B)) return null; in get() 64 super(tag, TagTechnology.NFC_B); in NfcB() 65 Bundle extras = tag.getTechExtras(TagTechnology.NFC_B); in NfcB()
|
D | MifareClassic.java | 136 if (!tag.hasTech(TagTechnology.MIFARE_CLASSIC)) return null; in get() 146 super(tag, TagTechnology.MIFARE_CLASSIC); in MifareClassic() 604 int err = mTag.getTagService().setTimeout(TagTechnology.MIFARE_CLASSIC, timeout); in setTimeout() 623 return mTag.getTagService().getTimeout(TagTechnology.MIFARE_CLASSIC); in getTimeout()
|
/packages/modules/Nfc/framework/tests/src/android/nfc/ |
D | TagTest.java | 19 import static android.nfc.tech.TagTechnology.ISO_DEP; 20 import static android.nfc.tech.TagTechnology.MIFARE_CLASSIC; 21 import static android.nfc.tech.TagTechnology.MIFARE_ULTRALIGHT; 22 import static android.nfc.tech.TagTechnology.NDEF; 23 import static android.nfc.tech.TagTechnology.NDEF_FORMATABLE; 24 import static android.nfc.tech.TagTechnology.NFC_A; 25 import static android.nfc.tech.TagTechnology.NFC_B; 26 import static android.nfc.tech.TagTechnology.NFC_BARCODE; 27 import static android.nfc.tech.TagTechnology.NFC_F; 28 import static android.nfc.tech.TagTechnology.NFC_V;
|