Home
last modified time | relevance | path

Searched refs:ndefRecord (Results 1 – 6 of 6) sorted by relevance

/packages/modules/Nfc/framework/tests/src/android/nfc/
DNdefRecordTest.java37 NdefRecord ndefRecord = new NdefRecord(applicationRecord.toByteArray()); in testNdefRecordConstructor() local
38 assertThat(ndefRecord).isNotNull(); in testNdefRecordConstructor()
39 assertThat(ndefRecord.toByteArray().length).isGreaterThan(0); in testNdefRecordConstructor()
40 assertThat(ndefRecord.getType()).isEqualTo("android.com:pkg".getBytes()); in testNdefRecordConstructor()
41 assertThat(ndefRecord.getPayload()).isEqualTo("com.android.test".getBytes()); in testNdefRecordConstructor()
46 NdefRecord ndefRecord = NdefRecord.createExternal("test", in testCreateExternal() local
48 assertThat(ndefRecord).isNotNull(); in testCreateExternal()
49 assertThat(ndefRecord.getType()).isEqualTo("test:android.com:pkg".getBytes()); in testCreateExternal()
50 assertThat(ndefRecord.getPayload()).isEqualTo("com.android.test".getBytes()); in testCreateExternal()
55 NdefRecord ndefRecord = NdefRecord.createUri("http://www.example.com"); in testCreateUri() local
[all …]
/packages/modules/Nfc/NfcNci/tests/unit/src/com/android/nfc/
DNfcDispatcherTest.java193 NdefRecord ndefRecord = mock(NdefRecord.class); in testSetForegroundDispatchForWifiConnect() local
194 NdefRecord[] records = {ndefRecord}; in testSetForegroundDispatchForWifiConnect()
216 NdefRecord ndefRecord = mock(NdefRecord.class); in testPeripheralHandoverBTParing() local
217 when(ndefRecord.getType()).thenReturn("application/vnd.bluetooth.ep.oob" in testPeripheralHandoverBTParing()
219 when(ndefRecord.getTnf()).thenReturn(NdefRecord.TNF_MIME_MEDIA); in testPeripheralHandoverBTParing()
220 when(ndefRecord.getPayload()).thenReturn(btOobPayload.getBytes(StandardCharsets.US_ASCII)); in testPeripheralHandoverBTParing()
221 NdefRecord[] records = {ndefRecord}; in testPeripheralHandoverBTParing()
235 NdefRecord ndefRecord = mock(NdefRecord.class); in testCheckForAar() local
236 when(ndefRecord.getTnf()).thenReturn(NdefRecord.TNF_EXTERNAL_TYPE); in testCheckForAar()
237 when(ndefRecord.getType()).thenReturn(NdefRecord.RTD_ANDROID_APP); in testCheckForAar()
[all …]
/packages/modules/Nfc/NfcNci/tests/unit/src/com/android/nfc/wlc/
DNfcChargingTest.java163 NdefRecord ndefRecord = mock(NdefRecord.class); in testHandleWlcCap_ModeReq_State6() local
164 when(ndefRecord.getType()).thenReturn(NfcCharging.WLCCAP); in testHandleWlcCap_ModeReq_State6()
166 when(ndefRecord.getPayload()).thenReturn(payload); in testHandleWlcCap_ModeReq_State6()
167 NdefRecord[] records = {ndefRecord}; in testHandleWlcCap_ModeReq_State6()
217 NdefRecord ndefRecord = mock(NdefRecord.class); in testHandleWlcCap_ModeReq_State12() local
218 when(ndefRecord.getType()).thenReturn(NfcCharging.WLCCTL); in testHandleWlcCap_ModeReq_State12()
220 when(ndefRecord.getPayload()).thenReturn(payload); in testHandleWlcCap_ModeReq_State12()
227 NdefRecord[] records = {ndefRecord, ndefRecordWLCSTAI}; in testHandleWlcCap_ModeReq_State12()
241 NdefRecord ndefRecord = mock(NdefRecord.class); in testHandleWlcCap_ModeReq_State12_WlcCtlMsgFalse() local
242 when(ndefRecord.getType()).thenReturn(NfcCharging.WLCPI); in testHandleWlcCap_ModeReq_State12_WlcCtlMsgFalse()
[all …]
/packages/modules/Nfc/NfcNci/tests/unit/src/com/android/nfc/handover/
DHandoverDataParserTest.java95 NdefRecord ndefRecord = mHandoverDataParser.createBluetoothAlternateCarrierRecord(true); in testCreateBluetoothAlternateCarrierRecord() local
96 byte[] payload = ndefRecord.getPayload(); in testCreateBluetoothAlternateCarrierRecord()
97 assertNotNull(ndefRecord); in testCreateBluetoothAlternateCarrierRecord()
103 NdefRecord ndefRecord = mHandoverDataParser.createHandoverRequestRecord(); in testCreateHandoverRequestRecord() local
104 byte[] payload = ndefRecord.getPayload(); in testCreateHandoverRequestRecord()
105 assertNotNull(ndefRecord); in testCreateHandoverRequestRecord()
106 assertArrayEquals(NdefRecord.RTD_HANDOVER_REQUEST, ndefRecord.getType()); in testCreateHandoverRequestRecord()
579 NdefRecord ndefRecord = NdefRecord.createExternal("example.com", "altCarrier", in createNdefPayload() local
581 NdefMessage ndefMessage = new NdefMessage(new NdefRecord[]{ndefRecord}); in createNdefPayload()
/packages/modules/Nfc/tests/cts/tests/src/android/nfc/tech/cts/
DNdefFormatableTest.java60 NdefRecord ndefRecord = NdefRecord.createTextRecord("en", "text"); in setUp() local
61 mNdefMessage = new NdefMessage(ndefRecord); in setUp()
DNdefTest.java60 NdefRecord ndefRecord = NdefRecord.createTextRecord("en", "text"); in setUp() local
61 mNdefMessage = new NdefMessage(ndefRecord); in setUp()