Home
last modified time | relevance | path

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

12345678910>>...13

/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/TV/tuner/src/com/android/tv/tuner/data/
DCea708Parser.java285 int pos = 0; in parseCcPacket() local
287 boolean ccValid = (bytes[pos] & 0x04) != 0; in parseCcPacket()
288 int ccType = bytes[pos] & 0x03; in parseCcPacket()
299 int packetSize = bytes[pos + 1] & 0x3F; // last 6 bits in parseCcPacket()
304 mDtvCcPacket.append(bytes[pos + 1]); in parseCcPacket()
305 mDtvCcPacket.append(bytes[pos + 2]); in parseCcPacket()
307 mDtvCcPacket.append(bytes[pos + 1]); in parseCcPacket()
308 mDtvCcPacket.append(bytes[pos + 2]); in parseCcPacket()
318 pos += 3; in parseCcPacket()
325 int pos = 0; in parseDtvCcPacket() local
[all …]
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 …]
/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/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/TelephonyProvider/src/com/android/providers/telephony/
DSQLiteTokenizer.java93 int pos = 0; in tokenize() local
95 while (pos < len) { in tokenize()
96 final char ch = peek(sql, pos); in tokenize()
100 final int start = pos; in tokenize()
101 pos++; in tokenize()
102 while (isAlNum(peek(sql, pos))) { in tokenize()
103 pos++; in tokenize()
105 final int end = pos; in tokenize()
115 final int quoteStart = pos; in tokenize()
116 pos++; in tokenize()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DSQLiteTokenizer.java93 int pos = 0; in tokenize() local
95 while (pos < len) { in tokenize()
96 final char ch = peek(sql, pos); in tokenize()
100 final int start = pos; in tokenize()
101 pos++; in tokenize()
102 while (isAlNum(peek(sql, pos))) { in tokenize()
103 pos++; in tokenize()
105 final int end = pos; in tokenize()
115 final int quoteStart = pos; in tokenize()
116 pos++; in tokenize()
[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/modules/AppSearch/framework/java/android/app/appsearch/safeparcel/
DSafeParcelReader.java198 final int pos = p.dataPosition(); in createBigInteger() local
203 p.setDataPosition(pos + size); in createBigInteger()
247 final int pos = p.dataPosition(); in createBigDecimal() local
253 p.setDataPosition(pos + size); in createBigDecimal()
261 final int pos = p.dataPosition(); in createString() local
266 p.setDataPosition(pos + size); in createString()
274 final int pos = p.dataPosition(); in readIBinder() local
279 p.setDataPosition(pos + size); in readIBinder()
287 final int pos = p.dataPosition(); in readPendingIntent() local
292 p.setDataPosition(pos + size); in readPendingIntent()
[all …]
/packages/modules/StatsD/statsd/src/logd/
DLogEvent.cpp95 void LogEvent::parseInt32(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) { in parseInt32() argument
97 addToValues(pos, depth, value, last); in parseInt32()
101 void LogEvent::parseInt64(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) { in parseInt64() argument
103 addToValues(pos, depth, value, last); in parseInt64()
107 void LogEvent::parseString(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) { in parseString() argument
117 addToValues(pos, depth, value, last); in parseString()
121 void LogEvent::parseFloat(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) { in parseFloat() argument
123 addToValues(pos, depth, value, last); in parseFloat()
127 void LogEvent::parseBool(int32_t* pos, int32_t depth, bool* last, uint8_t numAnnotations) { in parseBool() argument
130 addToValues(pos, depth, value, last); in parseBool()
[all …]
/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/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 …]
/packages/modules/Connectivity/service-t/src/com/android/server/connectivity/mdns/
DMdnsPacketReader.java43 private int pos; field in MdnsPacketReader
55 pos = 0; in MdnsPacketReader()
70 if (pos + limit <= count) { in setLimit()
71 this.limit = pos + limit; in setLimit()
77 pos + limit, in setLimit()
93 return (limit >= 0 ? limit : count) - pos; in getRemaining()
104 byte val = buf[pos++]; in readUInt8()
116 int val = (buf[pos++] & 0xFF) << 8; in readUInt16()
117 val |= (buf[pos++]) & 0xFF; in readUInt16()
129 long val = (long) (buf[pos++] & 0xFF) << 24; in readUInt32()
[all …]
DMdnsPacketWriter.java33 private int pos = 0; field in MdnsPacketWriter
60 return pos; in getWritePosition()
73 if ((savedWritePos != -1) || (position > pos) || (position < 0)) { in rewind()
77 savedWritePos = pos; in rewind()
78 pos = position; in rewind()
90 pos = savedWritePos; in unrewind()
107 data[pos++] = (byte) (value & 0xFF); in writeUInt8()
118 data[pos++] = (byte) ((value >>> 8) & 0xFF); in writeUInt16()
119 data[pos++] = (byte) (value & 0xFF); in writeUInt16()
130 data[pos++] = (byte) ((value >>> 24) & 0xFF); in writeUInt32()
[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/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/TV/tuner/sampletunertvinput/src/com/android/tv/samples/sampletunertvinput/
DSampleTunerTvInputSectionParser.java133 int pos = offset; in parseDescriptors() local
134 while (pos + 1 < limit) { in parseDescriptors()
135 int tag = data[pos] & 0xff; in parseDescriptors()
136 int length = data[pos + 1] & 0xff; in parseDescriptors()
140 pos += 2; in parseDescriptors()
142 if (limit < pos + length) { in parseDescriptors()
152 descriptor = parseExtendedChannelNameDescriptor(data, pos, pos + length); in parseDescriptors()
160 pos += length; in parseDescriptors()
188 int pos = offset + 1; in parseMultipleStringStructure() local
190 if (limit < pos + 4) { in parseMultipleStringStructure()
[all …]
/packages/modules/Connectivity/clatd/
Dtranslate.c37 uint16_t packet_checksum(uint32_t checksum, clat_packet packet, clat_packet_index pos) { in packet_checksum() argument
39 for (i = pos; i < CLAT_POS_MAX; i++) { in packet_checksum()
53 uint16_t packet_length(clat_packet packet, clat_packet_index pos) { in packet_length() argument
56 for (i = pos + 1; i < CLAT_POS_MAX; i++) { in packet_length()
228 int icmp_to_icmp6(clat_packet out, clat_packet_index pos, const struct icmphdr *icmp, in icmp_to_icmp6() argument
230 struct icmp6_hdr *icmp6_targ = out[pos].iov_base; in icmp_to_icmp6()
240 out[pos].iov_len = sizeof(struct icmp6_hdr); in icmp_to_icmp6()
242 if (pos == CLAT_POS_TRANSPORTHDR && is_icmp_error(icmp->type) && icmp6_type != ICMP6_PARAM_PROB) { in icmp_to_icmp6()
245 clat_packet_len = ipv4_packet(out, pos + 1, payload, payload_size); in icmp_to_icmp6()
267 icmp6_targ->icmp6_cksum = packet_checksum(checksum, out, pos); in icmp_to_icmp6()
[all …]
Dipv4.c34 int icmp_packet(clat_packet out, clat_packet_index pos, const struct icmphdr *icmp, in icmp_packet() argument
47 return icmp_to_icmp6(out, pos, icmp, checksum, payload, payload_size); in icmp_packet()
57 int ipv4_packet(clat_packet out, clat_packet_index pos, const uint8_t *packet, size_t len) { in ipv4_packet() argument
59 struct ip6_hdr *ip6_targ = (struct ip6_hdr *)out[pos].iov_base; in ipv4_packet()
107 out[pos].iov_len = sizeof(struct ip6_hdr); in ipv4_packet()
118 frag_hdr = (struct ip6_frag *)out[pos + 1].iov_base; in ipv4_packet()
120 out[pos + 1].iov_len = frag_hdr_len; in ipv4_packet()
124 iov_len = generic_packet(out, pos + 2, next_header, len_left); in ipv4_packet()
126 iov_len = icmp_packet(out, pos + 2, (const struct icmphdr *)next_header, new_sum, len_left); in ipv4_packet()
129 tcp_packet(out, pos + 2, (const struct tcphdr *)next_header, old_sum, new_sum, len_left); in ipv4_packet()
[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/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/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 …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/shortcut/
Dshortcut_list_policy.h35 int getStartPos(const int pos) const { in getStartPos() argument
36 if (pos == NOT_A_DICT_POS) { in getStartPos()
39 int listPos = pos; in getStartPos()
46 int *const pos) const { in getNextShortcut() argument
48 ShortcutListReadingUtils::getFlagsAndForwardPointer(mBuffer, pos); in getNextShortcut()
57 mBuffer, maxCodePointCount, outCodePoint, pos); in getNextShortcut()
61 void skipAllShortcuts(int *const pos) const { in skipAllShortcuts() argument
63 ::getShortcutListSizeAndForwardPointer(mBuffer, pos); in skipAllShortcuts()
64 *pos += shortcutListSize; in skipAllShortcuts()

12345678910>>...13