Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 379) sorted by relevance

12345678910>>...16

/development/samples/USB/AdbTest/src/com/android/adb/
DAdbMessage.java55 mMessageBuffer.putInt(12, (data == null ? 0 : data.length)); in set()
59 mDataBuffer.put(data, 0, data.length); in set()
99 int length = getDataLength(); in getDataString() local
100 if (length == 0) return null; in getDataString()
102 return new String(mDataBuffer.array(), 0, length - 1); in getDataString()
111 int length = getDataLength(); in write() local
112 if (length > 0) { in write()
115 if (request.queue(mDataBuffer, length)) { in write()
135 public boolean readData(UsbRequest request, int length) { in readData() argument
137 return request.queue(mDataBuffer, length); in readData()
[all …]
/development/samples/ToyVpn/server/linux/
DToyVpnServer.cpp131 int length = strlen(parameter); in build_parameters() local
135 if (length == 2 && parameter[0] == '-') { in build_parameters()
137 --length; in build_parameters()
142 if (offset + length >= size) { in build_parameters()
149 memcpy(&parameters[offset + 1], parameter, length); in build_parameters()
150 offset += 1 + length; in build_parameters()
220 int length = read(interface, packet, sizeof(packet)); in main() local
221 if (length > 0) { in main()
223 send(tunnel, packet, length, MSG_NOSIGNAL); in main()
235 length = recv(tunnel, packet, sizeof(packet), 0); in main()
[all …]
/development/samples/ApiDemos/src/com/example/android/mmslib/pdu/
DEncodedStringValue.java59 mData = new byte[data.length]; in EncodedStringValue()
60 System.arraycopy(data, 0, mData, 0, data.length); in EncodedStringValue()
107 byte[] byteArray = new byte[mData.length]; in getTextString()
109 System.arraycopy(mData, 0, byteArray, 0, mData.length); in getTextString()
124 mData = new byte[textString.length]; in setTextString()
125 System.arraycopy(textString, 0, mData, 0, textString.length); in setTextString()
168 mData = new byte[textString.length]; in appendTextString()
169 System.arraycopy(textString, 0, mData, 0, textString.length); in appendTextString()
192 int len = mData.length; in clone()
214 EncodedStringValue[] ret = new EncodedStringValue[temp.length]; in split()
[all …]
DPduPart.java141 mPartData = new byte[data.length]; in setData()
142 System.arraycopy(data, 0, mPartData, 0, data.length); in setData()
155 byte[] byteArray = new byte[mPartData.length]; in getData()
156 System.arraycopy(mPartData, 0, byteArray, 0, mPartData.length); in getData()
165 return mPartData.length; in getDataLength()
197 if((contentId == null) || (contentId.length == 0)) { in setContentId()
202 if ((contentId.length > 1) in setContentId()
204 && ((char) contentId[contentId.length - 1] == '>')) { in setContentId()
210 byte[] buffer = new byte[contentId.length + 2]; in setContentId()
212 buffer[buffer.length - 1] = (byte) (0xff & '>'); in setContentId()
[all …]
DBase64.java69 if (base64Data.length == 0) { in decodeBase64()
73 int numberQuadruple = base64Data.length / FOURBYTE; in decodeBase64()
83 int lastData = base64Data.length; in decodeBase64()
152 byte groomedData[] = new byte[data.length]; in discardNonBase64()
155 for (int i = 0; i < data.length; i++) { in discardNonBase64()
/development/samples/SpellChecker/SampleSpellCheckerService/src/com/example/android/samplespellcheckerservice/
DSampleSpellCheckerService.java65 final int length = input.length(); in onGetSuggestions() local
69 final int flags = length <= 3 ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY in onGetSuggestions()
70 : length <= 20 ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0; in onGetSuggestions()
95 for (int i = 0; i < textInfos.length; ++i) { in onGetSentenceSuggestionsMultiple()
101 final int length = input.length(); in onGetSentenceSuggestionsMultiple() local
125 final int flags = length <= 3 ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY in onGetSentenceSuggestionsMultiple()
126 : length <= 20 ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0; in onGetSentenceSuggestionsMultiple()
131 lengths = new int[] { ti.getText().length() }; in onGetSentenceSuggestionsMultiple()
/development/samples/browseable/CardEmulation/src/com.example.android.cardemulation/
DCardService.java110 aid.length() / 2) + aid); in BuildSelectApdu()
121 char[] hexChars = new char[bytes.length * 2]; // Each byte has two hex characters (nibbles) in ByteArrayToHexString()
123 for (int j = 0; j < bytes.length; j++) { in ByteArrayToHexString()
141 int len = s.length(); in HexStringToByteArray()
161 int totalLength = first.length; in ConcatArrays()
163 totalLength += array.length; in ConcatArrays()
166 int offset = first.length; in ConcatArrays()
168 System.arraycopy(array, 0, result, offset, array.length); in ConcatArrays()
169 offset += array.length; in ConcatArrays()
/development/samples/Vault/src/com/example/android/vault/
DEncryptedDocument.java106 if (dataKey.getEncoded().length != DATA_KEY_LENGTH) { in EncryptedDocument()
109 if (macKey.getEncoded().length != MAC_KEY_LENGTH) { in EncryptedDocument()
184 if (f.length() <= CONTENT_OFFSET) { in readContent()
284 while ((n = f.read(inbuf, 0, (int) Math.min(section.length, inbuf.length))) != -1) { in readSection()
285 section.length -= n; in readSection()
291 if (section.length == 0) break; in readSection()
345 section.length = dataEnd - dataStart; in writeSection()
359 long length; field in EncryptedDocument.Section
364 length = f.readLong(); in read()
370 f.writeLong(length); in write()
[all …]
/development/samples/browseable/ElizaChat/src/com.example.android.wearable.elizachat/
DElizaResponder.java106 for (int i = 0; i < CONVERSATION_TO_RESPONSES_MAP.length / 2; i++) { in ElizaResponder()
127 for (; keywordIndex < CONVERSATION_KEYWORDS.length; ++keywordIndex) { in elzTalk()
135 if (keywordIndex == CONVERSATION_KEYWORDS.length) { in elzTalk()
139 afterKeyword = input.substring(index + CONVERSATION_KEYWORDS[keywordIndex].length()); in elzTalk()
141 for (int i = 0; i < WORDS_TO_REPLACE.length / 2; i++) { in elzTalk()
144 for (int j = 0; j < parts.length; ++j) { in elzTalk()
162 result = result.substring(0, result.length() - 1); in elzTalk()
/development/samples/SoftKeyboard/src/com/example/android/softkeyboard/
DSoftKeyboard.java311 if (mComposing.length() > 0 && (newSelStart != candidatesEnd in onUpdateSelection()
337 for (int i = 0; i < completions.length; i++) { in onDisplayCompletions()
367 if (mComposing.length() > 0) { in translateKeyDown()
368 char accent = mComposing.charAt(mComposing.length() -1 ); in translateKeyDown()
373 mComposing.setLength(mComposing.length()-1); in translateKeyDown()
405 if (mComposing.length() > 0) { in onKeyDown()
472 if (mComposing.length() > 0) { in commitTyped()
473 inputConnection.commitText(mComposing, mComposing.length()); in commitTyped()
539 if (mComposing.length() > 0) { in onKey()
574 if (mComposing.length() > 0) { in onText()
[all …]
/development/cmds/monkey/src/com/android/commands/monkey/
DMonkeySourceScript.java211 String value = line.substring(HEADER_COUNT.length() + 1).trim(); in readHeader()
219 String value = line.substring(HEADER_COUNT.length() + 1).trim(); in readHeader()
281 if (s.indexOf(EVENT_KEYWORD_KEY) >= 0 && args.length == 8) { in handleEvent()
306 && args.length == 12) { in handleEvent()
343 && args.length == 13) { in handleEvent()
420 if ((s.indexOf(EVENT_KEYWORD_ROTATION) >= 0) && args.length == 2) { in handleEvent()
437 if ((s.indexOf(EVENT_KEYWORD_TAP) >= 0) && args.length >= 2) { in handleEvent()
442 if (args.length == 3) { in handleEvent()
468 if ((s.indexOf(EVENT_KEYWORD_PRESSANDHOLD) >= 0) && args.length == 3) { in handleEvent()
497 if ((s.indexOf(EVENT_KEYWORD_DRAG) >= 0) && args.length == 5) { in handleEvent()
[all …]
/development/vndk/tools/definition-tool/assets/visual/
Ddep-graph.js120 for (i = 0; i < symbol.length; i++) {
125 while (i < symbol.length) {
129 let len = parseInt(symbol.substr(i, symbol.length));
137 return res.substr(2, res.length);
141 for (let i = 0; i < list.length; i++) {
146 for (let j = 0; j < violates.length; j++) {
151 + tag.substring(tag.lastIndexOf(".") + 1) + "]", symbols.length);
152 for (let k = 0; k < symbols.length; k++) {
160 changeFormat(symbols[k].substr(2, symbols[k].length));
184 domViolatedList.appendChild(makeTitle("VENDOR (" + list.length + ")"));
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/
DNumericSprite.java69 int length = mText.length(); in draw() local
71 for(int i = 0; i < length; i++) { in draw()
82 int length = mText.length(); in width() local
83 for(int i = 0; i < length; i++) { in width()
/development/apps/NinePatchLab/src/com/android/ninepatch/
DNinePatchLab.java93 mButtons = new Drawable[ids.length]; in NPView()
94 mBGs = new Drawable[bgs.length + 2]; in NPView()
98 for (int i = 0; i < ids.length; i++) { in NPView()
101 for (int i = 0; i < bgs.length; i++) { in NPView()
104 mBGs[bgs.length] = make_custom_bg(); in NPView()
105 mBGs[bgs.length+1] = make_solid_bg(); in NPView()
131 final int N = mButtons.length; in onDraw()
182 mCurrBGIndex = (mCurrBGIndex + 1) % mBGs.length; in onKeyDown()
/development/samples/ToyVpn/src/com/example/android/toyvpn/
DToyVpnConnection.java207 int length = in.read(packet.array()); in run() local
208 if (length > 0) { in run()
210 packet.limit(length); in run()
220 length = tunnel.read(packet); in run()
221 if (length > 0) { in run()
225 out.write(packet.array(), 0, length); in run() local
298 int length = tunnel.read(packet); in handshake() local
299 if (length > 0 && packet.get(0) == 0) { in handshake()
300 return configure(new String(packet.array(), 1, length - 1, US_ASCII).trim()); in handshake()
/development/tools/bugreport/src/com/android/bugreport/util/
DArgParser.java34 if (mPos < mArgs.length) { in nextFlag()
44 if (i >= mArgs.length) { in hasData()
55 if (mPos < mArgs.length) { in nextData()
62 return mArgs.length - mPos; in remaining()
/development/samples/BrokenKeyDerivation/src/com/example/android/brokenkeyderivation/
DInsecureSHA1PRNGKeyDerivator.java229 updateHash(seed, bytes, 0, bytes.length - 1); in updateSeed()
231 seedLength += bytes.length; in updateSeed()
257 if (seed.length != 0) { in setSeed()
341 if (bytes.length == 0) { in nextBytes()
348 n = (HASHBYTES_TO_USE - nextBIndex) < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE in nextBytes()
350 : bytes.length - nextByteToReturn; in nextBytes()
357 if (nextByteToReturn >= bytes.length) { in nextBytes()
404 j = HASHBYTES_TO_USE < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE in nextBytes()
405 : bytes.length - nextByteToReturn; in nextBytes()
413 if (nextByteToReturn >= bytes.length) { in nextBytes()
/development/samples/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/utils/
DMediaIDHelper.java43 if (categories != null && categories.length > 0) { in createMediaID()
45 for (int i=1; i < categories.length; i++) { in createMediaID()
94 if (hierarchy != null && hierarchy.length == 2) { in extractBrowseCategoryValueFromMediaID()
109 if (hierarchy == null || hierarchy.length <= 1) { in getParentMediaID()
112 String[] parentHierarchy = Arrays.copyOf(hierarchy, hierarchy.length-1); in getParentMediaID()
/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/
DDiskLruCache.java176 final int originalLength = original.length; // For exception priority compatibility. in copyOfRange()
229 int length = result.length(); in readAsciiLine() local
230 if (length > 0 && result.charAt(length - 1) == '\r') { in readAsciiLine()
231 result.setLength(length - 1); in readAsciiLine()
370 if (parts.length < 2) { in readJournalLine()
375 if (parts[0].equals(REMOVE) && parts.length == 2) { in readJournalLine()
386 if (parts[0].equals(CLEAN) && parts.length == 2 + valueCount) { in readJournalLine()
389 entry.setLengths(copyOfRange(parts, 2, parts.length)); in readJournalLine()
390 } else if (parts[0].equals(DIRTY) && parts.length == 2) { in readJournalLine()
392 } else if (parts[0].equals(READ) && parts.length == 2) { in readJournalLine()
[all …]
/development/samples/browseable/CardReader/src/com.example.android.cardreader/
DLoyaltyCardReader.java85 int resultLength = result.length; in onTagDiscovered()
110 … return HexStringToByteArray(SELECT_APDU_HEADER + String.format("%02X", aid.length() / 2) + aid); in BuildSelectApdu()
121 char[] hexChars = new char[bytes.length * 2]; in ByteArrayToHexString()
123 for ( int j = 0; j < bytes.length; j++ ) { in ByteArrayToHexString()
140 int len = s.length(); in HexStringToByteArray()
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/
DOpenGLWatchFaceService.java197 for (int i = 0; i < mModelMatrices.length; ++i) { in onGlContextCreated()
257 float width, float length, float[] color) { in createHand() argument
261 0, length, 0, // top in createHand()
279 System.arraycopy(triangleCoords, 0, trianglesCoords, i * 9, triangleCoords.length); in createMajorTicks()
308 System.arraycopy(triangleCoords, 0, trianglesCoords, index, triangleCoords.length); in createMinorTicks()
332 private float[] getTickTriangleCoords(float width, float length, int angleDegrees) { in getTickTriangleCoords() argument
337 width / 2, length + 1, 0, // bottom left in getTickTriangleCoords()
338 -width / 2, length + 1, 0 // bottom right in getTickTriangleCoords()
357 for (int i = 0; i < coords.length; i += 3) { in rotateCoords()
/development/vndk/tools/definition-tool/assets/insight/
Dinsight.js28 for (let i = 1; i < arguments.length; ++i) {
51 if (deps.length > 0) {
52 direct = deps[0].length;
53 for (let i = 1; i < deps.length; ++i) {
54 indirect += deps[i].length;
70 this.numUsers = this.users.length;
132 if (deps.length > 0) {
135 for (let i = 1; i < deps.length; ++i) {
147 if (users.length > 0) {
269 if (tagIds.length == 0) {
[all …]
/development/apps/CustomLocale/src/com/android/customlocale2/
DCustomLocaleReceiver.java61 is_ok = is_ok && (locale.length() == 2 || locale.length() == 5); in onReceive()
62 if (is_ok && locale.length() >= 2) { in onReceive()
66 if (is_ok && locale.length() == 5) { in onReceive()
/development/samples/SpellChecker/HelloSpellChecker/src/com/example/android/hellospellchecker/
DHelloSpellCheckerActivity.java90 final StringBuilder sb, final SuggestionsInfo si, final int length, final int offset) { in dumpSuggestionsInfoInternal() argument
101 if (length != NOT_A_LENGTH) { in dumpSuggestionsInfoInternal()
102 sb.append(" length = " + length + ", offset = " + offset); in dumpSuggestionsInfoInternal()
118 for (int i = 0; i < arg0.length; ++i) { in onGetSuggestions()
144 for (int i = 0; i < arg0.length; ++i) { in onGetSentenceSuggestions()
/development/samples/devbytes/animation/PictureViewer/src/com/example/android/pictureviewer/
DPictureViewer.java62 final BitmapDrawable drawables[] = new BitmapDrawable[drawableIDs.length]; in onCreate()
63 for (int i = 0; i < drawableIDs.length; ++i) { in onCreate()
84 (mCurrentDrawable + 1) % drawables.length; in onCreate()
86 (mCurrentDrawable + 1) % drawables.length; in onCreate()

12345678910>>...16