/frameworks/opt/net/voip/src/jni/rtp/ |
D | AmrCodec.cpp | 102 unsigned char *bytes = (unsigned char *)payload; in encode() local 106 samples, bytes + 1, &type, AMR_TX_WMF); in encode() 113 bytes[0] = 0xF0; in encode() 114 bytes[1] = (mMode << 3) | 0x04; in encode() 118 bytes[0] = 0xFF; in encode() 119 bytes[1] = 0xC0 | (mMode << 1) | 1; in encode() 122 bytes[length + 1] = 0; in encode() 124 bytes[i] = (bytes[i] << 6) | (bytes[i + 1] >> 2); in encode() 133 unsigned char *bytes = (unsigned char *)payload; in decode() local 138 int request = bytes[0] >> 4; in decode() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
D | HexDumpTest.java | 44 byte[] bytes = new byte[256]; in testBytesToHexString_allByteValues() 45 for (int i = 0; i < bytes.length; i++) { in testBytesToHexString_allByteValues() 46 bytes[i] = (byte) (i % 256); in testBytesToHexString_allByteValues() 57 assertEquals(expected, HexDump.toHexString(bytes)); in testBytesToHexString_allByteValues() 63 byte[] bytes = new byte[length]; in testRoundTrip_fromBytes() 64 deterministicRandom.nextBytes(bytes); in testRoundTrip_fromBytes() 65 byte[] reconstruction = hexStringToByteArray(toHexString(bytes)); in testRoundTrip_fromBytes() 67 assertBytesEqual(bytes, reconstruction); in testRoundTrip_fromBytes() 81 byte[] bytes = new byte[32]; in testToHexString_offsetLength() 83 bytes[i] = (byte) i; in testToHexString_offsetLength() [all …]
|
D | BitUtilsTest.java | 104 assertEquals(0x00000000, bytesToBEInt(bytes(0, 0, 0, 0))); in testBytesToInt() 105 assertEquals(0xffffffff, bytesToBEInt(bytes(255, 255, 255, 255))); in testBytesToInt() 106 assertEquals(0x0a000001, bytesToBEInt(bytes(10, 0, 0, 1))); in testBytesToInt() 107 assertEquals(0x0a000002, bytesToBEInt(bytes(10, 0, 0, 2))); in testBytesToInt() 108 assertEquals(0x0a001fff, bytesToBEInt(bytes(10, 0, 31, 255))); in testBytesToInt() 109 assertEquals(0xe0000001, bytesToBEInt(bytes(224, 0, 0, 1))); in testBytesToInt() 111 assertEquals(0x00000000, bytesToLEInt(bytes(0, 0, 0, 0))); in testBytesToInt() 112 assertEquals(0x01020304, bytesToLEInt(bytes(4, 3, 2, 1))); in testBytesToInt() 113 assertEquals(0xffff0000, bytesToLEInt(bytes(0, 0, 255, 255))); in testBytesToInt() 180 static byte[] bytes(int b1, int b2, int b3, int b4) { in bytes() method in BitUtilsTest
|
/frameworks/native/libs/ftl/ |
D | future_test.cpp | 59 ByteVector decrement(ByteVector bytes) { in decrement() argument 60 std::transform(bytes.begin(), bytes.end(), bytes.begin(), [](auto b) { return b - 1; }); in decrement() 61 return bytes; in decrement() 75 [](ByteVector bytes) { return ftl::defer(decrement, std::move(bytes)); }); in TEST() argument 91 .then([&](ByteVector bytes) { in TEST() argument 93 decrement_thread = std::thread(std::move(decrement_bytes), std::move(bytes)); in TEST() 96 .then([](ftl::Future<ByteVector> bytes) { return bytes; }) in TEST() argument 97 .then([](const ByteVector& bytes) { return std::string(bytes.begin(), bytes.end()); }) in TEST() argument
|
/frameworks/rs/ |
D | rsFifoSocket.cpp | 52 bool FifoSocket::writeAsync(const void *data, size_t bytes, bool waitForSpace) { in writeAsync() argument 53 if (bytes == 0) { in writeAsync() 57 size_t ret = ::send(sv[0], data, bytes, 0); in writeAsync() 58 rsAssert(ret == bytes); in writeAsync() 59 if (ret != bytes) { in writeAsync() 60 ALOGE("writeAsync %p %zu ret %zu", data, bytes, ret); in writeAsync() 76 size_t FifoSocket::read(void *data, size_t bytes) { in read() argument 82 size_t ret = ::recv(sv[1], data, bytes, MSG_WAITALL); in read() 83 rsAssert(ret == bytes || mShutdown); in read() 101 void FifoSocket::readReturn(const void *data, size_t bytes) { in readReturn() argument [all …]
|
/frameworks/base/core/java/android/os/incremental/ |
D | V4Signature.java | 67 public static HashingInfo fromByteArray(@NonNull byte[] bytes) throws IOException { in fromByteArray() argument 68 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray() 101 public static SigningInfo fromByteArray(byte[] bytes) throws IOException { in fromByteArray() argument 102 return fromByteBuffer(ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN)); in fromByteArray() 161 public static SigningInfos fromByteArray(byte[] bytes) throws IOException { in fromByteArray() argument 162 ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray() 203 public static V4Signature readFrom(@NonNull byte[] bytes) throws IOException { in readFrom() argument 204 try (InputStream stream = new ByteArrayInputStream(bytes)) { in readFrom() 275 private static int bytesSize(byte[] bytes) { in bytesSize() argument 276 return 4/*length*/ + (bytes == null ? 0 : bytes.length); in bytesSize() [all …]
|
/frameworks/base/telephony/common/com/google/android/mms/pdu/ |
D | QuotedPrintable.java | 42 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument 43 if (bytes == null) { in decodeQuotedPrintable() 47 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable() 48 int b = bytes[i]; in decodeQuotedPrintable() 51 if('\r' == (char)bytes[i + 1] && in decodeQuotedPrintable() 52 '\n' == (char)bytes[i + 2]) { in decodeQuotedPrintable() 56 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable() 57 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | WakeLockLog.java | 504 LogEntry fromBytes(byte[] bytes, long timeReference, LogEntry entryToReuse) { in fromBytes() argument 505 if (bytes == null || bytes.length == 0) { in fromBytes() 512 int type = (bytes[0] >> 6) & 0x3; in fromBytes() 519 if (bytes.length < 3) { in fromBytes() 523 int flags = bytes[0] & MASK_LOWER_6_BITS; in fromBytes() 524 int tagIndex = bytes[1] & MASK_LOWER_7_BITS; in fromBytes() 526 long time = (bytes[2] & 0xFF) + timeReference; in fromBytes() 531 if (bytes.length < 2) { in fromBytes() 536 int tagIndex = bytes[0] & MASK_LOWER_7_BITS; in fromBytes() 538 long time = (bytes[1] & 0xFF) + timeReference; in fromBytes() [all …]
|
/frameworks/native/libs/binder/tests/ |
D | binderAllocationLimits.cpp | 59 static void* lambda_realloc_hook(void* ptr, size_t bytes, const void* arg); 60 static void* lambda_malloc_hook(size_t bytes, const void* arg); 67 static void* lambda_malloc_hook(size_t bytes, const void* arg) { in lambda_malloc_hook() argument 70 lambdas.at(lambdas.size() - 1)(bytes); in lambda_malloc_hook() 73 return orig_malloc_hooks.malloc_hook(bytes, arg); in lambda_malloc_hook() 76 static void* lambda_realloc_hook(void* ptr, size_t bytes, const void* arg) { in lambda_realloc_hook() argument 79 lambdas.at(lambdas.size() - 1)(bytes); in lambda_realloc_hook() 82 return orig_malloc_hooks.realloc_hook(ptr, bytes, arg); in lambda_realloc_hook() 106 const auto on_malloc = OnMalloc([&](size_t bytes) { in TEST() argument 108 EXPECT_EQ(bytes, 40); in TEST() [all …]
|
/frameworks/layoutlib/delegates/src/dalvik/system/ |
D | VMRuntimeCommonHelper.java | 33 int bytes = 20 + (2 * minLength); in newUnpaddedArray() local 34 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray() 42 int bytes = 20 + minLength; in newUnpaddedArray() local 43 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray() 48 int bytes = 20 + minLength; in newUnpaddedArray() local 49 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray() 54 int bytes = 20 + (2 * minLength); in newUnpaddedArray() local 55 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | CharSequences.java | 32 public static CharSequence forAsciiBytes(final byte[] bytes) { in forAsciiBytes() argument 35 return (char) bytes[index]; in forAsciiBytes() 39 return bytes.length; in forAsciiBytes() 43 return forAsciiBytes(bytes, start, end); in forAsciiBytes() 47 return new String(bytes); in forAsciiBytes() 63 public static CharSequence forAsciiBytes(final byte[] bytes, 65 validate(start, end, bytes.length); 68 return (char) bytes[index + start]; 79 return forAsciiBytes(bytes, newStart, newEnd); 83 return new String(bytes, start, length());
|
D | BitUtils.java | 103 public static int bytesToBEInt(byte[] bytes) { in bytesToBEInt() argument 104 return (uint8(bytes[0]) << 24) in bytesToBEInt() 105 + (uint8(bytes[1]) << 16) in bytesToBEInt() 106 + (uint8(bytes[2]) << 8) in bytesToBEInt() 107 + (uint8(bytes[3])); in bytesToBEInt() 110 public static int bytesToLEInt(byte[] bytes) { in bytesToLEInt() argument 111 return Integer.reverseBytes(bytesToBEInt(bytes)); in bytesToLEInt() 126 public static void put(ByteBuffer buffer, int position, byte[] bytes) { in put() argument 129 buffer.put(bytes); in put()
|
/frameworks/base/services/core/java/com/android/server/integrity/parser/ |
D | RandomAccessObject.java | 34 public abstract int read(byte[] bytes, int off, int len) throws IOException; in read() argument 48 public static RandomAccessObject ofBytes(byte[] bytes) { in ofBytes() argument 49 return new RandomAccessByteArrayObject(bytes); in ofBytes() 78 public int read(byte[] bytes, int off, int len) throws IOException { in read() argument 79 return mRandomAccessFile.read(bytes, off, len); in read() 97 RandomAccessByteArrayObject(byte[] bytes) { in RandomAccessByteArrayObject() argument 98 mBytes = ByteBuffer.wrap(bytes); in RandomAccessByteArrayObject() 116 public int read(byte[] bytes, int off, int len) throws IOException { in read() argument 121 mBytes.get(bytes, off, len); in read()
|
/frameworks/native/libs/gralloc/types/fuzzer/ |
D | util.cpp | 24 std::string hexString(const void* bytes, size_t len) { in hexString() argument 25 if (bytes == nullptr) return "<null>"; in hexString() 27 const uint8_t* bytes8 = static_cast<const uint8_t*>(bytes); in hexString() 39 std::string hexString(const std::vector<uint8_t>& bytes) { in hexString() argument 40 return hexString(bytes.data(), bytes.size()); in hexString()
|
/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/utils/ |
D | BytesConverter.java | 38 public static String convertBytesToHexString(byte[] bytes) { in convertBytesToHexString() argument 39 if (bytes == null) { in convertBytesToHexString() 43 StringBuilder ret = new StringBuilder(2 * bytes.length); in convertBytesToHexString() 45 for (int i = 0; i < bytes.length; i++) { in convertBytesToHexString() 47 b = 0x0f & (bytes[i] >> 4); in convertBytesToHexString() 49 b = 0x0f & bytes[i]; in convertBytesToHexString()
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | CharSequencesTest.java | 30 byte[] bytes = s.getBytes(); in testCharSequences() 32 String copy = toString(forAsciiBytes(bytes)); in testCharSequences() 35 copy = toString(forAsciiBytes(bytes, 0, s.length())); in testCharSequences() 38 String hello = toString(forAsciiBytes(bytes, 0, 5)); in testCharSequences() 41 String l = toString(forAsciiBytes(bytes, 0, 3).subSequence(2, 3)); in testCharSequences() 44 String empty = toString(forAsciiBytes(bytes, 0, 3).subSequence(3, 3)); in testCharSequences()
|
/frameworks/base/services/core/jni/gnss/ |
D | GnssPsds.cpp | 45 jbyte* bytes = reinterpret_cast<jbyte*>(env->GetPrimitiveArrayCritical(data, 0)); in injectPsdsData() local 47 std::vector<uint8_t>((const uint8_t*)bytes, in injectPsdsData() 48 (const uint8_t*)bytes + length)); in injectPsdsData() 50 env->ReleasePrimitiveArrayCritical(data, bytes, JNI_ABORT); in injectPsdsData() 67 jbyte* bytes = reinterpret_cast<jbyte*>(env->GetPrimitiveArrayCritical(data, 0)); in injectPsdsData() local 68 auto result = mIGnssXtra->injectXtraData(std::string((const char*)bytes, length)); in injectPsdsData() 70 env->ReleasePrimitiveArrayCritical(data, bytes, JNI_ABORT); in injectPsdsData()
|
/frameworks/base/core/java/android/util/ |
D | Base64InputStream.java | 103 long bytes = Math.min(n, outputEnd-outputStart); in skip() local 104 outputStart += bytes; in skip() 105 return bytes; in skip() 126 int bytes = Math.min(len, outputEnd-outputStart); in read() local 127 System.arraycopy(coder.output, outputStart, b, off, bytes); in read() 128 outputStart += bytes; in read() 129 return bytes; in read()
|
D | EventLog.java | 242 byte[] bytes; in encodeObject() 244 bytes = string.getBytes("UTF-8"); in encodeObject() 246 bytes = new byte[0]; in encodeObject() 248 return ByteBuffer.allocate(1 + 4 + bytes.length) in encodeObject() 251 .putInt(bytes.length) in encodeObject() 252 .put(bytes) in encodeObject() 259 byte[][] bytes = new byte[objects.length][]; in encodeObject() 262 bytes[i] = encodeObject(objects[i]); in encodeObject() 263 totalLength += bytes[i].length; in encodeObject() 270 buffer.put(bytes[i]); in encodeObject() [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/ |
D | AudioSample.java | 23 public final byte[] bytes; field in AudioSample 25 public AudioSample(int sampleRate, int channelCount, byte[] bytes) { in AudioSample() argument 28 this.bytes = bytes; in AudioSample()
|
/frameworks/av/services/audioflinger/ |
D | SpdifStreamOut.h | 63 virtual ssize_t write(const void* buffer, size_t bytes); 101 virtual ssize_t writeOutput(const void* buffer, size_t bytes) in writeOutput() argument 103 return mSpdifStreamOut->writeDataBurst(buffer, bytes); in writeOutput() 114 ssize_t writeDataBurst(const void* data, size_t bytes); 115 ssize_t writeInternal(const void* buffer, size_t bytes);
|
/frameworks/av/media/libstagefright/rtsp/include/media/stagefright/rtsp/ |
D | TrafficRecorder.h | 55 void writeBytes(Bytes bytes); 119 Bytes bytes = 0; in readBytesForLastPeriod() local 124 << "\t\t Bytes:" << mBytesArray[i] << "\t\t Accu: " << bytes; in readBytesForLastPeriod() 128 bytes += mBytesArray[i]; in readBytesForLastPeriod() 133 return bytes; in readBytesForLastPeriod() 137 void TrafficRecorder<Time, Bytes>::writeBytes(Bytes bytes) { in writeBytes() argument 141 mBytesArray[writeIdx] += bytes; in writeBytes() 145 mBytesArray[writeIdx] = bytes; in writeBytes() 154 mAccuBytes += bytes; in writeBytes()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | PulledStatsTest.java | 57 ByteArrayOutputStream bytes = new ByteArrayOutputStream(); in testPulledStats_UnknownReport() local 58 final ProtoOutputStream proto = new ProtoOutputStream(bytes); in testPulledStats_UnknownReport() 63 assertEquals(0L, bytes.size()); in testPulledStats_UnknownReport() 77 ByteArrayOutputStream bytes = new ByteArrayOutputStream(); in testPulledStats_RemoteViewReportPackages() local 78 final ProtoOutputStream protoStream = new ProtoOutputStream(bytes); in testPulledStats_RemoteViewReportPackages() 84 NotificationRemoteViewsProto.parseFrom(bytes.toByteArray()); in testPulledStats_RemoteViewReportPackages()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | BluetoothMediaDeviceTest.java | 82 final byte[] bytes = value.getBytes(); in isFastPairDevice_isUntetheredHeadset_returnTrue() 84 .thenReturn(bytes); in isFastPairDevice_isUntetheredHeadset_returnTrue() 95 final byte[] bytes = value.getBytes(); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 97 .thenReturn(bytes); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 108 final byte[] bytes = value.getBytes(); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable() 110 .thenReturn(bytes); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/powerstats/ |
D | PowerStatsServiceTest.java | 438 byte[] bytes = new byte[100]; in testCorruptOnDeviceMeterStorage() 439 rd.nextBytes(bytes); in testCorruptOnDeviceMeterStorage() 445 onDeviceStorageFos.write(bytes); in testCorruptOnDeviceMeterStorage() 481 byte[] bytes = new byte[100]; in testCorruptOnDeviceModelStorage() 482 rd.nextBytes(bytes); in testCorruptOnDeviceModelStorage() 488 onDeviceStorageFos.write(bytes); in testCorruptOnDeviceModelStorage() 522 byte[] bytes = new byte[100]; in testCorruptOnDeviceResidencyStorage() 523 rd.nextBytes(bytes); in testCorruptOnDeviceResidencyStorage() 529 onDeviceStorageFos.write(bytes); in testCorruptOnDeviceResidencyStorage() 713 byte[] bytes = new byte[100]; in testDataStorageDeletedMeterMismatch() [all …]
|