/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
D | BluetoothCodecConfigTest.java | 70 private static final int kTotalConfigs = kCodecTypeArray.length * kCodecPriorityArray.length * 71 kSampleRateArray.length * kBitsPerSampleArray.length * kChannelModeArray.length * 72 kCodecSpecific1Array.length * kCodecSpecific2Array.length * kCodecSpecific3Array.length * 73 kCodecSpecific4Array.length; 76 int left = kCodecTypeArray.length; in selectCodecType() 79 index = index % kCodecTypeArray.length; in selectCodecType() 84 int left = kCodecTypeArray.length * kCodecPriorityArray.length; in selectCodecPriority() 87 index = index % kCodecPriorityArray.length; in selectCodecPriority() 92 int left = kCodecTypeArray.length * kCodecPriorityArray.length * kSampleRateArray.length; in selectSampleRate() 95 index = index % kSampleRateArray.length; in selectSampleRate() [all …]
|
/frameworks/opt/chips/tests/src/com/android/ex/chips/ |
D | ChipsTest.java | 112 public int length() { in length() method in ChipsTest.MockRecipientEditTextView 113 return mEditable != null ? mEditable.length() : 0; in length() 190 int firstEnd = firstStart + first.trim().length(); in testSanitizeBetween() 192 int secondEnd = secondStart + second.trim().length(); in testSanitizeBetween() 193 mEditable.setSpan(mMockRecips[mMockRecips.length - 2], firstStart, firstEnd, 0); in testSanitizeBetween() 194 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], secondStart, secondEnd, 0); in testSanitizeBetween() 199 assertEquals(editableString.indexOf(second), secondStart - extra.length()); in testSanitizeBetween() 208 firstEnd = firstStart + first.length(); in testSanitizeBetween() 209 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], firstStart, firstEnd, 0); in testSanitizeBetween() 212 assertEquals(mEditable.getSpanStart(mMockRecips[mMockRecips.length - 1]), firstStart in testSanitizeBetween() [all …]
|
/frameworks/av/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/tests/coretests/src/android/content/pm/ |
D | LimitedLengthInputStreamTest.java | 43 InputStream is = new LimitedLengthInputStream(mTestStream1, -1, TEST_STRING1.length); in testConstructor_NegativeOffset_Failure() 81 private void checkReadBytesWithOffsetAndLength_WithString1(int offset, int length) in checkReadBytesWithOffsetAndLength_WithString1() argument 83 byte[] temp = new byte[TEST_STRING1.length]; in checkReadBytesWithOffsetAndLength_WithString1() 84 byte[] expected = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1() 85 byte[] actual = new byte[length]; in checkReadBytesWithOffsetAndLength_WithString1() 87 System.arraycopy(TEST_STRING1, offset, expected, 0, length); in checkReadBytesWithOffsetAndLength_WithString1() 89 InputStream is = new LimitedLengthInputStream(mTestStream1, offset, length); in checkReadBytesWithOffsetAndLength_WithString1() 90 assertEquals(length, is.read(temp, 0, temp.length)); in checkReadBytesWithOffsetAndLength_WithString1() 92 System.arraycopy(temp, 0, actual, 0, length); in checkReadBytesWithOffsetAndLength_WithString1() 95 assertEquals(-1, is.read(temp, 0, temp.length)); in checkReadBytesWithOffsetAndLength_WithString1() [all …]
|
/frameworks/base/obex/javax/obex/ |
D | ObexHelper.java | 188 int length = 0; in updateHeaderSet() local 194 while (index < headerArray.length) { in updateHeaderSet() 211 length = ((0xFF & headerArray[index]) << 8) + in updateHeaderSet() 214 if (length <= OBEX_BYTE_SEQ_HEADER_LEN) { in updateHeaderSet() 216 "incorrect header length = " + length); in updateHeaderSet() 219 length -= OBEX_BYTE_SEQ_HEADER_LEN; in updateHeaderSet() 220 value = new byte[length]; in updateHeaderSet() 221 System.arraycopy(headerArray, index, value, 0, length); in updateHeaderSet() 222 if (length == 0 || (length > 0 && (value[length - 1] != 0))) { in updateHeaderSet() 231 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 …]
|
/frameworks/base/core/java/android/hardware/camera2/params/ |
D | ReprocessFormatsMap.java | 77 int left = entry.length; in ReprocessFormatsMap() 78 for (int i = 0; i < entry.length; ) { in ReprocessFormatsMap() 89 final int length = entry[i]; in ReprocessFormatsMap() local 93 for (int j = 0; j < length; ++j) { in ReprocessFormatsMap() 98 if (length > 0) { in ReprocessFormatsMap() 99 if (left < length) { in ReprocessFormatsMap() 103 "expected: %d)", inputFormat, left, length)); in ReprocessFormatsMap() 106 i += length; in ReprocessFormatsMap() 107 left -= length; in ReprocessFormatsMap() 132 int left = mEntry.length; in getInputs() [all …]
|
/frameworks/base/wifi/java/android/net/wifi/aware/ |
D | TlvBufferUtils.java | 113 mArrayLength = (array == null) ? 0 : array.length; in wrap() 146 size += field.length; in allocateAndPut() 200 int length) { in putByteArray() argument 201 checkLength(length); in putByteArray() 202 addHeader(type, length); in putByteArray() 203 if (length != 0) { in putByteArray() 204 System.arraycopy(array, offset, mArray, mPosition, length); in putByteArray() 206 mPosition += length; in putByteArray() 221 return putByteArray(type, array, 0, (array == null) ? 0 : array.length); in putByteArray() 234 checkRawLength(array.length); in putRawByteArray() [all …]
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | ArrayUtils.java | 32 return ((array != null) && (array.length > 0)) ? array.clone() : array; in cloneIfNotEmpty() 36 return ((array != null) && (array.length > 0)) ? array.clone() : array; in cloneIfNotEmpty() 40 return concat(arr1, 0, (arr1 != null) ? arr1.length : 0, in concat() 41 arr2, 0, (arr2 != null) ? arr2.length : 0); in concat() 69 public static int copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int length) { in copy() argument 73 if (length > dst.length - dstOffset) { in copy() 74 length = dst.length - dstOffset; in copy() 76 if (length > src.length - srcOffset) { in copy() 77 length = src.length - srcOffset; in copy() 79 if (length <= 0) { in copy() [all …]
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | Lines2Activity.java | 89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawVerticalLine() argument 90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine() 93 private void drawDiagonalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawDiagonalLine() argument 94 canvas.drawLine(x, y, x + length, y + length, p); in drawDiagonalLine() 161 for (float length = 1; length <= 10; length +=1 ) { in onDraw() 163 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw() 166 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw() 170 for (float length = 1; length <= 10; length +=1 ) { in onDraw() 172 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw() 175 drawVerticalLine(canvas, p, length, x, yOffset); in onDraw() [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() 161 int length = mCursors.length; in deactivate() local 162 for (int i = 0 ; i < length ; i++) { in deactivate() 172 int length = mCursors.length; in close() local 173 for (int i = 0 ; i < length ; i++) { in close() 182 int length = mCursors.length; in registerContentObserver() local [all …]
|
/frameworks/native/libs/binder/ndk/ |
D | parcel.cpp | 40 using ContiguousArrayAllocator = bool (*)(void* arrayData, int32_t length, T** outBuffer); 43 using ArrayAllocator = bool (*)(void* arrayData, int32_t length); 49 binder_status_t WriteAndValidateArraySize(AParcel* parcel, bool isNullArray, int32_t length) { in WriteAndValidateArraySize() argument 51 if (length < -1) return STATUS_BAD_VALUE; in WriteAndValidateArraySize() 53 if (!isNullArray && length < 0) { in WriteAndValidateArraySize() 54 LOG(ERROR) << __func__ << ": non-null array but length is " << length; in WriteAndValidateArraySize() 57 if (isNullArray && length > 0) { in WriteAndValidateArraySize() 58 LOG(ERROR) << __func__ << ": null buffer cannot be for size " << length << " array."; in WriteAndValidateArraySize() 64 status_t status = rawParcel->writeInt32(static_cast<int32_t>(length)); in WriteAndValidateArraySize() 71 binder_status_t WriteArray(AParcel* parcel, const T* array, int32_t length) { in WriteArray() argument [all …]
|
/frameworks/base/core/java/com/android/internal/database/ |
D | SortCursor.java | 63 int length = mCursors.length; in SortCursor() local 64 mSortColumns = new int[length]; in SortCursor() 65 for (int i = 0 ; i < length ; i++) { in SortCursor() 78 for (int j = 0 ; j < length; j++) { in SortCursor() 88 for (int i = mRowNumCache.length - 1; i >= 0; i--) { in SortCursor() 91 mCurRowNumCache = new int[ROWCACHESIZE][length]; in SortCursor() 98 int length = mCursors.length; in getCount() local 99 for (int i = 0 ; i < length ; i++) { in getCount() 136 int length = mCursors.length; in onMove() local 139 for (int i = 0; i < length; i++) { in onMove() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/uicc/ |
D | IccUtils.java | 59 bcdToString(byte[] data, int offset, int length) { in bcdToString() argument 60 StringBuilder ret = new StringBuilder(length*2); in bcdToString() 62 for (int i = offset ; i < offset + length ; i++) { in bcdToString() 83 return bcdToString(data, 0, data.length); in bcdToString() 92 byte[] output = new byte[(bcd.length() + 1) / 2]; in bcdToBytes() 117 if (bcd.length() % 2 != 0) { in bcdToBytes() 120 int size = Math.min((bytes.length - offset) * 2, bcd.length()); in bcdToBytes() 132 if (offset + 3 > data.length) { in bcdPlmnToString() 156 char digit6 = (plmn.length() > 5) ? plmn.charAt(5) : 'F'; in stringToBcdPlmn() 166 bchToString(byte[] data, int offset, int length) { in bchToString() argument [all …]
|
/frameworks/opt/net/voip/src/jni/rtp/ |
D | AmrCodec.cpp | 55 int decode(int16_t *samples, int count, 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, int /* count */, void *payload, int length) in decode() argument 135 if (length < 2) { in decode() [all …]
|
/frameworks/base/services/usb/java/com/android/server/usb/descriptors/ |
D | UsbACInterface.java | 84 public UsbACInterface(int length, byte type, byte subtype, int subclass) { in UsbACInterface() argument 85 super(length, type); in UsbACInterface() 99 ByteStream stream, int length, byte type, byte subtype, int subClass) { in allocAudioControlDescriptor() argument 106 return new Usb20ACHeader(length, type, subtype, subClass, acInterfaceSpec); in allocAudioControlDescriptor() 108 return new Usb10ACHeader(length, type, subtype, subClass, acInterfaceSpec); in allocAudioControlDescriptor() 116 return new Usb20ACInputTerminal(length, type, subtype, subClass); in allocAudioControlDescriptor() 118 return new Usb10ACInputTerminal(length, type, subtype, subClass); in allocAudioControlDescriptor() 126 return new Usb20ACOutputTerminal(length, type, subtype, subClass); in allocAudioControlDescriptor() 128 return new Usb10ACOutputTerminal(length, type, subtype, subClass); in allocAudioControlDescriptor() 133 return new UsbACSelectorUnit(length, type, subtype, subClass); in allocAudioControlDescriptor() [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 …]
|
/frameworks/base/telephony/java/android/telephony/ |
D | JapanesePhoneNumberFormatter.java | 164 int length = text.length(); in format() local 165 if (length > 3 in format() 168 } else if (length < 1 || text.charAt(0) != '0') { in format() 172 CharSequence saved = text.subSequence(0, length); in format() 176 while (i < text.length()) { in format() 184 length = text.length(); in format() 189 while (i < length) { in format() 192 text.replace(0, length, saved); in format() 198 text.replace(0, length, saved); in format() 202 if (length > dashPos2) { in format() [all …]
|
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/ |
D | XmpDepthDecode.java | 37 XMP_EXTENSION_HEADER.length() + 32 + 1; // 32 byte GUID + 1 byte null termination. 129 public int length; field in XmpDepthDecode.Section 225 section.length = -1; in parse() 227 is.read(section.data, 0, section.data.length); in parse() 237 int length = lh << 8 | ll; in parse() local 239 sections.add(readSection(is, length, marker, skipExtendedContent)); in parse() 243 is.skip(length - 2); in parse() 269 if (data.length < header.length()) { in hasHeader() 273 byte[] buffer = new byte[header.length()]; in hasHeader() 274 System.arraycopy(data, 0, buffer, 0, header.length()); in hasHeader() [all …]
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/ |
D | Exif.java | 69 int length = 0; in getOrientation() local 102 length = pack(jpeg, offset, 2, false); in getOrientation() 103 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) { in getOrientation() 109 if (marker == 0xE1 && length >= 8 && in getOrientation() 113 length -= 8; in getOrientation() 120 offset += length; in getOrientation() 121 length = 0; in getOrientation() 128 if (length > 8) { in getOrientation() 139 if (count < 10 || count > length) { in getOrientation() 144 length -= count; in getOrientation() [all …]
|
/frameworks/opt/bitmap/src/com/android/bitmap/util/ |
D | Exif.java | 74 int length = 0; in getOrientation() local 107 length = pack(jpeg, offset, 2, false); in getOrientation() 108 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) { in getOrientation() 114 if (marker == 0xE1 && length >= 8 && in getOrientation() 118 length -= 8; in getOrientation() 125 offset += length; in getOrientation() 126 length = 0; in getOrientation() 133 if (length > 8) { in getOrientation() 144 if (count < 10 || count > length) { in getOrientation() 149 length -= count; in getOrientation() [all …]
|
/frameworks/base/tools/powermodel/src/com/android/powermodel/component/ |
D | CpuProfile.java | 67 mCoreCount = Arrays.copyOf(value, value.length); in setCoreCount() 75 mCoreSpeeds.put(cluster, Arrays.copyOf(value, value.length)); in setCoreSpeeds() 77 if (power != null && value.length != power.length) { in setCoreSpeeds() 79 + " (" + value.length + ") is different from length of" in setCoreSpeeds() 80 + " cpu.core_power.cluster" + cluster + " (" + power.length + ")"); in setCoreSpeeds() 82 if (mCoreCount != null && cluster >= mCoreCount.length) { in setCoreSpeeds() 86 + mCoreCount.length + ")"); in setCoreSpeeds() 91 mCorePower.put(cluster, Arrays.copyOf(value, value.length)); in setCorePower() 93 if (speeds != null && value.length != speeds.length) { in setCorePower() 95 + " (" + value.length + ") is different from length of" in setCorePower() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | CharSequences.java | 38 public int length() { in forAsciiBytes() method in CharSequences 39 return bytes.length; in forAsciiBytes() 65 validate(start, end, bytes.length); 71 public int length() { 78 validate(newStart, newEnd, length()); 83 return new String(bytes, start, length()); 88 static void validate(int start, int end, int length) { 91 if (end > length) throw new IndexOutOfBoundsException(); 100 if (a.length() != b.length()) { 104 int length = a.length(); [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NdefRecord.java | 315 if (packageName.length() == 0) throw new IllegalArgumentException("packageName is empty"); in createApplicationRecord() 347 if (uriString.length() == 0) throw new IllegalArgumentException("uri is empty"); in createUri() 350 for (int i = 1; i < URI_PREFIX_MAP.length; i++) { in createUri() 353 uriString = uriString.substring(URI_PREFIX_MAP[i].length()); in createUri() 358 byte[] recordBytes = new byte[uriBytes.length + 1]; in createUri() 360 System.arraycopy(uriBytes, 0, recordBytes, 1, uriBytes.length); in createUri() 420 if (mimeType.length() == 0) throw new IllegalArgumentException("mimeType is empty"); in createMime() 423 if (slashIndex == mimeType.length() - 1) { in createMime() 466 if (domain.length() == 0) throw new IllegalArgumentException("domain is empty"); in createExternal() 467 if (type.length() == 0) throw new IllegalArgumentException("type is empty"); in createExternal() [all …]
|
/frameworks/base/core/java/android/ddm/ |
D | DdmHandleHello.java | 72 new Chunk(ChunkHandler.type("TEST"), data, 1, data.length-2); in connected() 138 if (vmInstructionSet != null && vmInstructionSet.length() > 0) { in handleHELO() 146 + vmIdent.length() * 2 in handleHELO() 147 + appName.length() * 2 in handleHELO() 148 + instructionSetDescription.length() * 2 in handleHELO() 149 + vmFlags.length() * 2 in handleHELO() 154 out.putInt(vmIdent.length()); in handleHELO() 155 out.putInt(appName.length()); in handleHELO() 159 out.putInt(instructionSetDescription.length()); in handleHELO() 161 out.putInt(vmFlags.length()); in handleHELO() [all …]
|