Home
last modified time | relevance | path

Searched refs:TestUtils (Results 1 – 25 of 168) sorted by relevance

1234567

/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/crypto/
DIkeMacPrfTest.java19 import static com.android.internal.net.TestUtils.hexStringToByteArray;
28 import com.android.internal.net.TestUtils;
192 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_KEY_HEX_STRING); in testSignBytesHmacSha1()
193 byte[] dataBytes = TestUtils.hexStringToByteArray(DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha1()
197 byte[] expectedBytes = TestUtils.hexStringToByteArray(CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha1()
203 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_KEY_HEX_STRING); in testSignBytesHmacSha256()
204 byte[] dataBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha256()
209 TestUtils.hexStringToByteArray(PRF_HMAC256_CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha256()
215 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testGenerateSKeySeedHmacSha1()
216 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testGenerateSKeySeedHmacSha1()
[all …]
DIkeMacIntegrityTest.java33 import com.android.internal.net.TestUtils;
94 mHmacSha1IntegrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING); in setUp()
96 mDataToAuthenticate = TestUtils.hexStringToByteArray(DATA_TO_AUTH_HEX_STRING); in setUp()
113 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksum()
120 byte[] integrityKey = TestUtils.hexStringToByteArray(AUTH_AES_CMAC_96_KEY_HEX_STRING); in testGenerateChecksumAuthAesCmac96()
125 TestUtils.hexStringToByteArray(AUTH_AES_CMAC_96_DATA_TO_SIGN_HEX_STRING)); in testGenerateChecksumAuthAesCmac96()
128 TestUtils.hexStringToByteArray(AUTH_AES_CMAC_96_CALCULATED_MAC_HEX_STRING); in testGenerateChecksumAuthAesCmac96()
140 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksumWithDifferentKey()
146 byte[] integrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "0000"); in testGenerateChecksumWithInvalidKey()
170 byte[] encryptionKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "00"); in buildIpSecAlgorithmWithInvalidKey()
[all …]
DIkeCombinedModeCipherTest.java28 import com.android.internal.net.TestUtils;
91 mAesGcmKey = TestUtils.hexStringToByteArray(KEY); in setUp()
92 mIv = TestUtils.hexStringToByteArray(IV); in setUp()
94 TestUtils.hexStringToByteArray(ENCRYPTED_PADDED_DATA_WITH_CHECKSUM); in setUp()
95 mUnencryptedPaddedData = TestUtils.hexStringToByteArray(UNENCRYPTED_PADDED_DATA); in setUp()
96 mAdditionalAuthData = TestUtils.hexStringToByteArray(ADDITIONAL_AUTH_DATA); in setUp()
104 mChaChaPolyKey = TestUtils.hexStringToByteArray(CHACHA_POLY_KEY); in setUp()
105 mChaChaPolyIv = TestUtils.hexStringToByteArray(CHACHA_POLY_IV); in setUp()
107 TestUtils.hexStringToByteArray(CHACHA_POLY_ENCRYPTED_DATA_WITH_CHECKSUM); in setUp()
108 mChaChaPolyUnencryptedData = TestUtils.hexStringToByteArray(CHACHA_POLY_UNENCRYPTED_DATA); in setUp()
[all …]
DIkeNormalModeCipherTest.java29 import com.android.internal.net.TestUtils;
94 mAesCbcKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp()
95 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp()
97 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp()
99 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_PADDED_DATA); in setUp()
107 mAesCtrKey = TestUtils.hexStringToByteArray(AES_CTR_KEY); in setUp()
108 mAesCtrIv = TestUtils.hexStringToByteArray(AES_CTR_IV); in setUp()
109 mAesCtrEncryptedData = TestUtils.hexStringToByteArray(AES_CTR_ENCRYPT_DATA); in setUp()
110 mAesCtrUnencryptedData = TestUtils.hexStringToByteArray(AES_CTR_UNENCRYPTED_DATA); in setUp()
154 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in testEncryptWithWrongKey()
[all …]
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeEncryptedPayloadBodyTest.java24 import com.android.internal.net.TestUtils;
196 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_DATA); in setUp()
202 mDataToAuthenticate = TestUtils.hexStringToByteArray(hexStringToAuthenticate); in setUp()
204 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp()
206 TestUtils.hexStringToByteArray( in setUp()
213 mChecksum = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_CHECKSUM); in setUp()
214 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp()
215 mPadding = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_PADDING); in setUp()
228 mAesCbcKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp()
233 mHmacSha1IntegrityKey = TestUtils.hexStringToByteArray(INTE_KEY_FROM_INIT_TO_RESP); in setUp()
[all …]
DIkeDeletePayloadTest.java31 import com.android.internal.net.TestUtils;
56 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING)); in testDecodeDeleteIkePayload()
75 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING)); in testDecodeDeleteChildPayload()
89 int expectedChildSpi = TestUtils.hexStringToInt(CHILD_SPI); in testDecodeDeleteChildPayload()
95 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidProtocol()
110 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidSpiSize()
125 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpi()
140 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpiAndSpiSize()
166 int[] childSpis = new int[] {TestUtils.hexStringToInt(CHILD_SPI)}; in testOutboundConstructorWithSingleChildSa()
202 byte[] expectedPayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testEncodeForIke()
[all …]
DIkeKePayloadTest.java19 import static com.android.internal.net.TestUtils.createMockRandomFactory;
32 import com.android.internal.net.TestUtils;
104 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testDecodeIkeKePayload()
111 byte[] keyExchangeData = TestUtils.hexStringToByteArray(KEY_EXCHANGE_DATA_RAW_PACKET); in testDecodeIkeKePayload()
123 byte[] inputPacket = TestUtils.hexStringToByteArray(badKeyPayloadPacket); in testDecodeIkeKePayloadWithInvalidKeData()
134 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
141 TestUtils.hexStringToByteArray(KE_PAYLOAD_GENERIC_HEADER + KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
173 byte[] remotePublicKey = TestUtils.hexStringToByteArray(REMOTE_PUBLIC_KEY_1024); in testGetSharedKey1024Modp()
178 byte[] expectedSharedKeyBytes = TestUtils.hexStringToByteArray(EXPECTED_SHARED_KEY_1024); in testGetSharedKey1024Modp()
215 byte[] remotePublicKey = TestUtils.hexStringToByteArray(publicKeyRemoteHex); in testGetSharedKey1536Modp()
[all …]
DIkeSaPayloadTest.java19 import static com.android.internal.net.TestUtils.createMockRandomFactory;
48 import com.android.internal.net.TestUtils;
266 byte[] inputPacket = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testDecodeAttribute()
282 byte[] expectedBytes = TestUtils.hexStringToByteArray(ATTRIBUTE_RAW_PACKET); in testEncodeAttribute()
289 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransform()
305 byte[] inputPacket = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testDecodeEncryptionTransformWithInvalidKeyLength()
326 byte[] expectedBytes = TestUtils.hexStringToByteArray(ENCR_TRANSFORM_RAW_PACKET); in testEncodeEncryptionTransform()
351 byte[] inputPacket = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testDecodePrfTransform()
370 byte[] expectedBytes = TestUtils.hexStringToByteArray(PRF_TRANSFORM_RAW_PACKET); in testEncodePrfTransform()
386 byte[] inputPacket = TestUtils.hexStringToByteArray(INTEG_TRANSFORM_RAW_PACKET); in testDecodeIntegrityTransform()
[all …]
DIkeAuthDigitalSignPayloadTest.java33 import com.android.internal.net.TestUtils;
90 TestUtils.hexStringToByteArray("0001000200030004");
92 TestUtils.hexStringToByteArray("0001000200");
97 TestUtils.hexStringToByteArray(IKE_INIT_RESP_HEX_STRING);
99 TestUtils.hexStringToByteArray(NONCE_INIT_HEX_STRING);
101 TestUtils.hexStringToByteArray(ID_RESP_PAYLOAD_BODY_HEX_STRING);
102 private static final byte[] PRF_RESP_KEY = TestUtils.hexStringToByteArray(SKP_RESP_HEX_STRING);
115 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testDecodeGenericDigitalSignPayload()
121 assertArrayEquals(dsPayload.signature, TestUtils.hexStringToByteArray(SIGNATURE)); in testDecodeGenericDigitalSignPayload()
179 TestUtils.hexStringToByteArray( in verifySignAndEncode()
[all …]
DIkeAuthPayloadTest.java27 import com.android.internal.net.TestUtils;
97 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayload()
104 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING); in testDecodeIkeAuthPayload()
110 byte[] inputPacket = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testDecodeIkeAuthPayloadWithUnsupportedMethod()
121 byte[] skpBytes = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING); in testGetSignedOctets()
122 byte[] idBytes = TestUtils.hexStringToByteArray(PSK_ID_PAYLOAD_HEX_STRING); in testGetSignedOctets()
123 byte[] ikeInitRequest = TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING); in testGetSignedOctets()
124 byte[] nonceResp = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING); in testGetSignedOctets()
129 byte[] expectedBytes = TestUtils.hexStringToByteArray(PSK_INIT_SIGNED_OCTETS); in testGetSignedOctets()
DIkeIdPayloadTest.java34 import com.android.internal.net.TestUtils;
109 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv4AddrIdPayload()
122 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv6AddrIdPayload()
134 byte[] inputPacket = TestUtils.hexStringToByteArray(FQDN_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeFqdnIdPayload()
147 byte[] inputPacket = TestUtils.hexStringToByteArray(RFC822_ADDR_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeRfc822AddrIdPayload()
159 byte[] inputPacket = TestUtils.hexStringToByteArray(KEY_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeKeyIdPayload()
171 byte[] inputPacket = TestUtils.hexStringToByteArray(ASN1_DN_PAYLOAD_BODY_HEX_STRING); in testDecodeDerAsn1DnIdPayload()
187 TestUtils.hexStringToByteArray(ASN1_DN_INVALID_PAYLOAD_BODY_HEX_STRING); in testDecodeInvalidDerAsn1DnIdPayload()
198 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeUnsupportedIdType()
217 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv4AddrIdPayload()
[all …]
DIkeConfigPayloadTest.java51 import com.android.internal.net.TestUtils;
95 TestUtils.hexStringToByteArray(CONFIG_REQ_PAYLOAD_HEX);
97 TestUtils.hexStringToByteArray(CONFIG_RESP_PAYLOAD_HEX);
108 TestUtils.hexStringToByteArray("00010004c0000264");
110 TestUtils.hexStringToByteArray("00010000");
113 TestUtils.hexStringToByteArray("00020000");
118 TestUtils.hexStringToByteArray("08080808");
120 TestUtils.hexStringToByteArray("00030000");
125 TestUtils.hexStringToByteArray("00060004c00002c8");
127 TestUtils.hexStringToByteArray("00060000");
[all …]
DIkeAuthPskPayloadTest.java26 import com.android.internal.net.TestUtils;
69 private static final byte[] PSK = TestUtils.hexStringToByteArray(PSK_HEX_STRING);
71 TestUtils.hexStringToByteArray(PSK_IKE_INIT_REQUEST_HEX_STRING);
72 private static final byte[] NONCE = TestUtils.hexStringToByteArray(PSK_NONCE_RESP_HEX_STRING);
74 TestUtils.hexStringToByteArray(PSK_ID_INITIATOR_PAYLOAD_HEX_STRING);
75 private static final byte[] PRF_KEY = TestUtils.hexStringToByteArray(PSK_SKP_HEX_STRING);
77 TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_SIGNATURE_HEX_STRING);
98 byte[] expectedPayload = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_HEX_STRING); in testBuildOutboundIkeAuthPskPayload()
108 byte[] payloadBody = TestUtils.hexStringToByteArray(PSK_AUTH_PAYLOAD_BODY_HEX_STRING); in buildPskPayload()
DIkeSkfPayloadTest.java29 import com.android.internal.net.TestUtils;
84 mDecryptedData = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_DECRYPTED_BODY_HEX_STRING); in setUp()
92 byte[] expectedChecksum = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_CHECKSUM); in setUp()
104 TestUtils.hexStringToByteArray( in setUp()
125 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecode()
137 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsForZeroFragNum()
152 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsForZeroTotalFragments()
167 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testDecodeThrowsWhenFragNumIsLargerThanTotalFragments()
188 byte[] message = TestUtils.hexStringToByteArray(IKE_FRAG_MSG_HEX_STRING); in testEncode()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/
DSaRecordTest.java19 import static com.android.internal.net.TestUtils.createMockRandomFactory;
41 import com.android.internal.net.TestUtils;
175 byte[] sKeySeed = TestUtils.hexStringToByteArray(IKE_SKEYSEED_HEX_STRING); in testMakeIkeSaRecord()
176 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testMakeIkeSaRecord()
177 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testMakeIkeSaRecord()
206 TestUtils.hexStringToByteArray(IKE_SK_D_HEX_STRING), ikeSaRecord.getSkD()); in testMakeIkeSaRecord()
208 TestUtils.hexStringToByteArray(IKE_SK_AUTH_INIT_HEX_STRING), in testMakeIkeSaRecord()
211 TestUtils.hexStringToByteArray(IKE_SK_AUTH_RESP_HEX_STRING), in testMakeIkeSaRecord()
214 TestUtils.hexStringToByteArray(IKE_SK_ENCR_INIT_HEX_STRING), in testMakeIkeSaRecord()
217 TestUtils.hexStringToByteArray(IKE_SK_ENCR_RESP_HEX_STRING), in testMakeIkeSaRecord()
[all …]
/packages/apps/Settings/tests/anomaly-tester/src/com/android/settings/anomaly/tests/
DWakelockAnomalyTest.java57 TestUtils.setUp(instrumentation); in setUp()
59 TestUtils.startAnomalyApp(context, mDevice); in setUp()
64 TestUtils.tearDown(InstrumentationRegistry.getInstrumentation()); in tearDown()
71 TestUtils.setEditTextWithValue(mDevice, RES_WAKELOCK_EDITTEXT, durationMs); in testWakelockAnomaly_longTimeWhileRunning_report()
74 TestUtils.clickButton(mDevice, RES_WAKELOCK_BUTTON); in testWakelockAnomaly_longTimeWhileRunning_report()
79 TestUtils.wait(mDevice, durationMs - TIME_OUT); in testWakelockAnomaly_longTimeWhileRunning_report()
93 TestUtils.setEditTextWithValue(mDevice, RES_WAKELOCK_EDITTEXT, durationMs); in testWakelockAnomaly_shortTime_notReport()
96 TestUtils.clickButton(mDevice, RES_WAKELOCK_BUTTON); in testWakelockAnomaly_shortTime_notReport()
100 TestUtils.wait(mDevice, durationMs); in testWakelockAnomaly_shortTime_notReport()
115 TestUtils.setEditTextWithValue(mDevice, RES_WAKELOCK_EDITTEXT, durationMs); in testWakelockAnomaly_longTimeWhileNotRunning_notReport()
[all …]
DBluetoothAnomalyTest.java57 TestUtils.setUp(instrumentation); in setUp()
59 TestUtils.startAnomalyApp(context, mDevice); in setUp()
64 TestUtils.tearDown(InstrumentationRegistry.getInstrumentation()); in tearDown()
71 TestUtils.setEditTextWithValue(mDevice, RES_BT_EDITTEXT, durationMs); in testBluetoothAnomaly_longScanningTime_reportAnomaly()
74 TestUtils.clickButton(mDevice, RES_BT_BUTTON); in testBluetoothAnomaly_longScanningTime_reportAnomaly()
78 TestUtils.wait(mDevice, durationMs); in testBluetoothAnomaly_longScanningTime_reportAnomaly()
92 TestUtils.setEditTextWithValue(mDevice, RES_BT_EDITTEXT, durationMs); in testBluetoothAnomaly_shortScanningTime_notReport()
95 TestUtils.clickButton(mDevice, RES_BT_BUTTON); in testBluetoothAnomaly_shortScanningTime_notReport()
99 TestUtils.wait(mDevice, durationMs); in testBluetoothAnomaly_shortScanningTime_notReport()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/
DHeadsetServiceAndStateMachineTest.java53 import com.android.bluetooth.TestUtils;
166 TestUtils.setAdapterService(mAdapterService); in setUp()
220 TestUtils.startService(mServiceRule, HeadsetService.class); in setUp()
244 TestUtils.stopService(mServiceRule, HeadsetService.class); in tearDown()
253 TestUtils.clearAdapterService(mAdapterService); in tearDown()
268 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in testGetHeadsetService()
281 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in testConnectFromApi()
324 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in testUnbondDevice_disconnectBeforeUnbond()
367 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in testUnbondDevice_disconnectAfterUnbond()
428 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, i); in testVirtualCall_normalStartStop()
[all …]
DHeadsetPhoneStateTest.java36 import com.android.bluetooth.TestUtils;
79 TestUtils.replaceField(ServiceManager.class, "sCache", null, in setUp()
98 TestUtils.replaceField(ServiceManager.class, "sCache", null, in tearDown()
110 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_NoneResultsNoListen()
121 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceOnly()
134 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrength()
147 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffSignalStrengh()
162 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffAll()
178 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_MultiDevice_AllUpAllDown()
179 BluetoothDevice device2 = TestUtils.getTestDevice(mAdapter, 2); in testListenForPhoneState_MultiDevice_AllUpAllDown()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/gatt/
DGattServiceTest.java13 import com.android.bluetooth.TestUtils;
46 TestUtils.setAdapterService(mAdapterService); in setUp()
48 TestUtils.startService(mServiceRule, GattService.class); in setUp()
59 TestUtils.stopService(mServiceRule, GattService.class); in tearDown()
62 TestUtils.clearAdapterService(mAdapterService); in tearDown()
75 TestUtils.stopService(mServiceRule, GattService.class); in testServiceUpAndDown()
79 TestUtils.clearAdapterService(mAdapterService); in testServiceUpAndDown()
81 TestUtils.setAdapterService(mAdapterService); in testServiceUpAndDown()
83 TestUtils.startService(mServiceRule, GattService.class); in testServiceUpAndDown()
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/
DIkeTrafficSelectorTest.java30 import com.android.internal.net.TestUtils;
103 TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + TS_IPV4_TWO_HEX_STRING); in testDecodeIkeTrafficSelectors()
145 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testBuildAndEncodeIkeTrafficSelector()
198 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsType()
212 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidIpProtocol()
226 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + "FFFF"); in testDecodeIkeTrafficSelectorWithExpectedTrailing()
239 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsLength()
256 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_PORT_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidPortRange()
269 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_ADDRESS_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidAddressRange()
348 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV6_THREE_HEX_ADDRESS); in testBuildAndEncodeIpv6TrafficSelector()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerStateMachineTest.java44 import com.android.bluetooth.TestUtils;
108 TestUtils.setAdapterService(mA2dpAdapterService); in setUp()
109 TestUtils.startService(mA2dpServiceRule, A2dpSinkService.class); in setUp()
111 TestUtils.clearAdapterService(mA2dpAdapterService); in setUp()
115 TestUtils.setAdapterService(mAvrcpAdapterService); in setUp()
116 TestUtils.startService(mAvrcpServiceRule, AvrcpControllerService.class); in setUp()
149 TestUtils.clearAdapterService(mAvrcpAdapterService); in tearDown()
169 TestUtils.waitForLooperToFinishScheduledTask(sm.getHandler().getLooper()); in destroyStateMachine()
203 TestUtils.waitForLooperToFinishScheduledTask(mAvrcpStateMachine.getHandler().getLooper()); in setUpConnectedState()
257 TestUtils.waitForLooperToFinishScheduledTask(mAvrcpStateMachine.getHandler().getLooper()); in setCurrentTrack()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DSilenceDeviceManagerTest.java38 import com.android.bluetooth.TestUtils;
75 TestUtils.setAdapterService(mAdapterService); in setUp()
94 TestUtils.clearAdapterService(mAdapterService); in tearDown()
120 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceConnectedCase()
128 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceConnectedCase()
157 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceDisconnectedCase()
180 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in a2dpConnected()
192 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in a2dpDisconnected()
204 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in headsetConnected()
216 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in headsetDisconnected()
DActiveDeviceManagerTest.java36 import com.android.bluetooth.TestUtils;
79 TestUtils.setAdapterService(mAdapterService); in setUp()
93 mA2dpDevice = TestUtils.getTestDevice(mAdapter, 0); in setUp()
94 mHeadsetDevice = TestUtils.getTestDevice(mAdapter, 1); in setUp()
95 mA2dpHeadsetDevice = TestUtils.getTestDevice(mAdapter, 2); in setUp()
96 mHearingAidDevice = TestUtils.getTestDevice(mAdapter, 3); in setUp()
106 TestUtils.clearAdapterService(mAdapterService); in tearDown()
158 TestUtils.waitForLooperToFinishScheduledTask(mActiveDeviceManager.getHandlerLooper()); in a2dpActiveDeviceSelected_setActive()
209 TestUtils.waitForLooperToFinishScheduledTask(mActiveDeviceManager.getHandlerLooper()); in headsetActiveDeviceSelected_setActive()
246 TestUtils.waitForLooperToFinishScheduledTask(mActiveDeviceManager.getHandlerLooper()); in hearingAidActive_dontSetA2dpAndHeadsetActive()
[all …]
DPhonePolicyTest.java34 import com.android.bluetooth.TestUtils;
76 TestUtils.setAdapterService(mAdapterService); in setUp()
99 TestUtils.clearAdapterService(mAdapterService); in tearDown()
109 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in testProcessInitProfilePriorities()
151 BluetoothDevice bondedDevice = TestUtils.getTestDevice(mAdapter, 0); in testAdapterOnAutoConnect()
182 connectionOrder.add(TestUtils.getTestDevice(mAdapter, 0)); in testDisconnectNoAutoConnect()
183 connectionOrder.add(TestUtils.getTestDevice(mAdapter, 1)); in testDisconnectNoAutoConnect()
184 connectionOrder.add(TestUtils.getTestDevice(mAdapter, 2)); in testDisconnectNoAutoConnect()
185 connectionOrder.add(TestUtils.getTestDevice(mAdapter, 3)); in testDisconnectNoAutoConnect()
268 bondedDevices[0] = TestUtils.getTestDevice(mAdapter, 0); in testReconnectOnPartialConnect()
[all …]

1234567