Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 233) sorted by relevance

12345678910

/packages/apps/TV/tuner/src/com/android/tv/tuner/data/
DSectionParser.java650 int pos = 0; in parseSections() local
651 while (pos + 3 <= data.length()) { in parseSections()
652 if ((data.byteAt(pos) & 0xff) == 0xff) { in parseSections()
658 (((data.byteAt(pos + 1) & 0x0f) << 8) | (data.byteAt(pos + 2) & 0xff)) + 3; in parseSections()
659 if (pos + sectionLength > data.length()) { in parseSections()
663 Log.d(TAG, "parseSections 0x" + Integer.toHexString(data.byteAt(pos) & 0xff)); in parseSections()
665 parseSection(Arrays.copyOfRange(data.buffer(), pos, pos + sectionLength)); in parseSections() local
666 pos += sectionLength; in parseSections()
744 int pos = 8; in parsePAT() local
747 for (; pos < data.length - 4; pos = pos + 4) { in parsePAT()
[all …]
DCea708Parser.java283 int pos = 0; in parseCcPacket() local
285 boolean ccValid = (bytes[pos] & 0x04) != 0; in parseCcPacket()
286 int ccType = bytes[pos] & 0x03; in parseCcPacket()
298 mDtvCcPacket.append(bytes[pos + 1]); in parseCcPacket()
299 mDtvCcPacket.append(bytes[pos + 2]); in parseCcPacket()
301 mDtvCcPacket.append(bytes[pos + 1]); in parseCcPacket()
302 mDtvCcPacket.append(bytes[pos + 2]); in parseCcPacket()
312 pos += 3; in parseCcPacket()
319 int pos = 0; in parseDtvCcPacket() local
320 int packetSize = data[pos] & 0x3f; in parseDtvCcPacket()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dbyte_array_utils.h37 const uint32_t data, const int size, int *const pos) { in writeUintAndAdvancePosition() argument
42 ByteArrayUtils::writeUint8AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
45 ByteArrayUtils::writeUint16AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
48 ByteArrayUtils::writeUint24AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
51 ByteArrayUtils::writeUint32AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition()
63 static AK_FORCE_INLINE uint32_t readUint32(const uint8_t *const buffer, const int pos) { in readUint32() argument
64 return (buffer[pos] << 24) ^ (buffer[pos + 1] << 16) in readUint32()
65 ^ (buffer[pos + 2] << 8) ^ buffer[pos + 3]; in readUint32()
68 static AK_FORCE_INLINE uint32_t readUint24(const uint8_t *const buffer, const int pos) { in readUint24() argument
69 return (buffer[pos] << 16) ^ (buffer[pos + 1] << 8) ^ buffer[pos + 2]; in readUint24()
[all …]
Dbuffer_with_extendable_buffer.cpp26 uint32_t BufferWithExtendableBuffer::readUint(const int size, const int pos) const { in readUint()
27 const bool readingPosIsInAdditionalBuffer = isInAdditionalBuffer(pos); in readUint()
28 const int posInBuffer = readingPosIsInAdditionalBuffer ? pos - mOriginalBuffer.size() : pos; in readUint()
33 int *const pos) const { in readUintAndAdvancePosition()
34 const uint32_t value = readUint(size, *pos); in readUintAndAdvancePosition()
35 *pos += size; in readUintAndAdvancePosition()
40 int *const outCodePoints, int *outCodePointCount, int *const pos) const { in readCodePointsAndAdvancePosition()
41 const bool readingPosIsInAdditionalBuffer = isInAdditionalBuffer(*pos); in readCodePointsAndAdvancePosition()
43 *pos -= mOriginalBuffer.size(); in readCodePointsAndAdvancePosition()
48 nullptr /* codePointTable */, outCodePoints, pos); in readCodePointsAndAdvancePosition()
[all …]
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/
Ddb_utilities_indexing.h97 int pos; in db_MaxIndex3() local
99 best=s[0];pos=0; in db_MaxIndex3()
100 if(s[1]>best){best=s[1];pos=1;} in db_MaxIndex3()
101 if(s[2]>best){best=s[2];pos=2;} in db_MaxIndex3()
102 return(pos); in db_MaxIndex3()
108 int pos; in db_MaxIndex4() local
110 best=s[0];pos=0; in db_MaxIndex4()
111 if(s[1]>best){best=s[1];pos=1;} in db_MaxIndex4()
112 if(s[2]>best){best=s[2];pos=2;} in db_MaxIndex4()
113 if(s[3]>best){best=s[3];pos=3;} in db_MaxIndex4()
[all …]
/packages/apps/UnifiedEmail/src/com/google/android/mail/common/html/parser/
DHtmlParser.java201 int pos; in parse() local
205 pos = scanText(i, clipEnd); in parse()
206 X.assertTrue(pos > i || state != State.IN_TEXT); // Must make progress. in parse()
210 pos = scanTag(i, end); in parse()
211 X.assertTrue(pos > i); // Must make progress in parse()
215 pos = scanComment(i, end); in parse()
217 X.assertTrue(pos > i); // Must make progress in parse()
221 pos = scanCDATA(i, end); in parse()
222 X.assertTrue(pos > i || state != State.IN_CDATA); // Must make progress in parse()
229 i = pos; in parse()
[all …]
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DSqlTokenFinder.java62 int pos = 0; in findTokens() local
64 while (pos < len) { in findTokens()
65 final char ch = peek(sql, pos); in findTokens()
69 final int start = pos; in findTokens()
70 pos++; in findTokens()
71 while (isAlNum(peek(sql, pos))) { in findTokens()
72 pos++; in findTokens()
74 final int end = pos; in findTokens()
84 final int quoteStart = pos; in findTokens()
85 pos++; in findTokens()
[all …]
/packages/providers/TvProvider/src/com/android/providers/tv/util/
DSqliteTokenFinder.java74 int pos = 0; in findTokens() local
76 while (pos < len) { in findTokens()
77 final char ch = peek(sql, pos); in findTokens()
81 final int start = pos; in findTokens()
82 pos++; in findTokens()
83 while (isAlNum(peek(sql, pos))) { in findTokens()
84 pos++; in findTokens()
86 final int end = pos; in findTokens()
96 final int quoteStart = pos; in findTokens()
97 pos++; in findTokens()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/sqlite/
DSqlChecker.java144 int pos = 0; in findTokens() local
146 while (pos < len) { in findTokens()
147 final char ch = peek(sql, pos); in findTokens()
151 final int start = pos; in findTokens()
152 pos++; in findTokens()
153 while (isAlNum(peek(sql, pos))) { in findTokens()
154 pos++; in findTokens()
156 final int end = pos; in findTokens()
166 final int quoteStart = pos; in findTokens()
167 pos++; in findTokens()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/address/parser/
DAddressListParserTokenManager.java30 private final int jjStopStringLiteralDfa_0(int pos, long active0) in jjStopStringLiteralDfa_0() argument
32 switch (pos) in jjStopStringLiteralDfa_0()
38 private final int jjStartNfa_0(int pos, long active0) in jjStartNfa_0() argument
40 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); in jjStartNfa_0()
42 private final int jjStopAtPos(int pos, int kind) in jjStopAtPos() argument
45 jjmatchedPos = pos; in jjStopAtPos()
46 return pos + 1; in jjStopAtPos()
48 private final int jjStartNfaWithStates_0(int pos, int kind, int state) in jjStartNfaWithStates_0() argument
51 jjmatchedPos = pos; in jjStartNfaWithStates_0()
53 catch(java.io.IOException e) { return pos + 1; } in jjStartNfaWithStates_0()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/contenttype/parser/
DContentTypeParserTokenManager.java31 private final int jjStopStringLiteralDfa_0(int pos, long active0) in jjStopStringLiteralDfa_0() argument
33 switch (pos) in jjStopStringLiteralDfa_0()
39 private final int jjStartNfa_0(int pos, long active0) in jjStartNfa_0() argument
41 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); in jjStartNfa_0()
43 private final int jjStopAtPos(int pos, int kind) in jjStopAtPos() argument
46 jjmatchedPos = pos; in jjStopAtPos()
47 return pos + 1; in jjStopAtPos()
49 private final int jjStartNfaWithStates_0(int pos, int kind, int state) in jjStartNfaWithStates_0() argument
52 jjmatchedPos = pos; in jjStartNfaWithStates_0()
54 catch(java.io.IOException e) { return pos + 1; } in jjStartNfaWithStates_0()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DKeyboardTextsSet.java68 for (int pos = start; pos < size; pos++) { in searchTextNameEnd()
69 final char c = text.charAt(pos); in searchTextNameEnd()
74 return pos; in searchTextNameEnd()
101 for (int pos = 0; pos < size; pos++) { in resolveTextReference()
102 final char c = text.charAt(pos); in resolveTextReference()
103 if (text.startsWith(PREFIX_TEXT, pos)) { in resolveTextReference()
105 sb = new StringBuilder(text.substring(0, pos)); in resolveTextReference()
107 pos = expandReference(text, pos, PREFIX_TEXT, sb); in resolveTextReference()
108 } else if (text.startsWith(PREFIX_RESOURCE, pos)) { in resolveTextReference()
110 sb = new StringBuilder(text.substring(0, pos)); in resolveTextReference()
[all …]
DKeySpecParser.java85 for (int pos = 0; pos < length; pos++) { in parseEscape()
86 final char c = text.charAt(pos); in parseEscape()
87 if (c == BACKSLASH && pos + 1 < length) { in parseEscape()
89 pos++; in parseEscape()
90 sb.append(text.charAt(pos)); in parseEscape()
111 for (int pos = 0; pos < length; pos++) { in indexOfLabelEnd()
112 final char c = keySpec.charAt(pos); in indexOfLabelEnd()
113 if (c == BACKSLASH && pos + 1 < length) { in indexOfLabelEnd()
115 pos++; in indexOfLabelEnd()
117 return pos; in indexOfLabelEnd()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/
Dpatricia_trie_reading_utils.cpp48 const uint8_t *const buffer, int *const pos) { in getPtNodeArraySizeAndAdvancePosition() argument
49 const uint8_t firstByte = ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getPtNodeArraySizeAndAdvancePosition()
54 buffer, pos); in getPtNodeArraySizeAndAdvancePosition()
59 const uint8_t *const buffer, int *const pos) { in getFlagsAndAdvancePosition() argument
60 return ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getFlagsAndAdvancePosition()
64 const int *const codePointTable, int *const pos) { in getCodePointAndAdvancePosition() argument
65 return ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCodePointAndAdvancePosition()
71 int *const outBuffer, int *const pos) { in getCharsAndAdvancePosition() argument
75 outBuffer, pos); in getCharsAndAdvancePosition()
77 const int codePoint = getCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCharsAndAdvancePosition()
[all …]
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/
Dbyte_array_utils_test.cpp29 int pos = 0; in TEST() local
31 EXPECT_EQ(0x6f, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
33 EXPECT_EQ(0x6b, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
36 EXPECT_EQ(0x100, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST()
53 int pos = 0; in TEST() local
54 EXPECT_EQ(0x18A00, ByteArrayUtils::readSint24AndAdvancePosition(buffer, &pos)); in TEST()
55 pos = 1; in TEST()
56 EXPECT_EQ(-0xA00AA, ByteArrayUtils::readSint24AndAdvancePosition(buffer, &pos)); in TEST()
62 int pos = 0; in TEST() local
64 ByteArrayUtils::writeUintAndAdvancePosition(buffer, data_1B, 1, &pos); in TEST()
[all …]
Dbuffer_with_extendable_buffer_test.cpp28 int pos = 0; in TEST() local
31 EXPECT_TRUE(buffer.writeUint(data_1, 1 /* size */, pos)); in TEST()
32 EXPECT_EQ(data_1, buffer.readUint(1, pos)); in TEST()
33 pos += 1; in TEST()
36 EXPECT_TRUE(buffer.writeUint(data_2, 2 /* size */, pos)); in TEST()
37 EXPECT_EQ(data_2, buffer.readUint(2, pos)); in TEST()
38 pos += 2; in TEST()
41 EXPECT_TRUE(buffer.writeUint(data_3, 3 /* size */, pos)); in TEST()
42 EXPECT_EQ(data_3, buffer.readUint(3, pos)); in TEST()
43 pos += 3; in TEST()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/datetime/parser/
DDateTimeParserTokenManager.java32 private final int jjStopStringLiteralDfa_0(int pos, long active0) in jjStopStringLiteralDfa_0() argument
34 switch (pos) in jjStopStringLiteralDfa_0()
58 private final int jjStartNfa_0(int pos, long active0) in jjStartNfa_0() argument
60 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); in jjStartNfa_0()
62 private final int jjStopAtPos(int pos, int kind) in jjStopAtPos() argument
65 jjmatchedPos = pos; in jjStopAtPos()
66 return pos + 1; in jjStopAtPos()
68 private final int jjStartNfaWithStates_0(int pos, int kind, int state) in jjStartNfaWithStates_0() argument
71 jjmatchedPos = pos; in jjStartNfaWithStates_0()
73 catch(java.io.IOException e) { return pos + 1; } in jjStartNfaWithStates_0()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/
Dpatricia_trie_policy.cpp86 int pos = getRootPosition(); in getCodePointsAndProbabilityAndReturnCodePointCount() local
102 if (!isValidPos(pos)) { in getCodePointsAndProbabilityAndReturnCodePointCount()
104 pos, mBuffer.size()); in getCodePointsAndProbabilityAndReturnCodePointCount()
110 mBuffer.data(), &pos); ptNodeCount > 0; --ptNodeCount) { in getCodePointsAndProbabilityAndReturnCodePointCount()
111 const int startPos = pos; in getCodePointsAndProbabilityAndReturnCodePointCount()
112 if (!isValidPos(pos)) { in getCodePointsAndProbabilityAndReturnCodePointCount()
113 AKLOGE("PtNode position is invalid. pos: %d, dict size: %zd", pos, mBuffer.size()); in getCodePointsAndProbabilityAndReturnCodePointCount()
119 PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(mBuffer.data(), &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
121 mBuffer.data(), codePointTable, &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
128 mBuffer.data(), codePointTable, &pos); in getCodePointsAndProbabilityAndReturnCodePointCount()
[all …]
/packages/apps/LegacyCamera/src/com/android/camera/ui/
DZoomControlBar.java62 int pos; // the relative position in the zoom slider bar in getSliderPosition() local
64 pos = mWidth - mTotalIconWidth - x; in getSliderPosition()
66 pos = x - mTotalIconWidth; in getSliderPosition()
68 if (pos < 0) pos = 0; in getSliderPosition()
69 if (pos > mSliderLength) pos = mSliderLength; in getSliderPosition()
70 return pos; in getSliderPosition()
98 int pos = getSliderPosition((int) event.getX()); in dispatchTouchEvent() local
102 int delta = mSliderPosition - pos; in dispatchTouchEvent()
109 performZoom(1.0d * pos / mSliderLength); in dispatchTouchEvent()
110 mSliderPosition = pos; in dispatchTouchEvent()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DMessageCursor.java82 int pos = -1; in isConversationStarred() local
83 while (moveToPosition(++pos)) { in isConversationStarred()
93 int pos = -1; in isConversationRead() local
94 while (moveToPosition(++pos)) { in isConversationRead()
102 int pos = -1; in markMessagesRead() local
103 while (moveToPosition(++pos)) { in markMessagesRead()
113 int pos = -1; in getMessageForId() local
114 while (moveToPosition(++pos)) { in getMessageForId()
139 int pos = -1; in getStateHashCode() local
141 while (moveToPosition(++pos) && pos < stopAt) { in getStateHashCode()
[all …]
/packages/providers/UserDictionaryProvider/src/com/android/providers/userdictionary/
DDictionaryBackupAgent.java211 int pos = 0; in restoreDictionary() local
212 while (pos + 4 < dictionary.length) { in restoreDictionary()
213 int length = readInt(dictionary, pos); in restoreDictionary()
214 pos += 4; in restoreDictionary()
215 if (pos + length > dictionary.length) { in restoreDictionary()
218 String line = new String(dictionary, pos, length); in restoreDictionary()
219 pos += length; in restoreDictionary()
283 private int writeInt(byte[] out, int pos, int value) { in writeInt() argument
284 out[pos + 0] = (byte) ((value >> 24) & 0xFF); in writeInt()
285 out[pos + 1] = (byte) ((value >> 16) & 0xFF); in writeInt()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_patricia_trie_node_reader.cpp41 int pos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
44 pos -= mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
47 PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
50 dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
56 dictBuf, flags, MAX_WORD_LENGTH, nullptr /* codePointTable */, codePoints, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
60 terminalIdFieldPos = pos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
64 terminalId = Ver4PatriciaTrieReadingUtils::getTerminalIdAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
66 int childrenPosFieldPos = pos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
71 dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
76 pos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/clipping/
DClipStorage.java131 private boolean checkStaleFiles(int pos) { in checkStaleFiles() argument
132 File slotData = toSlotDataFile(pos); in checkStaleFiles()
139 private void prepareSlot(int pos) { in prepareSlot() argument
140 assert(mSlots[pos] != null); in prepareSlot()
142 Files.deleteRecursively(mSlots[pos]); in prepareSlot()
143 mSlots[pos].mkdir(); in prepareSlot()
144 assert(mSlots[pos].isDirectory()); in prepareSlot()
180 private File toSlotDataFile(int pos) { in toSlotDataFile() argument
181 assert(mSlots[pos] != null); in toSlotDataFile()
182 return new File(mSlots[pos], PRIMARY_DATA_FILE_NAME); in toSlotDataFile()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DLevenshteinSuggestionFormatter.java100 int pos = 0; in tokenize() local
106 while (pos < len) { in tokenize()
107 while (pos < len && (chars[pos] == ' ' || chars[pos] == '\t')) { in tokenize()
108 pos++; in tokenize()
110 int start = pos; in tokenize()
111 while (pos < len && !(chars[pos] == ' ' || chars[pos] == '\t')) { in tokenize()
112 pos++; in tokenize()
114 int end = pos; in tokenize()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_patricia_trie_node_reader.cpp50 int pos = ptNodePos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
53 pos -= mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
56 PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
59 dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
64 dictBuf, flags, MAX_WORD_LENGTH, mHeaderPolicy->getCodePointTable(), codePoints, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
69 terminalIdFieldPos = pos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
73 terminalId = Ver4PatriciaTrieReadingUtils::getTerminalIdAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
83 int childrenPosFieldPos = pos; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
88 dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
93 pos += mBuffer->getOriginalBufferSize(); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
[all …]

12345678910