Home
last modified time | relevance | path

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

12345678

/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.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 …]
/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/ThemePicker/src/com/android/customization/module/
DWallpaperStatsLog.java82 int pos = 0; in write() local
83 buff[pos] = LIST_TYPE; in write()
84 buff[pos + 1] = 12; in write()
85 pos += LIST_TYPE_OVERHEAD; in write()
87 buff[pos] = LONG_TYPE; in write()
88 copyLong(buff, pos + 1, elapsedRealtime); in write()
89 pos += LONG_TYPE_SIZE; in write()
90 buff[pos] = INT_TYPE; in write()
91 copyInt(buff, pos + 1, code); in write()
92 pos += INT_TYPE_SIZE; in write()
[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/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/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/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/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 …]
/packages/apps/DocumentsUI/src/com/android/documentsui/
DFocusManager.java184 int pos = mScope.adapter.getStableIds().indexOf(mScope.pendingFocusId); in onLayoutCompleted() local
185 if (pos != -1) { in onLayoutCompleted()
186 focusItem(pos); in onLayoutCompleted()
211 int pos = mScope.adapter.getAdapterPosition(modelId); in focusDocument() local
212 if (pos != -1 && mScope.view.findViewHolderForAdapterPosition(pos) != null) { in focusDocument()
213 focusItem(pos); in focusDocument()
369 private void focusItem(final int pos) { in focusItem() argument
370 focusItem(pos, null); in focusItem()
380 private void focusItem(final int pos, @Nullable final FocusCallback callback) { in focusItem() argument
387 final RecyclerView.ViewHolder vh = recyclerView.findViewHolderForAdapterPosition(pos); in focusItem()
[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()
/packages/apps/Camera2/src/com/android/camera/data/
DCameraFilmstripDataAdapter.java175 int pos = findByContentUri(uri); in addOrUpdate() local
176 if (pos != -1) { in addOrUpdate()
179 updateItemAt(pos, item); in addOrUpdate()
226 final int pos = findByContentUri(uri); in refresh() local
227 if (pos == -1) { in refresh()
231 FilmstripItem data = mFilmstripItems.get(pos); in refresh()
236 mListener.onFilmstripItemRemoved(pos, data); in refresh()
239 updateItemAt(pos, refreshedData); in refresh()
243 public void updateItemAt(final int pos, FilmstripItem item) { in updateItemAt() argument
244 mFilmstripItems.set(pos, item); in updateItemAt()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DViewImage.java483 void setImage(int pos, boolean showControls) { in setImage() argument
484 mCurrentPosition = pos; in setImage()
486 Bitmap b = mCache.getBitmap(pos); in setImage()
488 IImage image = mAllImages.getImageAt(pos); in setImage()
498 public boolean wantsThumbnail(int pos, int offset) { in setImage()
499 return !mCache.hasBitmap(pos + offset); in setImage()
502 public boolean wantsFullImage(int pos, int offset) { in setImage()
506 public int fullImageSizeToUse(int pos, int offset) { in setImage()
521 public void imageLoaded(int pos, int offset, RotateBitmap bitmap, in setImage()
526 if (pos != mCurrentPosition) { in setImage()
[all …]

12345678