/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/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 …]
|
D | rsThreadIO.cpp | 52 hdr->bytes = dataLen; in coreHeader() 135 mToCore.read(&buf[sizeof(CoreCmdHeader)], cmd->bytes); in playCoreCommands() 152 gPlaybackFuncs[cmd->cmdID](con, data, cmd->bytes); in playCoreCommands() 178 receiveLen[0] = mLastClientHeader.bytes; in getClientHeader() 187 receiveLen[0] = mLastClientHeader.bytes; in getClientPayload() 189 if (bufferLen < mLastClientHeader.bytes) { in getClientPayload() 204 hdr.bytes = (uint32_t)dataLen; in sendToClient()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | InformationElementUtilTest.java | 118 TEST_SSID_BYTES, results[0].bytes); in parseInformationElements_withSingleElement() 141 TEST_SSID_BYTES, results[0].bytes); in parseInformationElements_withExtraPadding() 164 TEST_SSID_BYTES, results[0].bytes); in parseInformationElements_secondElementInvalidLength() 185 TEST_SSID_BYTES, results[0].bytes); in parseInformationElements_twoElements() 188 assertEquals("second element should have data of length 1", 1, results[1].bytes.length); in parseInformationElements_twoElements() 190 (byte) 0x08, results[1].bytes[0]); in parseInformationElements_twoElements() 211 assertEquals("First element should be length 0", 0, results[0].bytes.length); in parseInformationElements_firstElementZeroLength() 215 TEST_SSID_BYTES, results[1].bytes); in parseInformationElements_firstElementZeroLength() 241 assertEquals("First result should have data of 1 byte", 1, results[0].bytes.length); in parseInformationElements_firstElementWrongLength() 243 invalidLengthTagWithSSIDBytes[2], results[0].bytes[0]); in parseInformationElements_firstElementWrongLength() [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/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/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/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | InformationElementUtil.java | 35 public static InformationElement[] parseInformationElements(byte[] bytes) { in parseInformationElements() argument 36 if (bytes == null) { in parseInformationElements() 39 ByteBuffer data = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN); in parseInformationElements() 60 ie.bytes = new byte[elementLength]; in parseInformationElements() 61 data.get(ie.bytes); in parseInformationElements() 142 if (ie.bytes.length != 5) { in from() 144 + ie.bytes.length); in from() 146 ByteBuffer data = ByteBuffer.wrap(ie.bytes).order(ByteOrder.LITTLE_ENDIAN); in from() 184 secondChannelOffset = ie.bytes[1] & 0x3; in from() 218 channelMode = ie.bytes[0] & Constants.BYTE_MASK; in from() [all …]
|
D | NativeUtil.java | 249 public static String bytesToHexOrQuotedString(ArrayList<Byte> bytes) { in bytesToHexOrQuotedString() argument 250 if (bytes == null) { in bytesToHexOrQuotedString() 253 byte[] byteArray = byteArrayFromArrayList(bytes); in bytesToHexOrQuotedString() 255 if (!bytes.contains(Byte.valueOf((byte) 0))) { in bytesToHexOrQuotedString() 303 public static ArrayList<Byte> byteArrayToArrayList(byte[] bytes) { in byteArrayToArrayList() argument 305 for (Byte b : bytes) { in byteArrayToArrayList() 314 public static byte[] byteArrayFromArrayList(ArrayList<Byte> bytes) { in byteArrayFromArrayList() argument 315 byte[] byteArray = new byte[bytes.size()]; in byteArrayFromArrayList() 317 for (Byte b : bytes) { in byteArrayFromArrayList() 342 public static String hexStringFromByteArray(byte[] bytes) { in hexStringFromByteArray() argument [all …]
|
/frameworks/layoutlib/bridge/src/dalvik/system/ |
D | VMRuntime_Delegate.java | 39 int bytes = 20 + (2 * minLength); in newUnpaddedArray() local 40 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 + minLength; in newUnpaddedArray() local 55 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray() 60 int bytes = 20 + (2 * minLength); in newUnpaddedArray() local 61 int alignedUpBytes = (bytes + 7) & -8; in newUnpaddedArray()
|
/frameworks/base/core/java/android/bluetooth/ |
D | UidTraffic.java | 54 public void setRxBytes(long bytes) { in setRxBytes() argument 55 mRxBytes = bytes; in setRxBytes() 58 public void setTxBytes(long bytes) { in setTxBytes() argument 59 mTxBytes = bytes; in setTxBytes() 62 public void addRxBytes(long bytes) { in addRxBytes() argument 63 mRxBytes += bytes; in addRxBytes() 66 public void addTxBytes(long bytes) { in addTxBytes() argument 67 mTxBytes += bytes; in addTxBytes()
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | CharSequencesTest.java | 29 byte[] bytes = s.getBytes(); in testCharSequences() 31 String copy = toString(forAsciiBytes(bytes)); in testCharSequences() 34 copy = toString(forAsciiBytes(bytes, 0, s.length())); in testCharSequences() 37 String crazy = toString(forAsciiBytes(bytes, 0, 5)); in testCharSequences() 40 String a = toString(forAsciiBytes(bytes, 0, 3).subSequence(2, 3)); in testCharSequences() 43 String empty = toString(forAsciiBytes(bytes, 0, 3).subSequence(3, 3)); in testCharSequences()
|
/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()
|
/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/base/tests/net/java/com/android/internal/util/ |
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/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/base/wifi/tests/src/android/net/wifi/rtt/ |
D | WifiRttManagerTest.java | 152 byte[] bytes = parcelW.marshall(); in testRangingRequestParcel() 156 parcelR.unmarshall(bytes, 0, bytes.length); in testRangingRequestParcel() 250 byte[] bytes = parcelW.marshall(); in testRangingResultsParcel() 254 parcelR.unmarshall(bytes, 0, bytes.length); in testRangingResultsParcel() 266 bytes = parcelW.marshall(); in testRangingResultsParcel() 270 parcelR.unmarshall(bytes, 0, bytes.length); in testRangingResultsParcel() 314 byte[] bytes = parcelW.marshall(); in testResponderConfigParcel() 318 parcelR.unmarshall(bytes, 0, bytes.length); in testResponderConfigParcel() 331 bytes = parcelW.marshall(); in testResponderConfigParcel() 335 parcelR.unmarshall(bytes, 0, bytes.length); in testResponderConfigParcel()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | NativeCrashListener.java | 235 int bytes; in consumeNativeCrashData() local 238 bytes = Os.read(fd, buf, 0, buf.length); in consumeNativeCrashData() 239 if (bytes > 0) { in consumeNativeCrashData() 241 String s = new String(buf, 0, bytes, "UTF-8"); in consumeNativeCrashData() 242 Slog.v(TAG, "READ=" + bytes + "> " + s); in consumeNativeCrashData() 245 if (buf[bytes-1] == 0) { in consumeNativeCrashData() 246 os.write(buf, 0, bytes-1); // exclude the EOD token in consumeNativeCrashData() 250 os.write(buf, 0, bytes); in consumeNativeCrashData() 252 } while (bytes > 0); in consumeNativeCrashData()
|
/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/native/libs/binder/ |
D | IpPrefix.cpp | 55 const uint8_t* bytes = reinterpret_cast<const uint8_t*>(&mUnion.mIn6Addr); in writeToParcel() local 56 byte_vector.insert(byte_vector.end(), bytes, bytes+sizeof(mUnion.mIn6Addr)); in writeToParcel() 58 const uint8_t* bytes = reinterpret_cast<const uint8_t*>(&mUnion.mInAddr); in writeToParcel() local 59 byte_vector.insert(byte_vector.end(), bytes, bytes+sizeof(mUnion.mIn6Addr)); in writeToParcel()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | ShortcutBitmapSaver.java | 89 public final byte[] bytes; field in ShortcutBitmapSaver.PendingItem 94 private PendingItem(ShortcutInfo shortcut, byte[] bytes) { in PendingItem() argument 96 this.bytes = bytes; in PendingItem() 102 return "PendingItem{size=" + bytes.length in toString() 169 final byte[] bytes; in saveBitmapLocked() 184 bytes = out.toByteArray(); in saveBitmapLocked() 207 final PendingItem item = new PendingItem(shortcut, bytes); in saveBitmapLocked() 277 out.write(item.bytes); in processPendingItems()
|
/frameworks/base/telephony/java/com/android/internal/telephony/uicc/ |
D | IccUtils.java | 104 public static void bcdToBytes(String bcd, byte[] bytes) { in bcdToBytes() argument 105 bcdToBytes(bcd, bytes, 0); in bcdToBytes() 116 public static void bcdToBytes(String bcd, byte[] bytes, int offset) { in bcdToBytes() argument 120 int size = Math.min((bytes.length - offset) * 2, bcd.length()); in bcdToBytes() 122 bytes[j] = (byte) (charToByte(bcd.charAt(i + 1)) << 4 | charToByte(bcd.charAt(i))); in bcdToBytes() 437 bytesToHexString(byte[] bytes) { in bytesToHexString() argument 438 if (bytes == null) return null; in bytesToHexString() 440 StringBuilder ret = new StringBuilder(2*bytes.length); in bytesToHexString() 442 for (int i = 0 ; i < bytes.length ; i++) { in bytesToHexString() 445 b = 0x0f & (bytes[i] >> 4); in bytesToHexString() [all …]
|
/frameworks/av/media/libstagefright/codecs/flac/enc/ |
D | SoftFlacEncoder.cpp | 475 size_t bytes, unsigned samples, in onEncodedFlacAvailable() argument 479 bytes, samples, current_frame); in onEncodedFlacAvailable() 482 ALOGV("saving %zu bytes of header", bytes); in onEncodedFlacAvailable() 483 if (mHeaderOffset + bytes > sizeof(mHeader) || mHeaderComplete) { in onEncodedFlacAvailable() 488 memcpy(mHeader + mHeaderOffset, buffer, bytes); in onEncodedFlacAvailable() 489 mHeaderOffset += bytes;// will contain header size when finished receiving header in onEncodedFlacAvailable() 500 ALOGV("ignoring %zu bytes of header data (samples=%d)", bytes, samples); in onEncodedFlacAvailable() 528 ALOGV(" writing %zu bytes of encoded data on output port", bytes); in onEncodedFlacAvailable() 529 if (bytes > outHeader->nAllocLen - outHeader->nOffset - outHeader->nFilledLen) { in onEncodedFlacAvailable() 530 ALOGE(" not enough space left to write encoded data, dropping %zu bytes", bytes); in onEncodedFlacAvailable() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
D | DataUsageDetailView.java | 68 final long bytes; in bind() local 75 bytes = info.usageLevel; in bind() 81 bytes = info.limitLevel - info.usageLevel; in bind() 89 bytes = info.usageLevel - info.limitLevel; in bind() 104 usage.setText(formatBytes(bytes)); in bind() 126 private String formatBytes(long bytes) { in formatBytes() argument 127 final long b = Math.abs(bytes); in formatBytes() 140 return FORMAT.format(val * (bytes < 0 ? -1 : 1)) + " " + suffix; in formatBytes()
|