Searched refs:length (Results 1 - 25 of 1461) sorted by relevance

1234567891011>>

/frameworks/base/obex/javax/obex/
H A DPasswordAuthentication.java55 mUserName = new byte[userName.length];
56 System.arraycopy(userName, 0, mUserName, 0, userName.length);
59 mPassword = new byte[password.length];
60 System.arraycopy(password, 0, mPassword, 0, password.length);
H A DPrivateInputStream.java76 return mData.length - mIndex;
92 while (mData.length == mIndex) {
102 return read(b, 0, b.length);
106 public synchronized int read(byte[] b, int offset, int length) throws IOException { argument
111 if ((offset | length) < 0 || length > b.length - offset) {
116 int currentDataLength = mData.length - mIndex;
117 int remainReadLength = length;
131 currentDataLength = mData.length
[all...]
/frameworks/base/telephony/java/android/telephony/
H A DJapanesePhoneNumberFormatter.java162 int length = text.length();
163 if (length > 3
166 } else if (length < 1 || text.charAt(0) != '0') {
170 CharSequence saved = text.subSequence(0, length);
174 while (i < text.length()) {
182 length = text.length();
187 while (i < length) {
190 text.replace(0, length, save
[all...]
/frameworks/ex/photoviewer/src/com/android/ex/photo/util/
H A DExif.java31 int length = 0;
34 while (offset + 3 < jpeg.length && (jpeg[offset++] & 0xFF) == 0xFF) {
52 // Get the length and check if it is reasonable.
53 length = pack(jpeg, offset, 2, false);
54 if (length < 2 || offset + length > jpeg.length) {
55 Log.e(TAG, "Invalid length");
60 if (marker == 0xE1 && length >= 8 &&
64 length
122 pack(byte[] bytes, int offset, int length, boolean littleEndian) argument
[all...]
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/
H A DExif.java31 int length = 0;
34 while (offset + 3 < jpeg.length && (jpeg[offset++] & 0xFF) == 0xFF) {
52 // Get the length and check if it is reasonable.
53 length = pack(jpeg, offset, 2, false);
54 if (length < 2 || offset + length > jpeg.length) {
55 Log.e(TAG, "Invalid length");
60 if (marker == 0xE1 && length >= 8 &&
64 length
122 pack(byte[] bytes, int offset, int length, boolean littleEndian) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DLimitedLengthInputStreamTest.java42 InputStream is = new LimitedLengthInputStream(mTestStream1, -1, TEST_STRING1.length);
53 fail("Should throw IOException on negative length");
74 fail("Should fail when offset + length is > Long.MAX_VALUE");
80 private void checkReadBytesWithOffsetAndLength_WithString1(int offset, int length) argument
82 byte[] temp = new byte[TEST_STRING1.length];
83 byte[] expected = new byte[length];
84 byte[] actual = new byte[length];
86 System.arraycopy(TEST_STRING1, offset, expected, 0, length);
88 InputStream is = new LimitedLengthInputStream(mTestStream1, offset, length);
89 assertEquals(length, i
131 checkReadBytes_WithString1(int offset, int length) argument
167 checkSingleByteRead_WithString1(int offset, int length) argument
[all...]
/frameworks/native/opengl/tools/glgen/stubs/gles11/
H A DglGetShaderSource.java1 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
6 int[] length,
12 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
17 java.nio.IntBuffer length,
21 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
3 glGetShaderSource( int shader, int bufsize, int[] length, int lengthOffset, byte[] source, int sourceOffset ) argument
14 glGetShaderSource( int shader, int bufsize, java.nio.IntBuffer length, byte source ) argument
/frameworks/base/core/java/com/android/internal/util/
H A DCharSequences.java36 public int length() {
37 return bytes.length;
59 * is greater than length(), or if start is greater than end
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) { argument
89 if (end > length) throw new IndexOutOfBoundsException();
97 if (a.length() !
[all...]
/frameworks/base/core/java/android/bluetooth/
H A DBluetoothInputStream.java69 * Reads at most {@code length} bytes from this stream and stores them in
77 * @param length
82 * if {@code offset < 0} or {@code length < 0}, or if
83 * {@code offset + length} is greater than the length of
89 public int read(byte[] b, int offset, int length) throws IOException { argument
93 if ((offset | length) < 0 || length > b.length - offset) {
94 throw new ArrayIndexOutOfBoundsException("invalid offset or length");
[all...]
/frameworks/base/core/java/android/database/
H A DMergeCursor.java47 for (int i = 0; i < mCursors.length; i++) {
58 int length = mCursors.length;
59 for (int i = 0 ; i < length ; i++) {
73 int length = mCursors.length;
74 for (int i = 0 ; i < length; i++) {
161 int length = mCursors.length;
162 for (int i = 0 ; i < length ;
[all...]
/frameworks/base/services/common_time/
H A Dcommon_time_server_packets.cpp42 if ((offset + sizeof(field_name)) > length) \
53 if ((offset + sizeof(field_name)) > length) \
79 uint32_t length) {
91 uint32_t length) {
104 uint32_t length) {
107 ret = serializeHeader(data, length);
112 length -= ret;
117 length);
121 length);
124 tmp =((SyncRequestPacket*)(this))->serializePacket(data, length);
78 serializeHeader(uint8_t* data, uint32_t length) argument
90 deserializeHeader(const uint8_t* data, uint32_t length) argument
103 serializePacket(uint8_t* data, uint32_t length) argument
143 deserializePacket( const uint8_t* data, uint32_t length, uint64_t expectedSyncGroupID) argument
184 serializePacket(uint8_t* data, uint32_t length) argument
194 deserializePacket(const uint8_t* data, uint32_t length) argument
206 serializePacket(uint8_t* data, uint32_t length) argument
216 deserializePacket(const uint8_t* data, uint32_t length) argument
228 serializePacket(uint8_t* data, uint32_t length) argument
237 deserializePacket(const uint8_t* data, uint32_t length) argument
246 serializePacket(uint8_t* data, uint32_t length) argument
258 deserializePacket(const uint8_t* data, uint32_t length) argument
270 serializePacket(uint8_t* data, uint32_t length) argument
280 deserializePacket(const uint8_t* data, uint32_t length) argument
[all...]
/frameworks/base/voip/jni/rtp/
H A DAmrCodec.cpp55 int decode(int16_t *samples, int count, void *payload, int length);
105 int length = AMREncode(mEncoder, mSidSync, (Mode)mMode, local
108 if (type != mMode || length != (8 + gFrameBits[mMode] + 7) >> 3) {
115 ++length;
121 // Shift left 6 bits and update the length.
122 bytes[length + 1] = 0;
123 for (int i = 0; i <= length; ++i) {
126 length = (10 + gFrameBits[mMode] + 7) >> 3;
128 return length;
131 int AmrCodec::decode(int16_t *samples, int count, void *payload, int length) argument
229 int length = AMREncode(mEncoder, mSidSync, MR122, local
242 decode(int16_t *samples, int count, void *payload, int length) argument
[all...]
/frameworks/support/v4/java/android/support/v4/database/
H A DDatabaseUtilsCompat.java50 if (originalValues == null || originalValues.length == 0) {
53 String[] result = new String[originalValues.length + newValues.length ];
54 System.arraycopy(originalValues, 0, result, 0, originalValues.length);
55 System.arraycopy(newValues, 0, result, originalValues.length, newValues.length);
/frameworks/base/core/java/android/view/textservice/
H A DSentenceSuggestionsInfo.java50 if (suggestionsInfos.length != offsets.length || offsets.length != lengths.length) {
53 final int infoSize = suggestionsInfos.length;
63 mOffsets = new int[mSuggestionsInfos.length];
65 mLengths = new int[mSuggestionsInfos.length];
77 final int infoSize = mSuggestionsInfos.length;
93 return mSuggestionsInfos.length;
101 if (i >= 0 && i < mSuggestionsInfos.length) {
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DDiscretePathEffect.java29 private static native int nativeCreate(float length, float deviation); argument
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
H A DComprehensionTlv.java47 * @param length Length of the value
51 protected ComprehensionTlv(int tag, boolean cr, int length, byte[] data, argument
55 mLength = length;
91 int endIndex = data.length;
117 int endIndex = data.length;
150 /* length */
151 int length;
154 length = temp;
156 length = data[curIndex++] & 0xff;
157 if (length <
[all...]
H A DTextAttribute.java27 public int length; field in class:TextAttribute
36 public TextAttribute(int start, int length, TextAlignment align, argument
40 this.length = length;
/frameworks/ex/chips/tests/src/com/android/ex/chips/
H A DChipsTest.java107 public int length() { method in class:ChipsTest.MockRecipientEditTextView
108 return mEditable != null ? mEditable.length() : 0;
180 int firstEnd = firstStart + first.trim().length();
182 int secondEnd = secondStart + second.trim().length();
183 mEditable.setSpan(mMockRecips[mMockRecips.length - 2], firstStart, firstEnd, 0);
184 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], secondStart, secondEnd, 0);
189 assertEquals(editableString.indexOf(second), secondStart - extra.length());
198 firstEnd = firstStart + first.length();
199 mEditable.setSpan(mMockRecips[mMockRecips.length - 1], firstStart, firstEnd, 0);
202 assertEquals(mEditable.getSpanStart(mMockRecips[mMockRecips.length
[all...]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DLines2Activity.java89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { argument
90 canvas.drawLine(x, y, x, y + length, p);
93 private void drawDiagonalLine(Canvas canvas, Paint p, float length, float x, float y) { argument
94 canvas.drawLine(x, y, x + length, y + length, p);
161 for (float length = 1; length <= 10; length +=1 ) {
163 drawVerticalLine(canvas, p, length, x, yOffset);
166 drawVerticalLine(canvas, p, length,
[all...]
/frameworks/base/core/java/com/android/internal/database/
H A DSortCursor.java59 int length = mCursors.length;
60 mSortColumns = new int[length];
61 for (int i = 0 ; i < length ; i++) {
74 for (int j = 0 ; j < length; j++) {
84 for (int i = mRowNumCache.length - 1; i >= 0; i--) {
87 mCurRowNumCache = new int[ROWCACHESIZE][length];
94 int length = mCursors.length;
95 for (int i = 0 ; i < length ;
[all...]
/frameworks/base/media/java/android/media/
H A DResampleInputStream.java48 // length of 2:1 fir
80 return read(b, 0, b.length);
84 public int read(byte[] b, int offset, int length) throws IOException { argument
87 // ensure that mBuf is big enough to cover requested 'length'
88 int nIn = ((length / 2) * mRateIn / mRateOut + mFirLength) * 2;
91 } else if (nIn > mBuf.length) {
101 length = len < length ? len : (length / 2) * 2;
104 // TODO: should mBuf.length belo
[all...]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DSimUtilsTest.java37 assertEquals("8901260450014484862", IccUtils.bcdToString(data, 0, data.length));
40 assertEquals("0126045001448486", IccUtils.bcdToString(data, 1, data.length - 2));
44 assertEquals("890", IccUtils.bcdToString(data, 0, data.length));
48 assertEquals("890260450014484862", IccUtils.bcdToString(data, 0, data.length));
76 assertEquals("Voice Mail", IccUtils.adnStringFieldToString(data, 1, data.length - 15));
80 assertEquals("\u9673\u539A\u5764/M", IccUtils.adnStringFieldToString(data, 0, data.length));
84 assertEquals("Vo\u00ECce M\u00E0il", IccUtils.adnStringFieldToString(data, 0, data.length));
88 assertEquals("-\u0532\u0583-1", IccUtils.adnStringFieldToString(data, 0, data.length));
/frameworks/base/core/java/android/webkit/
H A DByteArrayBuilder.java46 public synchronized void append(byte[] array, int offset, int length) { argument
47 while (length > 0) {
50 c = obtainChunk(length);
54 if (c.mLength == c.mArray.length) {
55 c = obtainChunk(length);
59 int amount = Math.min(length, c.mArray.length - c.mLength);
62 length -= amount;
111 private Chunk obtainChunk(int length) { argument
112 // Correct a small length
135 Chunk(int length) argument
[all...]
/frameworks/compile/linkloader/utils/
H A Draw_ostream.cpp30 int const length, // Fill Width.
37 t_format.ptr = new char[length+1];
38 t_format.ptr[length] = '\0';
39 vsnprintf(t_format.ptr, length, format_s, valist);
41 int fill_len = length;
29 fillformat(char const fill_char, int const length, char const *format_s, ...) argument
/frameworks/base/core/java/android/text/
H A DSpanSet.java47 final int length = allSpans.length;
49 if (length > 0 && (spans == null || spans.length < length)) {
51 spans = (E[]) Array.newInstance(classType, length);
52 spanStarts = new int[length];
53 spanEnds = new int[length];
54 spanFlags = new int[length];
58 for (int i = 0; i < length;
[all...]

Completed in 489 milliseconds

1234567891011>>