/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 …]
|
D | GsmCodec.cpp | 62 unsigned char *bytes = (unsigned char *)payload; in decode() local 65 gsm_decode(mDecode, bytes, &samples[n]) == 0) { in decode() 68 bytes += 33; in decode()
|
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/ |
D | UnsafeByteSequence.java | 31 private byte[] bytes; field in UnsafeByteSequence 35 this.bytes = new byte[initialCapacity]; in UnsafeByteSequence() 51 if (count + length >= bytes.length) { in write() 53 System.arraycopy(bytes, 0, newBytes, 0, count); in write() 54 bytes = newBytes; in write() 56 System.arraycopy(buffer, offset, bytes, count, length); in write() 61 if (count == bytes.length) { in write() 63 System.arraycopy(bytes, 0, newBytes, 0, count); in write() 64 bytes = newBytes; in write() 66 bytes[count++] = (byte) b; in write() [all …]
|
D | Charsets.java | 102 public static void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars) { in asciiBytesToChars() argument 103 if (bytes == null || chars == null) { in asciiBytesToChars() 109 char ch = (char) (bytes[start++] & 0xff); in asciiBytesToChars() 121 public static void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars) { in isoLatin1BytesToChars() argument 122 if (bytes == null || chars == null) { in isoLatin1BytesToChars() 127 chars[i] = (char) (bytes[start++] & 0xff); in isoLatin1BytesToChars()
|
/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 | 54 hdr->bytes = dataLen; in coreHeader() 139 mToCore.read(&buf[sizeof(CoreCmdHeader)], cmd->bytes); in playCoreCommands() 161 gPlaybackFuncs[cmd->cmdID](con, data, cmd->bytes); in playCoreCommands() 190 receiveLen[0] = mLastClientHeader.bytes; in getClientHeader() 199 receiveLen[0] = mLastClientHeader.bytes; in getClientPayload() 201 if (bufferLen < mLastClientHeader.bytes) { in getClientPayload() 216 hdr.bytes = (uint32_t)dataLen; in sendToClient()
|
D | rsFifo.h | 38 bool virtual writeAsync(const void *data, size_t bytes, bool waitForSpace = true) = 0; 40 size_t virtual read(void *data, size_t bytes, bool doWait = true, uint64_t timeToWait = 0) = 0; 41 void virtual readReturn(const void *data, size_t bytes) = 0;
|
D | rsFifoSocket.h | 37 bool writeAsync(const void *data, size_t bytes, bool waitForSpace = true); 39 size_t read(void *data, size_t bytes); 40 void readReturn(const void *data, size_t bytes);
|
/frameworks/opt/telephony/src/java/com/google/android/mms/pdu/ |
D | QuotedPrintable.java | 39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument 40 if (bytes == null) { in decodeQuotedPrintable() 44 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable() 45 int b = bytes[i]; in decodeQuotedPrintable() 48 if('\r' == (char)bytes[i + 1] && in decodeQuotedPrintable() 49 '\n' == (char)bytes[i + 2]) { in decodeQuotedPrintable() 53 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable() 54 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | CharSequences.java | 30 public static CharSequence forAsciiBytes(final byte[] bytes) { in forAsciiBytes() argument 33 return (char) bytes[index]; in forAsciiBytes() 37 return bytes.length; in forAsciiBytes() 41 return forAsciiBytes(bytes, start, end); in forAsciiBytes() 45 return new String(bytes); in forAsciiBytes() 61 public static CharSequence forAsciiBytes(final byte[] bytes, 63 validate(start, end, bytes.length); 66 return (char) bytes[index + start]; 77 return forAsciiBytes(bytes, newStart, newEnd); 81 return new String(bytes, start, length());
|
D | BitwiseInputStream.java | 96 int bytes = (bits >>> 3) + ((bits & 0x07) > 0 ? 1 : 0); // &7==%8 in readByteArray() local 97 byte[] arr = new byte[bytes]; in readByteArray() 98 for (int i = 0; i < bytes; i++) { in readByteArray()
|
/frameworks/base/tools/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/com/android/internal/http/multipart/ |
D | ByteArrayPartSource.java | 50 private byte[] bytes; field in ByteArrayPartSource 58 public ByteArrayPartSource(String fileName, byte[] bytes) { in ByteArrayPartSource() argument 61 this.bytes = bytes; in ByteArrayPartSource() 69 return bytes.length; in getLength() 83 return new ByteArrayInputStream(bytes); in createInputStream()
|
/frameworks/base/core/tests/coretests/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/CoreTests/android/core/ |
D | Sha1Test.java | 56 private static String encodeHex(byte[] bytes) { in encodeHex() argument 57 StringBuffer hex = new StringBuffer(bytes.length * 2); in encodeHex() 59 for (int i = 0; i < bytes.length; i++) { in encodeHex() 60 if (((int) bytes[i] & 0xff) < 0x10) { in encodeHex() 63 hex.append(Integer.toString((int) bytes[i] & 0xff, 16)); in encodeHex()
|
/frameworks/av/media/libstagefright/codecs/flac/enc/ |
D | SoftFlacEncoder.cpp | 354 size_t bytes, unsigned samples, in onEncodedFlacAvailable() argument 358 bytes, samples, current_frame); in onEncodedFlacAvailable() 362 ALOGI(" saving %zu bytes of header", bytes); in onEncodedFlacAvailable() 363 memcpy(mHeader + mHeaderOffset, buffer, bytes); in onEncodedFlacAvailable() 364 mHeaderOffset += bytes;// will contain header size when finished receiving header in onEncodedFlacAvailable() 373 ALOGV("ignoring %zu bytes of header data (samples=%d)", bytes, samples); in onEncodedFlacAvailable() 394 ALOGV(" writing %zu bytes of encoded data on output port", bytes); in onEncodedFlacAvailable() 395 if (bytes > outHeader->nAllocLen - outHeader->nOffset - outHeader->nFilledLen) { in onEncodedFlacAvailable() 396 ALOGE(" not enough space left to write encoded data, dropping %zu bytes", bytes); in onEncodedFlacAvailable() 400 memcpy(outHeader->pBuffer + outHeader->nOffset, buffer, bytes); in onEncodedFlacAvailable() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | NativeCrashListener.java | 237 int bytes; in consumeNativeCrashData() local 240 bytes = Os.read(fd, buf, 0, buf.length); in consumeNativeCrashData() 241 if (bytes > 0) { in consumeNativeCrashData() 243 String s = new String(buf, 0, bytes, "UTF-8"); in consumeNativeCrashData() 244 Slog.v(TAG, "READ=" + bytes + "> " + s); in consumeNativeCrashData() 247 if (buf[bytes-1] == 0) { in consumeNativeCrashData() 248 os.write(buf, 0, bytes-1); // exclude the EOD token in consumeNativeCrashData() 252 os.write(buf, 0, bytes); in consumeNativeCrashData() 254 } while (bytes > 0); in consumeNativeCrashData()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
D | DataUsageDetailView.java | 67 final long bytes; in bind() local 74 bytes = info.usageLevel; in bind() 80 bytes = info.limitLevel - info.usageLevel; in bind() 88 bytes = info.usageLevel - info.limitLevel; in bind() 99 usage.setText(formatBytes(bytes)); in bind() 115 private String formatBytes(long bytes) { in formatBytes() argument 116 final long b = Math.abs(bytes); in formatBytes() 129 return FORMAT.format(val * (bytes < 0 ? -1 : 1)) + " " + suffix; in formatBytes()
|
/frameworks/base/core/jni/ |
D | android_ddm_DdmHandleNativeHeap.cpp | 59 char bytes[1024]; in ReadFile() local 61 while ((byteCount = TEMP_FAILURE_RETRY(read(fd, bytes, sizeof(bytes)))) > 0) { in ReadFile() 62 s.append(bytes, byteCount); in ReadFile()
|
/frameworks/av/drm/common/ |
D | ReadWriteUtils.cpp | 46 char* bytes = new char[length]; in readBytes() local 47 if (length == read(fd, (void*) bytes, length)) { in readBytes() 48 string.append(bytes, length); in readBytes() 50 delete[] bytes; in readBytes()
|
/frameworks/base/core/java/android/net/http/ |
D | SslCertificate.java | 124 byte[] bytes = bundle.getByteArray(X509_CERTIFICATE); in restoreState() 125 if (bytes == null) { in restoreState() 130 Certificate cert = certFactory.generateCertificate(new ByteArrayInputStream(bytes)); in restoreState() 270 byte[] bytes = x509Certificate.getEncoded(); in getDigest() 272 byte[] digest = md.digest(bytes); in getDigest() 281 private static final String fingerprint(byte[] bytes) { in fingerprint() argument 282 if (bytes == null) { in fingerprint() 286 for (int i = 0; i < bytes.length; i++) { in fingerprint() 287 byte b = bytes[i]; in fingerprint() 289 if (i+1 != bytes.length) { in fingerprint()
|
/frameworks/base/media/mca/filterfw/jni/ |
D | jni_vertex_frame.cpp | 76 jbyte* bytes = env->GetByteArrayElements(data, NULL); in Java_android_filterfw_core_VertexFrame_setNativeData() local 77 if (bytes) { in Java_android_filterfw_core_VertexFrame_setNativeData() 78 const bool success = frame->WriteData(reinterpret_cast<const uint8_t*>(bytes + offset), in Java_android_filterfw_core_VertexFrame_setNativeData() 80 env->ReleaseByteArrayElements(data, bytes, JNI_ABORT); in Java_android_filterfw_core_VertexFrame_setNativeData()
|
/frameworks/base/wifi/java/android/net/wifi/ |
D | ScanResult.java | 210 public byte[] bytes; field in ScanResult.InformationElement 217 this.bytes = rhs.bytes.clone(); in InformationElement() 343 dest.writeInt(informationElements[i].bytes.length); in writeToParcel() 344 dest.writeByteArray(informationElements[i].bytes); in writeToParcel() 383 sr.informationElements[i].bytes = new byte[len]; 384 in.readByteArray(sr.informationElements[i].bytes);
|