Home
last modified time | relevance | path

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

123456

/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/crypto/
DIkeMacPrfTest.java19 import static com.android.internal.net.TestUtils.hexStringToByteArray;
26 import com.android.internal.net.TestUtils;
164 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_KEY_HEX_STRING); in testSignBytesHmacSha1()
165 byte[] dataBytes = TestUtils.hexStringToByteArray(DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha1()
169 byte[] expectedBytes = TestUtils.hexStringToByteArray(CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha1()
175 byte[] skpBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_KEY_HEX_STRING); in testSignBytesHmacSha256()
176 byte[] dataBytes = TestUtils.hexStringToByteArray(PRF_HMAC256_DATA_TO_SIGN_HEX_STRING); in testSignBytesHmacSha256()
181 TestUtils.hexStringToByteArray(PRF_HMAC256_CALCULATED_MAC_HEX_STRING); in testSignBytesHmacSha256()
187 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testGenerateSKeySeedHmacSha1()
188 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testGenerateSKeySeedHmacSha1()
[all …]
DIkeMacIntegrityTest.java27 import com.android.internal.net.TestUtils;
78 mHmacSha1IntegrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING); in setUp()
80 mDataToAuthenticate = TestUtils.hexStringToByteArray(DATA_TO_AUTH_HEX_STRING); in setUp()
91 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksum()
103 byte[] expectedChecksum = TestUtils.hexStringToByteArray(CHECKSUM_HEX_STRING); in testGenerateChecksumWithDifferentKey()
109 byte[] integrityKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "0000"); in testGenerateChecksumWithInvalidKey()
133 byte[] encryptionKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "00"); in buildIpSecAlgorithmWithInvalidKey()
146 byte[] skpBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_KEY_HEX_STRING); in testSignBytesAuthAes128XCbc()
147 byte[] dataBytes = TestUtils.hexStringToByteArray(AUTH_AES128XCBC_DATA_TO_SIGN_HEX_STRING); in testSignBytesAuthAes128XCbc()
152 TestUtils.hexStringToByteArray(AUTH_AES128XCBC_CALCULATED_MAC_HEX_STRING); in testSignBytesAuthAes128XCbc()
[all …]
DIkeNormalModeCipherTest.java28 import com.android.internal.net.TestUtils;
81 mAesCbcKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP); in setUp()
83 mIv = TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_IV); in setUp()
85 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_ENCRYPT_PADDED_DATA); in setUp()
87 TestUtils.hexStringToByteArray(IKE_AUTH_INIT_REQUEST_UNENCRYPTED_PADDED_DATA); in setUp()
117 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in testEncryptWithWrongKey()
130 TestUtils.hexStringToByteArray( in testDecryptWithNormalCipherWithBadPad()
152 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in buildIpSecAlgorithmWithInvalidKey()
DIkeCombinedModeCipherTest.java28 import com.android.internal.net.TestUtils;
72 mAesGcmKey = TestUtils.hexStringToByteArray(KEY); in setUp()
73 mIv = TestUtils.hexStringToByteArray(IV); in setUp()
75 TestUtils.hexStringToByteArray(ENCRYPTED_PADDED_DATA_WITH_CHECKSUM); in setUp()
76 mUnencryptedPaddedData = TestUtils.hexStringToByteArray(UNENCRYPTED_PADDED_DATA); in setUp()
77 mAdditionalAuthData = TestUtils.hexStringToByteArray(ADDITIONAL_AUTH_DATA); in setUp()
111 byte[] encryptionKey = TestUtils.hexStringToByteArray(KEY + "00"); in testEncryptWithWrongKeyLen()
149 byte[] encryptionKey = TestUtils.hexStringToByteArray(KEY + "00"); in buildIpSecAlgorithmWithInvalidKey()
/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.java29 import com.android.internal.net.TestUtils;
55 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING)); in testDecodeDeleteIkePayload()
74 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING)); in testDecodeDeleteChildPayload()
88 int expectedChildSpi = TestUtils.hexStringToInt(CHILD_SPI); in testDecodeDeleteChildPayload()
94 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidProtocol()
109 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidSpiSize()
124 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpi()
139 byte[] deletePayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testDecodeWithInvalidNumSpiAndSpiSize()
165 int[] childSpis = new int[] {TestUtils.hexStringToInt(CHILD_SPI)}; in testOutboundConstructorWithSingleChildSa()
201 byte[] expectedPayloadBytes = TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING); in testEncodeForIke()
[all …]
DIkeSaPayloadTest.java19 import static com.android.internal.net.TestUtils.createMockRandomFactory;
46 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.java28 import com.android.internal.net.TestUtils;
80 TestUtils.hexStringToByteArray(IKE_INIT_RESP_HEX_STRING);
82 TestUtils.hexStringToByteArray(NONCE_INIT_HEX_STRING);
84 TestUtils.hexStringToByteArray(ID_RESP_PAYLOAD_BODY_HEX_STRING);
85 private static final byte[] PRF_RESP_KEY = TestUtils.hexStringToByteArray(SKP_RESP_HEX_STRING);
98 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testDecodeGenericDigitalSignPayload()
104 assertArrayEquals(dsPayload.signature, TestUtils.hexStringToByteArray(SIGNATURE)); in testDecodeGenericDigitalSignPayload()
125 TestUtils.hexStringToByteArray( in testSignAndEncode()
133 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testVerifyInboundSignature()
151 TestUtils.hexStringToByteArray(AUTH_PAYLOAD_BODY_GENERIC_DIGITAL_SIGN_HEX_STRING); in testVerifyInboundSignatureFail()
[all …]
DIkeConfigPayloadTest.java49 import com.android.internal.net.TestUtils;
94 TestUtils.hexStringToByteArray(CONFIG_REQ_PAYLOAD_HEX);
96 TestUtils.hexStringToByteArray(CONFIG_RESP_PAYLOAD_HEX);
107 TestUtils.hexStringToByteArray("00010004c0000264");
109 TestUtils.hexStringToByteArray("00010000");
112 TestUtils.hexStringToByteArray("00020000");
117 TestUtils.hexStringToByteArray("08080808");
119 TestUtils.hexStringToByteArray("00030000");
124 TestUtils.hexStringToByteArray("00060004c00002c8");
126 TestUtils.hexStringToByteArray("00060000");
[all …]
DIkeIdPayloadTest.java32 import com.android.internal.net.TestUtils;
107 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv4AddrIdPayload()
120 TestUtils.hexStringToByteArray(IPV6_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeIpv6AddrIdPayload()
132 byte[] inputPacket = TestUtils.hexStringToByteArray(FQDN_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeFqdnIdPayload()
145 byte[] inputPacket = TestUtils.hexStringToByteArray(RFC822_ADDR_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeRfc822AddrIdPayload()
157 byte[] inputPacket = TestUtils.hexStringToByteArray(KEY_ID_PAYLOAD_BODY_HEX_STRING); in testDecodeKeyIdPayload()
169 byte[] inputPacket = TestUtils.hexStringToByteArray(ASN1_DN_PAYLOAD_BODY_HEX_STRING); in testDecodeDerAsn1DnIdPayload()
185 TestUtils.hexStringToByteArray(ASN1_DN_INVALID_PAYLOAD_BODY_HEX_STRING); in testDecodeInvalidDerAsn1DnIdPayload()
196 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_BODY_HEX_STRING); in testDecodeUnsupportedIdType()
215 TestUtils.hexStringToByteArray(IPV4_ADDR_ID_PAYLOAD_RESPONDER_HEX_STRING); in testConstructAndEncodeIpv4AddrIdPayload()
[all …]
DIkeAuthPayloadTest.java26 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()
DIkeKePayloadTest.java19 import static com.android.internal.net.TestUtils.createMockRandomFactory;
29 import com.android.internal.net.TestUtils;
117 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testDecodeIkeKePayload()
124 byte[] keyExchangeData = TestUtils.hexStringToByteArray(KEY_EXCHANGE_DATA_RAW_PACKET); in testDecodeIkeKePayload()
136 byte[] inputPacket = TestUtils.hexStringToByteArray(badKeyPayloadPacket); in testDecodeIkeKePayloadWithInvalidKeData()
147 byte[] inputPacket = TestUtils.hexStringToByteArray(KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
154 TestUtils.hexStringToByteArray(KE_PAYLOAD_GENERIC_HEADER + KE_PAYLOAD_RAW_PACKET); in testEncodeIkeKePayload()
186 byte[] remotePublicKey = TestUtils.hexStringToByteArray(PUBLIC_KEY_REMOTE); in testGetSharedkey()
189 byte[] expectedSharedKeyBytes = TestUtils.hexStringToByteArray(EXPECTED_SHARED_KEY); in testGetSharedkey()
195 byte[] remotePublicKey = TestUtils.hexStringToByteArray(PRIME_1024_BIT_MODP_160_SUBGROUP); in testGetSharedkeyWithInvalidRemoteKey()
DIkeAuthPskPayloadTest.java25 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.java28 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;
173 byte[] sKeySeed = TestUtils.hexStringToByteArray(IKE_SKEYSEED_HEX_STRING); in testMakeIkeSaRecord()
174 byte[] nonceInit = TestUtils.hexStringToByteArray(IKE_NONCE_INIT_HEX_STRING); in testMakeIkeSaRecord()
175 byte[] nonceResp = TestUtils.hexStringToByteArray(IKE_NONCE_RESP_HEX_STRING); in testMakeIkeSaRecord()
204 TestUtils.hexStringToByteArray(IKE_SK_D_HEX_STRING), ikeSaRecord.getSkD()); in testMakeIkeSaRecord()
206 TestUtils.hexStringToByteArray(IKE_SK_AUTH_INIT_HEX_STRING), in testMakeIkeSaRecord()
209 TestUtils.hexStringToByteArray(IKE_SK_AUTH_RESP_HEX_STRING), in testMakeIkeSaRecord()
212 TestUtils.hexStringToByteArray(IKE_SK_ENCR_INIT_HEX_STRING), in testMakeIkeSaRecord()
215 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.java35 import com.android.bluetooth.TestUtils;
75 TestUtils.replaceField(ServiceManager.class, "sCache", null, in setUp()
94 TestUtils.replaceField(ServiceManager.class, "sCache", null, in tearDown()
106 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_NoneResultsNoListen()
117 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceOnly()
130 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrength()
143 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffSignalStrengh()
158 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffAll()
174 BluetoothDevice device1 = TestUtils.getTestDevice(mAdapter, 1); in testListenForPhoneState_MultiDevice_AllUpAllDown()
175 BluetoothDevice device2 = TestUtils.getTestDevice(mAdapter, 2); in testListenForPhoneState_MultiDevice_AllUpAllDown()
[all …]
/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/
DIkeTrafficSelectorTest.java28 import com.android.internal.net.TestUtils;
102 TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + TS_IPV4_TWO_HEX_STRING); in testDecodeIkeTrafficSelectors()
144 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testBuildAndEncodeIkeTrafficSelector()
181 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsType()
195 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidIpProtocol()
209 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING + "FFFF"); in testDecodeIkeTrafficSelectorWithExpectedTrailing()
222 byte[] tsBytes = TestUtils.hexStringToByteArray(TS_IPV4_ONE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidTsLength()
239 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_PORT_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidPortRange()
252 byte[] tsBytes = TestUtils.hexStringToByteArray(TX_IPV4_INVALID_ADDRESS_RANGE_HEX_STRING); in testDecodeIkeTrafficSelectorWithInvalidAddressRange()
331 byte[] expectedBytes = TestUtils.hexStringToByteArray(TS_IPV6_THREE_HEX_ADDRESS); in testBuildAndEncodeIpv6TrafficSelector()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/gatt/
DGattServiceTest.java13 import com.android.bluetooth.TestUtils;
46 TestUtils.setAdapterService(mAdapterService); in setUp()
47 TestUtils.startService(mServiceRule, GattService.class); in setUp()
57 TestUtils.stopService(mServiceRule, GattService.class); in tearDown()
60 TestUtils.clearAdapterService(mAdapterService); in tearDown()
72 TestUtils.stopService(mServiceRule, GattService.class); in testServiceUpAndDown()
76 TestUtils.clearAdapterService(mAdapterService); in testServiceUpAndDown()
78 TestUtils.setAdapterService(mAdapterService); in testServiceUpAndDown()
79 TestUtils.startService(mServiceRule, GattService.class); in testServiceUpAndDown()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerStateMachineTest.java39 import com.android.bluetooth.TestUtils;
110 TestUtils.setAdapterService(mAvrcpAdapterService); in setUp()
111 TestUtils.startService(mAvrcpServiceRule, AvrcpControllerService.class); in setUp()
112 TestUtils.clearAdapterService(mAvrcpAdapterService); in setUp()
113 TestUtils.setAdapterService(mA2dpAdapterService); in setUp()
115 TestUtils.startService(mA2dpServiceRule, A2dpSinkService.class); in setUp()
145 TestUtils.waitForLooperToFinishScheduledTask(mAvrcpStateMachine.getHandler().getLooper()); in tearDown()
148 TestUtils.clearAdapterService(mA2dpAdapterService); in tearDown()
569 TestUtils.waitForLooperToFinishScheduledTask(mAvrcpStateMachine.getHandler().getLooper()); in setNowPlayingList()
628 TestUtils.waitForLooperToFinishScheduledTask(mAvrcpStateMachine.getHandler().getLooper()); in testPlayerChanged()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DSilenceDeviceManagerTest.java36 import com.android.bluetooth.TestUtils;
73 TestUtils.setAdapterService(mAdapterService); in setUp()
92 TestUtils.clearAdapterService(mAdapterService); in tearDown()
118 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceConnectedCase()
126 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceConnectedCase()
155 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in testSetGetDeviceSilenceDisconnectedCase()
178 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in a2dpConnected()
190 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in a2dpDisconnected()
202 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in headsetConnected()
214 TestUtils.waitForLooperToFinishScheduledTask(mLooper); in headsetDisconnected()
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 …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/storage/
DDatabaseManagerTest.java45 import com.android.bluetooth.TestUtils;
93 TestUtils.setAdapterService(mAdapterService); in setUp()
117 TestUtils.clearAdapterService(mAdapterService); in tearDown()
146 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testMetadataDefault()
252 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testRemoveUnusedMetadata_WithSingleBondedDevice()
269 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testRemoveUnusedMetadata_WithSingleBondedDevice()
304 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testRemoveUnusedMetadata_WithMultiBondedDevices()
323 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testRemoveUnusedMetadata_WithMultiBondedDevices()
417 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testSetConnection()
429 TestUtils.waitForLooperToFinishScheduledTask(mDatabaseManager.getHandlerLooper()); in testSetConnection()
[all …]

123456