Home
last modified time | relevance | path

Searched refs:byteArray (Results 1 – 25 of 42) sorted by relevance

12

/packages/apps/SecureElement/src/com/android/se/internal/
DByteArrayConverter.java111 public static String byteArrayToHexString(byte[] byteArray) { in byteArrayToHexString() argument
112 if (byteArray == null) { in byteArrayToHexString()
115 return byteArrayToHexString(byteArray, 0, byteArray.length); in byteArrayToHexString()
177 public static int byteArrayToInt(byte[] byteArray) { in byteArrayToInt() argument
178 switch (byteArray.length) { in byteArrayToInt()
182 return (byteArray[0] & 0xFF); in byteArrayToInt()
184 return (byteArray[0] & 0xFF) << 8 | (byteArray[1] & 0xFF); in byteArrayToInt()
186 return (byteArray[0] & 0xFF) << 16 | (byteArray[1] & 0xFF) << 8 | (byteArray[2] in byteArrayToInt()
189 return (byteArray[0] & 0xFF) << 24 in byteArrayToInt()
190 | (byteArray[1] & 0xFF) << 16 in byteArrayToInt()
[all …]
/packages/modules/Uwb/service/java/com/android/server/uwb/util/
DUwbUtil.java45 byte[] byteArray = new byte[4]; in toHexString()
46 byteArray[0] = (byte) (var & 0xff); in toHexString()
47 byteArray[1] = (byte) ((var >> 8) & 0xff); in toHexString()
48 byteArray[2] = (byte) ((var >> 16) & 0xff); in toHexString()
49 byteArray[3] = (byte) ((var >> 24) & 0xff); in toHexString()
51 for (byte b : byteArray) { in toHexString()
60 byte[] byteArray = new byte[8]; in toHexString()
61 byteArray[0] = (byte) (var & 0xff); in toHexString()
62 byteArray[1] = (byte) ((var >> 8) & 0xff); in toHexString()
63 byteArray[2] = (byte) ((var >> 16) & 0xff); in toHexString()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/
DObexAppParametersTest.java43 byte[] byteArray = in constructorWithByteArrays_withOneInvalidElement()
48 ObexAppParameters params = new ObexAppParameters(byteArray); in constructorWithByteArrays_withOneInvalidElement()
51 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in constructorWithByteArrays_withOneInvalidElement()
58 byte[] byteArray = in constructorWithByteArrays_withTwoInvalidElements()
63 ObexAppParameters params = new ObexAppParameters(byteArray); in constructorWithByteArrays_withTwoInvalidElements()
66 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in constructorWithByteArrays_withTwoInvalidElements()
73 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in fromHeaderSet()
76 headerSet.setHeader(HeaderSet.APPLICATION_PARAMETER, byteArray); in fromHeaderSet()
81 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in fromHeaderSet()
88 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in addToHeaderSet()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DNativeUtil.java65 byte[] byteArray = new byte[encoded.remaining()]; in stringToByteArrayList()
66 encoded.get(byteArray); in stringToByteArrayList()
67 return byteArrayToArrayList(byteArray); in stringToByteArrayList()
83 byte[] byteArray = new byte[byteArrayList.size()]; in stringFromByteArrayList()
86 byteArray[i] = b; in stringFromByteArrayList()
89 return new String(byteArray, StandardCharsets.UTF_8); in stringFromByteArrayList()
111 public static String stringFromByteArray(byte[] byteArray) { in stringFromByteArray() argument
112 if (byteArray == null) { in stringFromByteArray()
115 return new String(byteArray); in stringFromByteArray()
274 byte[] byteArray = byteArrayFromArrayList(bytes); in bytesToHexOrQuotedString()
[all …]
DStringUtil.java29 public static boolean isAsciiPrintable(byte[] byteArray) { in isAsciiPrintable() argument
30 if (byteArray == null) { in isAsciiPrintable()
34 for (byte b : byteArray) { in isAsciiPrintable()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/
DCollectionUtils.java85 for (byte[] byteArray : byteArrays) { in contains()
86 if (Arrays.equals(byteArray, otherByteArray)) { in contains()
105 for (byte[] byteArray : otherByteArrays) { in containsSubset()
106 if (!contains(byteArrays, byteArray)) { in containsSubset()
/packages/modules/IPsec/src/java/android/net/ipsec/ike/exceptions/
DIkeProtocolException.java174 protected static int byteArrayToInteger(byte[] byteArray) { in byteArrayToInteger() argument
175 if (byteArray == null || byteArray.length > INTEGER_BYTE_SIZE) { in byteArrayToInteger()
180 byte[] zeroPad = new byte[INTEGER_BYTE_SIZE - byteArray.length]; in byteArrayToInteger()
181 dataBuffer.put(zeroPad).put(byteArray); in byteArrayToInteger()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/exif/
DCountedDataInputStream.java33 private final byte[] byteArray = new byte[8]; field in CountedDataInputStream
34 private final ByteBuffer byteBuffer = ByteBuffer.wrap(byteArray);
105 readOrThrow(byteArray, 0, 2); in readShort()
115 readOrThrow(byteArray, 0, 4); in readInt()
/packages/modules/IPsec/src/java/com/android/internal/net/utils/
DBigIntegerUtils.java39 public static BigInteger unsignedByteArrayToBigInteger(byte[] byteArray) { in unsignedByteArrayToBigInteger() argument
40 return new BigInteger(1/** positive */, byteArray); in unsignedByteArrayToBigInteger()
/packages/apps/Messaging/src/android/support/v7/mms/pdu/
DPduPart.java155 byte[] byteArray = new byte[mPartData.length]; in getData()
156 System.arraycopy(mPartData, 0, byteArray, 0, mPartData.length); in getData()
157 return byteArray; in getData()
DEncodedStringValue.java107 byte[] byteArray = new byte[mData.length]; in getTextString()
109 System.arraycopy(mData, 0, byteArray, 0, mData.length); in getTextString()
110 return byteArray; in getTextString()
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/
DBlockedNumberBackupAgent.java213 byte[] byteArray = new byte[data.getDataSize()]; in readBlockedNumberFromData()
214 data.readEntityData(byteArray, 0, byteArray.length); in readBlockedNumberFromData()
215 DataInputStream dataInput = new DataInputStream(new ByteArrayInputStream(byteArray)); in readBlockedNumberFromData()
/packages/modules/AppSearch/testing/safeparceltests/src/android/app/appsearch/safeparcel/
DTestSafeParcelableV2.java65 public byte[] byteArray; field in TestSafeParcelableV2
193 @Param(id = 4) byte[] byteArray, in TestSafeParcelableV2()
238 this.byteArray = byteArray; in TestSafeParcelableV2()
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
DEncodedStringValue.java122 byte[] byteArray = new byte[mData.length]; in getTextString()
124 System.arraycopy(mData, 0, byteArray, 0, mData.length); in getTextString()
125 return byteArray; in getTextString()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DSupplicantStaNetworkCallbackAidlImpl.java127 private String byteArrayToString(byte[] byteArray) { in byteArrayToString() argument
129 if (byteArray == null) return null; in byteArrayToString()
132 CharBuffer decoded = decoder.decode(ByteBuffer.wrap(byteArray)); in byteArrayToString()
/packages/apps/Settings/tests/unit/src/com/android/settings/fingerprint2/ui/settings/
DFingerprintSettingsNavigationViewModelTest.kt178 val byteArray = ByteArray(1) { 3 } in firstEnrollmentSucceeds_noKeyChallenge() constant
181 underTest.onEnrollFirst(byteArray, null) in firstEnrollmentSucceeds_noKeyChallenge()
196 val byteArray = ByteArray(1) { 3 } in firstEnrollment_succeeds() constant
200 underTest.onEnrollFirst(byteArray, keyChallenge) in firstEnrollment_succeeds()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/classifier/
DCommonClassifierHelper.java79 byte[] byteArray = new byte[8192]; in computeClassifierAssetChecksum()
83 while ((byteCount = inputStream.read(byteArray)) != -1) { in computeClassifierAssetChecksum()
84 sha256Digest.update(byteArray, 0, byteCount); in computeClassifierAssetChecksum()
/packages/modules/Uwb/service/java/com/android/server/uwb/secure/iso7816/
DTlvParser.java45 ByteArrayWrapper(byte[] byteArray) { in ByteArrayWrapper() argument
46 this.mByteBuffer = ByteBuffer.wrap(byteArray); in ByteArrayWrapper()
/packages/modules/Wifi/framework/java/android/net/wifi/
DIByteArrayListener.aidl26 void onResult(in byte[] byteArray); in onResult() argument
/packages/modules/StatsD/tests/utils/src/android/util/
DStatsEventTestUtils.java144 byte[] byteArray = getByteArrayFromByteBuffer(buf); in parseField()
145 proto.write(FIELD_TYPE_MESSAGE | FIELD_COUNT_SINGLE | tag, byteArray); in parseField()
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/
DOsuServerConnection.java538 byte[] byteArray = bos.toByteArray(); in getCert()
540 String s = new String(byteArray); in getCert()
541 byteArray = android.util.Base64.decode(s, android.util.Base64.DEFAULT); in getCert()
545 new ByteArrayInputStream(byteArray)); in getCert()
/packages/apps/CellBroadcastReceiver/tests/compliancetests/src/com/android/cellbroadcastreceiver/compliancetests/
DCellBroadcastBaseTest.java268 byte[] byteArray = new byte[size]; in loadJsonFile()
269 inputStream.read(byteArray); in loadJsonFile()
271 json = new String(byteArray, "UTF-8"); in loadJsonFile()
/packages/apps/Settings/tests/unit/src/com/android/settings/fingerprint2/domain/interactor/
DFingerprintManagerInteractorTest.kt164 val byteArray = byteArrayOf(5, 3, 2) in testGenerateChallenge() constant
175 .thenReturn(byteArray) in testGenerateChallenge()
191 assertThat(result?.second).isEqualTo(byteArray) in testGenerateChallenge()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareServiceImplTest.java553 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testPublishServiceNameTooLong()
555 byteArray[i] = 'a'; in testPublishServiceNameTooLong()
557 doBadPublishConfiguration(new String(byteArray), null, null); in testPublishServiceNameTooLong()
687 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testSubscribeServiceNameTooLong()
689 byteArray[i] = 'a'; in testSubscribeServiceNameTooLong()
691 doBadSubscribeConfiguration(new String(byteArray), null, null); in testSubscribeServiceNameTooLong()
/packages/providers/CallLogProvider/src/com/android/calllogbackup/
DCallLogBackupAgent.java449 byte [] byteArray = new byte[data.getDataSize()]; in readCallFromData()
450 data.readEntityData(byteArray, 0, byteArray.length); in readCallFromData()
451 DataInputStream dataInput = new DataInputStream(new ByteArrayInputStream(byteArray)); in readCallFromData()

12