Home
last modified time | relevance | path

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

12345678910>>...19

/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/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/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/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/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/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/samples/SoftKeyboard/src/com/example/android/softkeyboard/
DSoftKeyboard.java282 if (mComposing.length() > 0 && (newSelStart != candidatesEnd in onUpdateSelection()
308 for (int i = 0; i < completions.length; i++) { in onDisplayCompletions()
338 if (mComposing.length() > 0) { in translateKeyDown()
339 char accent = mComposing.charAt(mComposing.length() -1 ); in translateKeyDown()
344 mComposing.setLength(mComposing.length()-1); in translateKeyDown()
376 if (mComposing.length() > 0) { in onKeyDown()
443 if (mComposing.length() > 0) { in commitTyped()
444 inputConnection.commitText(mComposing, mComposing.length()); in commitTyped()
510 if (mComposing.length() > 0) { in onKey()
545 if (mComposing.length() > 0) { in onText()
[all …]
/development/samples/Support4Demos/src/com/example/android/supportv4/media/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/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/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/
DToyVpnService.java178 int length = in.read(packet.array()); in run() local
179 if (length > 0) { in run()
181 packet.limit(length); in run()
195 length = tunnel.read(packet); in run()
196 if (length > 0) { in run()
200 out.write(packet.array(), 0, length); in run() local
280 int length = tunnel.read(packet); in handshake() local
281 if (length > 0 && packet.get(0) == 0) { in handshake()
282 configure(new String(packet.array(), 1, length - 1).trim()); in handshake()
/development/ndk/platforms/android-21/include/linux/
Dfirewire-cdev.h60 __u32 length; member
71 __u32 length; member
87 __u32 length; member
120 __u32 length; member
181 __u32 length; member
191 __u32 length; member
200 __u32 length; member
220 __u32 length; member
310 __u32 length; member
/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/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/ApiDemos/tests/src/com/example/android/apis/os/
DMorseCodeConverterTest.java47 assertEquals("Unexpected array length.", expected.length, actual.length); in assertArraysEqual()
48 for (int i = 0; i < expected.length; i++) { in assertArraysEqual()
/development/samples/browseable/SwipeRefreshLayoutBasic/src/com.example.android.common/dummydata/
DCheeses.java162 for (int i = 0, z = CHEESES.length ; i < z ; i++) { in asList()
178 count = Math.min(count, CHEESES.length); in randomList()
181 items.add(CHEESES[random.nextInt(CHEESES.length)]); in randomList()
/development/samples/browseable/SwipeRefreshListFragment/src/com.example.android.common/dummydata/
DCheeses.java162 for (int i = 0, z = CHEESES.length ; i < z ; i++) { in asList()
178 count = Math.min(count, CHEESES.length); in randomList()
181 items.add(CHEESES[random.nextInt(CHEESES.length)]); in randomList()
/development/samples/browseable/SwipeRefreshMultipleViews/src/com.example.android.common/dummydata/
DCheeses.java162 for (int i = 0, z = CHEESES.length ; i < z ; i++) { in asList()
178 count = Math.min(count, CHEESES.length); in randomList()
181 items.add(CHEESES[random.nextInt(CHEESES.length)]); in randomList()
/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/ide/emacs/
Dandroid-compile.el64 (unless (> (length topdir) 2)
69 (while (and (> (length default-directory) (length topdir))
81 (setq default-directory (substring default-directory (length topdir) nil))
/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()
/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/ndk/platforms/android-9/arch-mips/include/asm/
Dscatterlist.h27 unsigned int length; member
31 #define sg_dma_len(sg) ((sg)->length)
/development/ndk/platforms/android-3/arch-arm/include/asm/
Dscatterlist.h22 unsigned int length; member
26 #define sg_dma_len(sg) ((sg)->length)

12345678910>>...19