/frameworks/base/obex/javax/obex/ |
D | ObexHelper.java | 161 int length = 0; in updateHeaderSet() local 167 while (index < headerArray.length) { in updateHeaderSet() 184 length = 0xFF & headerArray[index]; in updateHeaderSet() 185 length = length << 8; in updateHeaderSet() 187 length += 0xFF & headerArray[index]; in updateHeaderSet() 188 length -= 3; in updateHeaderSet() 190 value = new byte[length]; in updateHeaderSet() 191 System.arraycopy(headerArray, index, value, 0, length); in updateHeaderSet() 192 if (length == 0 || (length > 0 && (value[length - 1] != 0))) { in updateHeaderSet() 201 value.length, "ISO8859_1")); in updateHeaderSet() [all …]
|
D | PrivateInputStream.java | 76 return mData.length - mIndex; in available() 92 while (mData.length == mIndex) { in read() 102 return read(b, 0, b.length); in read() 106 public synchronized int read(byte[] b, int offset, int length) throws IOException { in read() argument 111 if ((offset | length) < 0 || length > b.length - offset) { in read() 116 int currentDataLength = mData.length - mIndex; in read() 117 int remainReadLength = length; in read() 131 currentDataLength = mData.length - mIndex; in read() 149 int length = (body.length - start) + (mData.length - mIndex); in writeBytes() local 150 byte[] temp = new byte[length]; in writeBytes() [all …]
|
D | ServerSession.java | 133 int length = mInput.read(); in run() local 134 length = (length << 8) + mInput.read(); in run() 135 for (int i = 3; i < length; i++) { in run() 164 int length = mInput.read(); in handleAbortRequest() local 165 length = (length << 8) + mInput.read(); in handleAbortRequest() 166 if (length > ObexHelper.MAX_PACKET_SIZE_INT) { in handleAbortRequest() 169 for (int i = 3; i < length; i++) { in handleAbortRequest() 261 totalLength += header.length; in sendResponse() 266 System.arraycopy(header, 0, data, 3, header.length); in sendResponse() 287 int length; in handleSetPathRequest() local [all …]
|
D | ServerOperation.java | 153 int length = in.read(); in ServerOperation() local 154 length = (length << 8) + in.read(); in ServerOperation() 159 if (length > ObexHelper.MAX_PACKET_SIZE_INT) { in ServerOperation() 167 if (length > 3) { in ServerOperation() 168 byte[] data = new byte[length - 3]; in ServerOperation() 171 while (bytesReceived != data.length) { in ServerOperation() 172 bytesReceived += in.read(data, bytesReceived, data.length - bytesReceived); in ServerOperation() 200 replyHeader.mAuthResp = new byte[requestHeader.mAuthResp.length]; in ServerOperation() 202 replyHeader.mAuthResp.length); in ServerOperation() 303 if ((ObexHelper.BASE_PACKET_LENGTH + headerArray.length) > mMaxPacketLength) { in sendReply() [all …]
|
D | ObexSession.java | 82 byte[] realmString = new byte[description.length - 1]; in handleAuthChall() 83 System.arraycopy(description, 1, realmString, 0, realmString.length); in handleAuthChall() 154 header.mAuthResp = new byte[38 + userName.length]; in handleAuthChall() 156 header.mAuthResp[37] = (byte)userName.length; in handleAuthChall() 157 System.arraycopy(userName, 0, header.mAuthResp, 38, userName.length); in handleAuthChall() 163 byte[] digest = new byte[challenge.length + password.length + 1]; in handleAuthChall() 164 System.arraycopy(challenge, 0, digest, 0, challenge.length); in handleAuthChall() 166 digest[challenge.length] = (byte)0x3A; in handleAuthChall() 167 System.arraycopy(password, 0, digest, challenge.length + 1, password.length); in handleAuthChall() 201 byte[] temp = new byte[correctPassword.length + 16]; in handleAuthResp() [all …]
|
/frameworks/base/media/libstagefright/codecs/m4v_h263/enc/src/ |
D | vlc_encode.cpp | 184 Int length; in PutDCsize_lum() local 189 length = DCtab_lum[size].len; in PutDCsize_lum() 190 if (length) in PutDCsize_lum() 191 BitstreamPutBits(bitstream, length, DCtab_lum[size].code); in PutDCsize_lum() 193 return length; in PutDCsize_lum() 199 Int length; in PutDCsize_chrom() local 203 length = DCtab_chrom[size].len; in PutDCsize_chrom() 204 if (length) in PutDCsize_chrom() 205 BitstreamPutBits(bitstream, length, DCtab_chrom[size].code); in PutDCsize_chrom() 207 return length; in PutDCsize_chrom() [all …]
|
/frameworks/base/core/java/android/database/ |
D | MergeCursor.java | 47 for (int i = 0; i < mCursors.length; i++) { in MergeCursor() 58 int length = mCursors.length; in getCount() local 59 for (int i = 0 ; i < length ; i++) { in getCount() 73 int length = mCursors.length; in onMove() local 74 for (int i = 0 ; i < length; i++) { in onMove() 111 int length = mCursors.length; in commitUpdates() local 112 for (int i = 0 ; i < length ; i++) { in commitUpdates() 182 int length = mCursors.length; in deactivate() local 183 for (int i = 0 ; i < length ; i++) { in deactivate() 193 int length = mCursors.length; in close() local [all …]
|
/frameworks/base/cmds/keystore/ |
D | keystore.c | 60 static int encode_key(char *out, uint8_t *in, int length) in encode_key() argument 63 for (i = length; i > 0; --i, ++in, ++out) { in encode_key() 69 ++length; in encode_key() 73 return length; in encode_key() 76 static int decode_key(uint8_t *out, char *in, int length) in decode_key() argument 79 for (i = 0; i < length; ++i, ++in, ++out) { in decode_key() 85 --length; in decode_key() 89 return length; in decode_key() 104 static int recv_message(uint8_t *message, int length) in recv_message() argument 112 if (length < offset) { in recv_message() [all …]
|
D | keystore_get.h | 40 static int keystore_get(const char *key, int length, char *value) in keystore_get() argument 42 uint8_t bytes[2] = {length >> 8, length}; in keystore_get() 46 if (length < 0 || length > KEYSTORE_MESSAGE_SIZE) { in keystore_get() 55 send(sock, key, length, 0) == length && shutdown(sock, SHUT_WR) == 0 && in keystore_get() 59 length = bytes[0] << 8 | bytes[1]; in keystore_get() 60 while (offset < length) { in keystore_get() 61 int n = recv(sock, &value[offset], length - offset, 0); in keystore_get() 63 length = -1; in keystore_get() 69 length = -1; in keystore_get() 73 return length; in keystore_get()
|
/frameworks/base/core/java/com/android/internal/database/ |
D | SortCursor.java | 59 int length = mCursors.length; in SortCursor() local 60 mSortColumns = new int[length]; in SortCursor() 61 for (int i = 0 ; i < length ; i++) { in SortCursor() 74 for (int j = 0 ; j < length; j++) { in SortCursor() 84 for (int i = mRowNumCache.length - 1; i >= 0; i--) { in SortCursor() 87 mCurRowNumCache = new int[ROWCACHESIZE][length]; in SortCursor() 94 int length = mCursors.length; in getCount() local 95 for (int i = 0 ; i < length ; i++) { in getCount() 132 int length = mCursors.length; in onMove() local 135 for (int i = 0; i < length; i++) { in onMove() [all …]
|
/frameworks/base/telephony/java/android/telephony/ |
D | JapanesePhoneNumberFormatter.java | 160 int length = text.length(); in format() local 161 if (length > 3 in format() 164 } else if (length < 1 || text.charAt(0) != '0') { in format() 168 CharSequence saved = text.subSequence(0, length); in format() 172 while (i < text.length()) { in format() 180 length = text.length(); in format() 185 while (i < length) { in format() 188 text.replace(0, length, saved); in format() 194 text.replace(0, length, saved); in format() 198 if (length > dashPos2) { in format() [all …]
|
/frameworks/base/voip/jni/rtp/ |
D | AmrCodec.cpp | 55 int decode(int16_t *samples, void *payload, int length); 105 int length = AMREncode(mEncoder, mSidSync, (Mode)mMode, in encode() local 108 if (type != mMode || length != (8 + gFrameBits[mMode] + 7) >> 3) { in encode() 115 ++length; in encode() 122 bytes[length + 1] = 0; in encode() 123 for (int i = 0; i <= length; ++i) { in encode() 126 length = (10 + gFrameBits[mMode] + 7) >> 3; in encode() 128 return length; in encode() 131 int AmrCodec::decode(int16_t *samples, void *payload, int length) in decode() argument 135 if (length < 2) { in decode() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | CharSequences.java | 36 public int length() { in forAsciiBytes() method in CharSequences 37 return bytes.length; in forAsciiBytes() 63 validate(start, end, bytes.length); 69 public int length() { 76 validate(newStart, newEnd, length()); 81 return new String(bytes, start, length()); 86 static void validate(int start, int end, int length) { 89 if (end > length) throw new IndexOutOfBoundsException(); 97 if (a.length() != b.length()) { 101 int length = a.length(); [all …]
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | MemoryFileTest.java | 34 private void compareBuffers(byte[] buffer1, byte[] buffer2, int length) throws Exception { in compareBuffers() argument 35 for (int i = 0; i < length; i++) { in compareBuffers() 55 newFile.writeBytes(testString, 0, 0, testString.length); in testPurge() 59 file.readBytes(testString, 0, 0, testString.length); in testPurge() 77 byte[] buffer = new byte[testString.length]; in testRun() 80 file.writeBytes(testString, 0, 2000, testString.length); in testRun() 81 file.readBytes(buffer, 2000, 0, testString.length); in testRun() 82 compareBuffers(testString, buffer, testString.length); in testRun() 85 buffer = new byte[testString.length]; in testRun() 91 is.mark(testString.length); in testRun() [all …]
|
D | AidlTest.java | 124 for (int i = 0; i < a0.length && i < a2.length; i++) { in booleanArray() 127 for (int i = 0; i < a0.length && i < a1.length; i++) { in booleanArray() 134 for (int i = 0; i < a0.length && i < a2.length; i++) { in charArray() 137 for (int i = 0; i < a0.length && i < a1.length; i++) { in charArray() 144 for (int i = 0; i < a0.length && i < a2.length; i++) { in intArray() 147 for (int i = 0; i < a0.length && i < a1.length; i++) { in intArray() 154 for (int i = 0; i < a0.length && i < a2.length; i++) { in longArray() 157 for (int i = 0; i < a0.length && i < a1.length; i++) { in longArray() 164 for (int i = 0; i < a0.length && i < a2.length; i++) { in floatArray() 167 for (int i = 0; i < a0.length && i < a1.length; i++) { in floatArray() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/ |
D | IccUtils.java | 42 bcdToString(byte[] data, int offset, int length) { in bcdToString() argument 43 StringBuilder ret = new StringBuilder(length*2); in bcdToString() 45 for (int i = offset ; i < offset + length ; i++) { in bcdToString() 150 adnStringFieldToString(byte[] data, int offset, int length) { in adnStringFieldToString() argument 151 if (length >= 1) { in adnStringFieldToString() 153 int ucslen = (length - 1) / 2; in adnStringFieldToString() 166 ucslen = ret.length(); in adnStringFieldToString() 179 if (length >= 3 && data[offset] == (byte) 0x81) { in adnStringFieldToString() 181 if (len > length - 3) in adnStringFieldToString() 182 len = length - 3; in adnStringFieldToString() [all …]
|
/frameworks/base/core/java/android/webkit/ |
D | ByteArrayBuilder.java | 46 public synchronized void append(byte[] array, int offset, int length) { in append() argument 47 while (length > 0) { in append() 50 c = obtainChunk(length); in append() 54 if (c.mLength == c.mArray.length) { in append() 55 c = obtainChunk(length); in append() 59 int amount = Math.min(length, c.mArray.length - c.mLength); in append() 62 length -= amount; in append() 111 private Chunk obtainChunk(int length) { in obtainChunk() argument 113 if (length < DEFAULT_CAPACITY) { in obtainChunk() 114 length = DEFAULT_CAPACITY; in obtainChunk() [all …]
|
/frameworks/base/core/java/com/android/internal/net/ |
D | DNParser.java | 48 private final int length; field in DNParser 71 this.length = dn.length(); in DNParser() 79 for (; pos < length && chars[pos] == ' '; pos++) { in nextAT() 81 if (pos == length) { in nextAT() 90 for (; pos < length && chars[pos] != '=' && chars[pos] != ' '; pos++) { in nextAT() 94 if (pos >= length) { in nextAT() 105 for (; pos < length && chars[pos] != '=' && chars[pos] == ' '; pos++) { in nextAT() 108 if (chars[pos] != '=' || pos == length) { in nextAT() 118 for (; pos < length && chars[pos] == ' '; pos++) { in nextAT() 141 if (pos == length) { in quotedAV() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/gsm/stk/ |
D | ComprehensionTlv.java | 48 protected ComprehensionTlv(int tag, boolean cr, int length, byte[] data, in ComprehensionTlv() argument 52 mLength = length; in ComprehensionTlv() 88 int endIndex = data.length; in decodeMany() 110 int endIndex = data.length; in decode() 138 int length; in decode() local 141 length = temp; in decode() 143 length = data[curIndex++] & 0xff; in decode() 144 if (length < 0x80) { in decode() 149 length = ((data[curIndex] & 0xff) << 8) in decode() 152 if (length < 0x100) { in decode() [all …]
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | HtmlTest.java | 42 assertEquals(1, spans.length); in testSingleTagOnWhileString() 83 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor() 84 assertEquals(1, colors.length); in testColor() 88 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor() 89 assertEquals(1, colors.length); in testColor() 93 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); in testColor() 94 assertEquals(0, colors.length); in testColor() 105 colors = s.getSpans(0, s.length(), TextAppearanceSpan.class); in testResourceColor() 106 assertEquals(1, colors.length); in testResourceColor() 110 colors = s.getSpans(0, s.length(), TextAppearanceSpan.class); in testResourceColor() [all …]
|
/frameworks/base/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | GsmAlphabetTest.java | 43 userData, SmsHeader.toByteArray(header).length+2, septetCount, 1, 0, 0); in test7bitWithHeader() 62 for (int i = 0, s = sGsmExtendedChars.length(); i < s; i++) { in testBasic() 83 for (int i = 0, s = sGsmExtendedChars.length(); i < s; i++) { in testBasic() 164 for (int i = 0, s = sGsmExtendedChars.length(); i < s; i++) { in testBasic() 239 GsmAlphabet.gsm8BitUnpackedToString(unpacked, 0, unpacked.length)); in testBasic() 247 assertEquals(2 * sGsmExtendedChars.length(), unpacked.length); in testBasic() 249 GsmAlphabet.gsm8BitUnpackedToString(unpacked, 0, unpacked.length)); in testBasic() 252 assertEquals(2 * sGsmExtendedChars.length(), unpacked.length); in testBasic() 257 0, unpacked.length); in testBasic() 263 GsmAlphabet.gsm8BitUnpackedToString(unpacked, 0, unpacked.length)); in testBasic() [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NdefMessage.java | 54 mRecords = new NdefRecord[records.length]; in NdefMessage() 55 System.arraycopy(records, 0, mRecords, 0, records.length); in NdefMessage() 73 if ((mRecords == null) || (mRecords.length == 0)) in toByteArray() 78 for (int i = 0; i < mRecords.length; i++) { in toByteArray() 80 byte[] tmp = new byte[msg.length + record.length]; in toByteArray() 90 if (i == (mRecords.length - 1)) { in toByteArray() 96 System.arraycopy(msg, 0, tmp, 0, msg.length); in toByteArray() 97 System.arraycopy(record, 0, tmp, msg.length, record.length); in toByteArray() 112 dest.writeInt(mRecords.length); in writeToParcel()
|
/frameworks/base/media/libstagefright/ |
D | string.cpp | 29 string::string(const char *s, size_t length) in string() argument 30 : mString(s, length) { in string() 33 string::string(const string &from, size_type start, size_type length) { in string() argument 35 if (length == npos) { in string() 36 length = from.size() - start; in string() 38 CHECK(start + length <= from.size()); in string() 41 mString.setTo(from.c_str() + start, length); in string() 53 return mString.length(); in size() 84 void string::erase(size_t from, size_t length) { in erase() argument 86 s.append(mString.string() + from + length); in erase()
|
/frameworks/base/media/java/android/media/audiofx/ |
D | AudioEffect.java | 454 return native_setParameter(param.length, param, value.length, value); in setParameter() 505 if (param.length > 2 || value.length > 2) { in setParameter() 509 if (param.length > 1) { in setParameter() 514 if (value.length > 1) { in setParameter() 530 if (param.length > 2 || value.length > 2) { in setParameter() 534 if (param.length > 1) { in setParameter() 540 if (value.length > 1) { in setParameter() 556 if (param.length > 2) { in setParameter() 560 if (param.length > 1) { in setParameter() 589 vSize[0] = value.length; in getParameter() [all …]
|
/frameworks/base/media/java/android/media/ |
D | ResampleInputStream.java | 81 return read(b, 0, b.length); in read() 85 public int read(byte[] b, int offset, int length) throws IOException { in read() argument 89 int nIn = ((length / 2) * mRateIn / mRateOut + mFirLength) * 2; in read() 92 } else if (nIn > mBuf.length) { in read() 102 length = len < length ? len : (length / 2) * 2; in read() 106 int n = mInputStream.read(mBuf, mBufCount, mBuf.length - mBufCount); in read() 112 fir21(mBuf, 0, b, offset, length / 2); in read() 115 int nFwd = length * mRateIn / mRateOut; in read() 119 return length; in read()
|