/packages/apps/SecureElement/src/com/android/se/internal/ |
D | ByteArrayConverter.java | 111 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/ |
D | UwbUtil.java | 45 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/ |
D | ObexAppParametersTest.java | 44 byte[] byteArray = in constructorWithByteArrays_withOneInvalidElement() 49 ObexAppParameters params = new ObexAppParameters(byteArray); in constructorWithByteArrays_withOneInvalidElement() 52 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in constructorWithByteArrays_withOneInvalidElement() 59 byte[] byteArray = in constructorWithByteArrays_withTwoInvalidElements() 64 ObexAppParameters params = new ObexAppParameters(byteArray); in constructorWithByteArrays_withTwoInvalidElements() 67 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in constructorWithByteArrays_withTwoInvalidElements() 74 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in fromHeaderSet() 77 headerSet.setHeader(HeaderSet.APPLICATION_PARAMETER, byteArray); in fromHeaderSet() 82 byte[] expected = Arrays.copyOfRange(byteArray, 2, 6); in fromHeaderSet() 89 byte[] byteArray = new byte[] {KEY, length, 0x12, 0x34, 0x56, 0x78}; in addToHeaderSet() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | NativeUtil.java | 67 byte[] byteArray = new byte[encoded.remaining()]; in stringToByteArrayList() 68 encoded.get(byteArray); in stringToByteArrayList() 69 return byteArrayToArrayList(byteArray); in stringToByteArrayList() 85 byte[] byteArray = new byte[byteArrayList.size()]; in stringFromByteArrayList() 88 byteArray[i] = b; in stringFromByteArrayList() 91 return new String(byteArray, StandardCharsets.UTF_8); in stringFromByteArrayList() 113 public static String stringFromByteArray(byte[] byteArray) { in stringFromByteArray() argument 114 if (byteArray == null) { in stringFromByteArray() 117 return new String(byteArray); in stringFromByteArray() 276 byte[] byteArray = byteArrayFromArrayList(bytes); in bytesToHexOrQuotedString() [all …]
|
D | StringUtil.java | 29 public static boolean isAsciiPrintable(byte[] byteArray) { in isAsciiPrintable() argument 30 if (byteArray == null) { in isAsciiPrintable() 34 for (byte b : byteArray) { in isAsciiPrintable()
|
/packages/modules/Uwb/ranging/service/java/com/android/server/ranging/ |
D | RangingUtils.java | 133 byte[] byteArray = new byte[expectedSizeBytes]; in intListToByteArrayBitmap() 134 System.arraycopy(bitSet.toByteArray(), 0, byteArray, 0, in intListToByteArrayBitmap() local 136 return byteArray; in intListToByteArrayBitmap() 144 public static ImmutableList<Integer> byteArrayToIntList(byte[] byteArray, int shift) { in byteArrayToIntList() argument 146 BitSet bitSet = BitSet.valueOf(byteArray); in byteArrayToIntList() 159 byte[] byteArray = new byte[expectedSizeBytes]; in intToByteArray() 160 buffer.get(byteArray, 0, min(expectedSizeBytes, 4)); in intToByteArray() 161 return byteArray; in intToByteArray() 165 public static int byteArrayToInt(byte[] byteArray) { in byteArrayToInt() argument 167 buffer.put(byteArray).rewind(); in byteArrayToInt()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | CollectionUtils.java | 85 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/ |
D | IkeProtocolException.java | 174 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/ |
D | CountedDataInputStream.java | 33 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/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/ |
D | AggregateCryptoConverter.java | 181 final byte[] byteArray = new byte[byteSize]; in getByteArrayForBigInteger() 185 final int position = byteArray.length - length; in getByteArrayForBigInteger() 187 System.arraycopy(sourceByteArray, srcPosExcludingSign, byteArray, position, length); in getByteArrayForBigInteger() 188 return byteArray; in getByteArrayForBigInteger()
|
/packages/modules/IPsec/src/java/com/android/internal/net/utils/ |
D | BigIntegerUtils.java | 39 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/ |
D | PduPart.java | 155 byte[] byteArray = new byte[mPartData.length]; in getData() 156 System.arraycopy(mPartData, 0, byteArray, 0, mPartData.length); in getData() 157 return byteArray; in getData()
|
D | EncodedStringValue.java | 107 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/modules/AdServices/adservices/service-core/java/com/android/adservices/cobalt/ |
D | CobaltPublicKeyLoader.java | 198 byte[] byteArray = new byte[numberStrings.length]; in stringToByteArray() 200 byteArray[i] = Byte.parseByte(numberStrings[i].trim()); in stringToByteArray() 203 return byteArray; in stringToByteArray()
|
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/ |
D | BlockedNumberBackupAgent.java | 213 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/ |
D | TestSafeParcelableV2.java | 65 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/ |
D | EncodedStringValue.java | 122 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/ |
D | SupplicantStaNetworkCallbackAidlImpl.java | 127 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/ |
D | FingerprintSettingsNavigationViewModelTest.kt | 179 val byteArray = ByteArray(1) { 3 } in firstEnrollmentSucceeds_noKeyChallenge() constant 182 underTest.onEnrollFirst(byteArray, null) in firstEnrollmentSucceeds_noKeyChallenge() 197 val byteArray = ByteArray(1) { 3 } in firstEnrollment_succeeds() constant 201 underTest.onEnrollFirst(byteArray, keyChallenge) in firstEnrollment_succeeds()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/classifier/ |
D | CommonClassifierHelper.java | 79 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/ |
D | TlvParser.java | 45 ByteArrayWrapper(byte[] byteArray) { in ByteArrayWrapper() argument 46 this.mByteBuffer = ByteBuffer.wrap(byteArray); in ByteArrayWrapper()
|
/packages/modules/StatsD/tests/utils/src/android/util/ |
D | StatsEventTestUtils.java | 144 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/ |
D | OsuServerConnection.java | 538 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/modules/Wifi/framework/java/android/net/wifi/ |
D | IByteArrayListener.aidl | 26 void onResult(in byte[] byteArray); in onResult() argument
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/ |
D | WifiAwareServiceImplTest.java | 554 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testPublishServiceNameTooLong() 556 byteArray[i] = 'a'; in testPublishServiceNameTooLong() 558 doBadPublishConfiguration(new String(byteArray), null, null); in testPublishServiceNameTooLong() 688 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testSubscribeServiceNameTooLong() 690 byteArray[i] = 'a'; in testSubscribeServiceNameTooLong() 692 doBadSubscribeConfiguration(new String(byteArray), null, null); in testSubscribeServiceNameTooLong()
|