/development/samples/USB/AdbTest/src/com/android/adb/ |
D | AdbMessage.java | 55 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/ |
D | ToyVpnServer.cpp | 131 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(¶meters[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/ |
D | CardService.java | 110 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/ApiDemos/src/com/example/android/mmslib/pdu/ |
D | EncodedStringValue.java | 59 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 …]
|
D | PduPart.java | 141 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 …]
|
D | Base64.java | 69 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/ |
D | SampleSpellCheckerService.java | 65 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() 96 for (int i = 0; i < textInfos.length; ++i) { in onGetSentenceSuggestionsMultiple() 102 final int length = input.length(); in onGetSentenceSuggestionsMultiple() local 126 final int flags = length <= 3 ? SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY in onGetSentenceSuggestionsMultiple() 127 : length <= 20 ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0; in onGetSentenceSuggestionsMultiple() 133 lengths = new int[] { ti.getText().length() }; in onGetSentenceSuggestionsMultiple()
|
/development/samples/browseable/ElizaChat/src/com.example.android.wearable.elizachat/ |
D | ElizaResponder.java | 106 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/tools/bugreport/src/com/android/bugreport/util/ |
D | ArgParser.java | 34 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/Vault/src/com/example/android/vault/ |
D | EncryptedDocument.java | 106 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/ |
D | NumericSprite.java | 69 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/browseable/MediaBrowserService/src/com.example.android.mediabrowserservice/utils/ |
D | MediaIDHelper.java | 43 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/ApiDemos/tests/src/com/example/android/apis/os/ |
D | MorseCodeConverterTest.java | 47 assertEquals("Unexpected array length.", expected.length, actual.length); in assertArraysEqual() 48 for (int i = 0; i < expected.length; i++) { in assertArraysEqual()
|
/development/apps/CustomLocale/src/com/android/customlocale2/ |
D | CustomLocaleReceiver.java | 61 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/SoftKeyboard/src/com/example/android/softkeyboard/ |
D | SoftKeyboard.java | 311 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/apps/NinePatchLab/src/com/android/ninepatch/ |
D | NinePatchLab.java | 93 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/browseable/CardReader/src/com.example.android.cardreader/ |
D | LoyaltyCardReader.java | 85 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/SwipeRefreshListFragment/src/com.example.android.common/dummydata/ |
D | Cheeses.java | 162 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/SwipeRefreshLayoutBasic/src/com.example.android.common/dummydata/ |
D | Cheeses.java | 162 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/ |
D | Cheeses.java | 162 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/tools/winscope/src/ |
D | decodeVideo.js | 21 for (var i = 0; i < array.length; i++) { 23 for (var j = 0; j < pattern.length; j++) { 58 dataStart += WINSCOPE_META_MAGIC_STRING.length;
|
/development/samples/devbytes/animation/PictureViewer/src/com/example/android/pictureviewer/ |
D | PictureViewer.java | 62 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/vndk/tools/definition-tool/assets/visual/ |
D | dep-graph.js | 120 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/ToyVpn/src/com/example/android/toyvpn/ |
D | ToyVpnConnection.java | 207 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/samples/training/multiscreen/newsreader/src/com/example/android/newsreader/ |
D | NewsCategory.java | 38 for (i = 0; i < mArticles.length; i++) { in NewsCategory() 45 return mArticles.length; in getArticleCount()
|