Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 777) sorted by relevance

12345678910>>...32

/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/suggestions/
DMoreSuggestions.java66 int index = fromIndex; in layout() local
69 while (index < size) { in layout()
71 if (isIndexSubjectToAutoCorrection(suggestedWords, index)) { in layout()
75 word = suggestedWords.getLabel(index); in layout()
78 mWidths[index] = (int)(TypefaceUtils.getStringWidth(word, paint) + padding); in layout()
79 final int numColumn = index - rowStartIndex + 1; in layout()
83 || !fitInWidth(rowStartIndex, index + 1, columnWidth)) { in layout()
87 mNumColumnsInRow[row] = index - rowStartIndex; in layout()
88 rowStartIndex = index; in layout()
91 mColumnOrders[index] = index - rowStartIndex; in layout()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/buffer/
DSampleChunkIoHelper.java95 private final int index; field in SampleChunkIoHelper.IoParams
102 int index, in IoParams() argument
107 this.index = index; in IoParams()
216 public SampleHolder readSample(int index) { in readSample() argument
217 SampleHolder sample = mReadSampleBuffers[index].poll(); in readSample()
218 mIoHandler.sendMessage(mIoHandler.obtainMessage(MSG_READ, index)); in readSample()
230 public void writeSample(int index, SampleHolder sample, ConditionVariable conditionVariable) in writeSample() argument
236 IoParams params = new IoParams(index, 0, sample, conditionVariable, null); in writeSample()
246 public void openRead(int index, long positionUs) { in openRead() argument
248 mReadSampleBuffers[index] = new ConcurrentLinkedQueue<>(); in openRead()
[all …]
/packages/apps/Camera2/src/com/android/camera/data/
DFixedFirstProxyAdapter.java62 public FilmstripItem getItemAt(int index) { in getItemAt() argument
63 if (index == 0) { in getItemAt()
66 return mAdapter.getItemAt(index - 1); in getItemAt()
70 public void removeAt(int index) { in removeAt() argument
71 if (index > 0) { in removeAt()
72 mAdapter.removeAt(index - 1); in removeAt()
92 public boolean isDataRemoved(int index) { in updateItemAt()
97 public boolean isDataUpdated(int index) { in updateItemAt()
98 return (index == 0); in updateItemAt()
113 public View getView(View recycled, int index, VideoClickedCallback videoClickedCallback) { in getView() argument
[all …]
DFixedLastProxyAdapter.java61 public FilmstripItem getItemAt(int index) { in getItemAt() argument
64 if (index < totalNumber) { in getItemAt()
65 return mAdapter.getItemAt(index); in getItemAt()
66 } else if (index == totalNumber) { in getItemAt()
73 public void removeAt(int index) { in removeAt() argument
74 if (index < mAdapter.getTotalNumber()) { in removeAt()
75 mAdapter.removeAt(index); in removeAt()
95 public boolean isDataRemoved(int index) { in updateItemAt()
100 public boolean isDataUpdated(int index) { in updateItemAt()
101 return (index == pos); in updateItemAt()
[all …]
DCameraFilmstripDataAdapter.java86 public AsyncTask updateMetadataAt(int index) { in updateMetadataAt() argument
87 return updateMetadataAt(index, false); in updateMetadataAt()
90 private AsyncTask updateMetadataAt(int index, boolean forceItemUpdate) { in updateMetadataAt() argument
92 result.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, index); in updateMetadataAt()
97 public boolean isMetadataUpdatedAt(int index) { in isMetadataUpdatedAt() argument
98 if (index < 0 || index >= mFilmstripItems.size()) { in isMetadataUpdatedAt()
101 return mFilmstripItems.get(index).getMetadata().isLoaded(); in isMetadataUpdatedAt()
105 public int getItemViewType(int index) { in getItemViewType() argument
106 if (index < 0 || index >= mFilmstripItems.size()) { in getItemViewType()
110 return mFilmstripItems.get(index).getItemViewType().ordinal(); in getItemViewType()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DPointerTrackerQueue.java71 for (int index = 0; index < arraySize; index++) { in remove()
72 final Element element = expandableArray.get(index); in remove()
74 if (newIndex != index) { in remove()
79 if (newIndex != index) { in remove()
102 int newIndex, index; in releaseAllPointersOlderThan() local
103 for (newIndex = index = 0; index < arraySize; index++) { in releaseAllPointersOlderThan()
104 final Element element = expandableArray.get(index); in releaseAllPointersOlderThan()
112 if (newIndex != index) { in releaseAllPointersOlderThan()
120 for (; index < arraySize; index++) { in releaseAllPointersOlderThan()
121 final Element element = expandableArray.get(index); in releaseAllPointersOlderThan()
[all …]
DKeyStylesSet.java62 public String[] getStringArray(final TypedArray a, final int index) { in getStringArray() argument
63 return parseStringArray(a, index); in getStringArray()
68 public String getString(final TypedArray a, final int index) { in getString() argument
69 return parseString(a, index); in getString()
73 public int getInt(final TypedArray a, final int index, final int defaultValue) { in getInt() argument
74 return a.getInt(index, defaultValue); in getInt()
78 public int getFlags(final TypedArray a, final int index) { in getFlags() argument
79 return a.getInt(index, 0); in getFlags()
98 public String[] getStringArray(final TypedArray a, final int index) { in getStringArray() argument
99 if (a.hasValue(index)) { in getStringArray()
[all …]
/packages/services/Car/tools/emulator/
DVehicleHalProto_pb2.py26 name='GET_CONFIG_CMD', index=0, number=0,
30 name='GET_CONFIG_RESP', index=1, number=1,
34 name='GET_CONFIG_ALL_CMD', index=2, number=2,
38 name='GET_CONFIG_ALL_RESP', index=3, number=3,
42 name='GET_PROPERTY_CMD', index=4, number=4,
46 name='GET_PROPERTY_RESP', index=5, number=5,
50 name='GET_PROPERTY_ALL_CMD', index=6, number=6,
54 name='GET_PROPERTY_ALL_RESP', index=7, number=7,
58 name='SET_PROPERTY_CMD', index=8, number=8,
62 name='SET_PROPERTY_RESP', index=9, number=9,
[all …]
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/
Dproximity_info_state.h65 inline int getPrimaryCodePointAt(const int index) const { in getPrimaryCodePointAt() argument
66 return getProximityCodePointsAt(index)[0]; in getPrimaryCodePointAt()
69 int getPrimaryOriginalCodePointAt(const int index) const;
86 AK_FORCE_INLINE bool existsCodePointInProximityAt(const int index, const int c) const { in existsCodePointInProximityAt() argument
87 const int *codePoints = getProximityCodePointsAt(index); in existsCodePointInProximityAt()
97 AK_FORCE_INLINE bool existsAdjacentProximityChars(const int index) const { in existsAdjacentProximityChars() argument
98 if (index < 0 || index >= mSampledInputSize) return false; in existsAdjacentProximityChars()
99 const int currentCodePoint = getPrimaryCodePointAt(index); in existsAdjacentProximityChars()
100 const int leftIndex = index - 1; in existsAdjacentProximityChars()
104 const int rightIndex = index + 1; in existsAdjacentProximityChars()
[all …]
Dproximity_info_state.cpp35 int ProximityInfoState::getPrimaryOriginalCodePointAt(const int index) const { in getPrimaryOriginalCodePointAt()
36 const int primaryCodePoint = getPrimaryCodePointAt(index); in getPrimaryOriginalCodePointAt()
173 const int index = inputIndex * mProximityInfo->getKeyCount() + keyId; in getPointToKeyLength() local
174 return std::min(mSampledNormalizedSquaredLengthCache[index], mMaxPointToKeyLength); in getPointToKeyLength()
200 ProximityType ProximityInfoState::getProximityType(const int index, const int codePoint, in getProximityType() argument
202 const int *currentCodePoints = getProximityCodePointsAt(index); in getProximityType()
254 ProximityType ProximityInfoState::getProximityTypeG(const int index, const int codePoint) const { in getProximityTypeG() argument
259 if (index < 0 || index >= sampledSearchKeyVectorsSize) { in getProximityTypeG()
261 "mSampledSearchKeyVectors.size() = %d, codePoint = %x.", index, in getProximityTypeG()
268 for (int i = 0; i < static_cast<int>(mSampledSearchKeyVectors[index].size()); ++i) { in getProximityTypeG()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/util/
DIntArray.java77 public void add(int index, int value) { in add() argument
79 int rightSegment = mSize - index; in add()
81 checkBounds(mSize, index); in add()
85 System.arraycopy(mValues, index, mValues, index + 1, rightSegment); in add()
88 mValues[index] = value; in add()
160 public int get(int index) { in get() argument
161 checkBounds(mSize, index); in get()
162 return mValues[index]; in get()
168 public void set(int index, int value) { in set() argument
169 checkBounds(mSize, index); in set()
[all …]
/packages/apps/UnifiedEmail/src/com/google/android/mail/common/base/
DUnicodeEscaper.java109 int index = start; in nextEscapeIndex() local
110 while (index < end) { in nextEscapeIndex()
111 int cp = codePointAt(csq, index, end); in nextEscapeIndex()
115 index += Character.isSupplementaryCodePoint(cp) ? 2 : 1; in nextEscapeIndex()
117 return index; in nextEscapeIndex()
147 int index = nextEscapeIndex(string, 0, end); in escape() local
148 return index == end ? string : escapeSlow(string, index); in escape()
168 protected final String escapeSlow(String s, int index) { in escapeSlow() argument
176 while (index < end) { in escapeSlow()
177 int cp = codePointAt(s, index, end); in escapeSlow()
[all …]
DPreconditions.java268 public static int checkElementIndex(int index, int size) { in checkElementIndex() argument
269 return checkElementIndex(index, size, "index"); in checkElementIndex()
286 public static int checkElementIndex(int index, int size, String desc) { in checkElementIndex() argument
288 if (index < 0 || index >= size) { in checkElementIndex()
289 throw new IndexOutOfBoundsException(badElementIndex(index, size, desc)); in checkElementIndex()
291 return index; in checkElementIndex()
294 private static String badElementIndex(int index, int size, String desc) { in badElementIndex() argument
295 if (index < 0) { in badElementIndex()
296 return format("%s (%s) must not be negative", desc, index); in badElementIndex()
300 return format("%s (%s) must be less than size (%s)", desc, index, size); in badElementIndex()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DAlbumSetDataLoader.java49 public void onContentChanged(int index); in onContentChanged() argument
117 private void assertIsActive(int index) { in assertIsActive() argument
118 if (index < mActiveStart || index >= mActiveEnd) { in assertIsActive()
120 "%s not in (%s, %s)", index, mActiveStart, mActiveEnd)); in assertIsActive()
124 public MediaSet getMediaSet(int index) { in getMediaSet() argument
125 assertIsActive(index); in getMediaSet()
126 return mData[index % mData.length]; in getMediaSet()
129 public MediaItem getCoverItem(int index) { in getCoverItem() argument
130 assertIsActive(index); in getCoverItem()
131 return mCoverItem[index % mCoverItem.length]; in getCoverItem()
[all …]
DPhotoDataAdapter.java159 public void onPhotoChanged(int index, Path item); in onPhotoChanged() argument
221 private MediaItem getItemInternal(int index) { in getItemInternal() argument
222 if (index < 0 || index >= mSize) return null; in getItemInternal()
223 if (index >= mContentStart && index < mContentEnd) { in getItemInternal()
224 return mData[index % DATA_CACHE_SIZE]; in getItemInternal()
229 private long getVersion(int index) { in getVersion() argument
230 MediaItem item = getItemInternal(index); in getVersion()
235 private Path getPath(int index) { in getPath() argument
236 MediaItem item = getItemInternal(index); in getPath()
385 private MediaItem getItem(int index) { in getItem() argument
[all …]
DSlideshowPage.java70 public int index; field in SlideshowPage.Slide
72 public Slide(MediaItem item, int index, Bitmap bitmap) { in Slide() argument
75 this.index = index; in Slide()
168 .putExtra(KEY_PHOTO_INDEX, slide.index)); in showPendingBitmap()
210 int index = data.getInt(KEY_PHOTO_INDEX); in initializeData() local
215 index, path); in initializeData()
216 setStateResult(Activity.RESULT_OK, mResultIntent.putExtra(KEY_PHOTO_INDEX, index)); in initializeData()
226 private static MediaItem findMediaItem(MediaSet mediaSet, int index) { in findMediaItem() argument
230 if (index < count) { in findMediaItem()
231 return findMediaItem(subset, index); in findMediaItem()
[all …]
/packages/apps/TV/tests/common/src/com/android/tv/testing/data/
DProgramInfo.java109 int index = c.getColumnIndex(TvContract.Programs.COLUMN_TITLE); in fromCursor() local
110 if (index >= 0) { in fromCursor()
111 builder.setTitle(c.getString(index)); in fromCursor()
113 index = c.getColumnIndex(TvContract.Programs.COLUMN_SHORT_DESCRIPTION); in fromCursor()
114 if (index >= 0) { in fromCursor()
115 builder.setDescription(c.getString(index)); in fromCursor()
117 index = c.getColumnIndex(TvContract.Programs.COLUMN_EPISODE_TITLE); in fromCursor()
118 if (index >= 0) { in fromCursor()
119 builder.setEpisode(c.getString(index)); in fromCursor()
166 int index = (int) ((timeMs - startTimeMs) / durationsSumMs) * DURATIONS_MS.length; in getIndex() local
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsIcuTest.java37 final ImmutableIndex index = ai.buildImmutableIndex(); in buildIndex() local
40 ContactLocaleUtils.dumpIndex(index); in buildIndex()
42 return index; in buildIndex()
45 private static String getBucket(ImmutableIndex index, String name) { in getBucket() argument
46 return index.getBucket(index.getBucketIndex(name)).getLabel(); in getBucket()
49 private static boolean checkBucket(ImmutableIndex index, String expectedBucket, String str) { in checkBucket() argument
61 final String actual = getBucket(index, ch); in checkBucket()
77 final ImmutableIndex index = buildIndex("zh-Hant-TW"); in testTraditionalChineseStrokeCounts() local
81 okay &= checkBucket(index, "1劃", "一丨丶丿乀乁乙乚乛亅"); in testTraditionalChineseStrokeCounts()
82 okay &= checkBucket(index, "2劃", "㐅丁丂七丄丅丆丩丷乂乃乄乜九了二亠人亻儿入八冂冖冫几"); in testTraditionalChineseStrokeCounts()
[all …]
/packages/services/Car/vehicle-hal-support-lib/src/com/android/car/vehiclehal/
DDiagnosticEventBuilder.java49 private int checkIndex(int index) { in checkIndex() argument
50 if (index < 0 || index >= mSize) in checkIndex()
52 String.format("Index: %d, Size: %d", index, mSize)); in checkIndex()
53 return index; in checkIndex()
56 DefaultedArray<T> set(int index, T element) { in set() argument
57 checkIndex(index); in set()
58 mElements.put(index, element); in set()
62 T get(int index) { in get() argument
63 checkIndex(index); in get()
64 return mElements.get(index, mDefaultValue); in get()
[all …]
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/decoder/
DUnboundedFifoByteBuffer.java192 private int increment(int index) { in increment() argument
193 index++; in increment()
194 if (index >= buffer.length) { in increment()
195 index = 0; in increment()
197 return index; in increment()
206 private int decrement(int index) { in decrement() argument
207 index--; in decrement()
208 if (index < 0) { in decrement()
209 index = buffer.length - 1; in decrement()
211 return index; in decrement()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/gadget/
DMediaSetSource.java65 public Bitmap getImage(int index) { in getImage() argument
66 return mSource.getImage(index); in getImage()
70 public Uri getContentUri(int index) { in getContentUri() argument
71 return mSource.getContentUri(index); in getContentUri()
147 private void ensureCacheRange(int index) { in ensureCacheRange() argument
148 if (index >= mCacheStart && index < mCacheEnd) return; in ensureCacheRange()
152 mCacheStart = index; in ensureCacheRange()
162 public synchronized Uri getContentUri(int index) { in getContentUri() argument
163 ensureCacheRange(index); in getContentUri()
164 if (index < mCacheStart || index >= mCacheEnd) return null; in getContentUri()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/util/
DSearchUtil.java37 final int index = SearchUtil.contains(contents, substring); in findMatchingLine() local
38 if (index != -1) { in findMatchingLine()
40 int start = index - 1; in findMatchingLine()
47 int end = index + 1; in findMatchingLine()
55 matched.startIndex = index - (start + 1); in findMatchingLine()
119 int index = startIndex; in findNextTokenStart() local
122 while (index <= line.length()) { in findNextTokenStart()
123 if (index == line.length()) { in findNextTokenStart()
125 return index; in findNextTokenStart()
127 final int codePoint = line.codePointAt(index); in findNextTokenStart()
[all …]
/packages/apps/Contacts/src/com/android/contacts/util/
DSearchUtil.java54 final int index = SearchUtil.contains(contents, substring); in findMatchingLine() local
55 if (index != -1) { in findMatchingLine()
57 int start = index - 1; in findMatchingLine()
64 int end = index + 1; in findMatchingLine()
72 matched.startIndex = index - (start + 1); in findMatchingLine()
136 int index = startIndex; in findNextTokenStart() local
139 while (index <= line.length()) { in findNextTokenStart()
140 if (index == line.length()) { in findNextTokenStart()
142 return index; in findNextTokenStart()
144 final int codePoint = line.codePointAt(index); in findNextTokenStart()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DSlotView.java41 public void onDown(int index); in onDown() argument
43 public void onSingleTapUp(int index); in onSingleTapUp() argument
44 public void onLongTap(int index); in onLongTap() argument
49 @Override public void onDown(int index) {} in onDown() argument
51 @Override public void onSingleTapUp(int index) {} in onSingleTapUp() argument
52 @Override public void onLongTap(int index) {} in onLongTap() argument
60 public int renderSlot(GLCanvas canvas, int index, int pass, int width, int height); in renderSlot() argument
106 public void setCenterIndex(int index) { in setCenterIndex() argument
108 if (index < 0 || index >= slotCount) { in setCenterIndex()
111 Rect rect = mLayout.getSlotRect(index, mTempRect); in setCenterIndex()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/data/
DRecordedProgram.java88 int index = 0; in fromCursor() local
91 .setId(cursor.getLong(index++)) in fromCursor()
92 .setPackageName(cursor.getString(index++)) in fromCursor()
93 .setInputId(cursor.getString(index++)) in fromCursor()
94 .setChannelId(cursor.getLong(index++)) in fromCursor()
95 .setTitle(StringUtils.nullToEmpty(cursor.getString(index++))) in fromCursor()
96 .setSeasonNumber(StringUtils.nullToEmpty(cursor.getString(index++))) in fromCursor()
97 .setSeasonTitle(StringUtils.nullToEmpty(cursor.getString(index++))) in fromCursor()
98 .setEpisodeNumber(StringUtils.nullToEmpty(cursor.getString(index++))) in fromCursor()
99 .setEpisodeTitle(StringUtils.nullToEmpty(cursor.getString(index++))) in fromCursor()
[all …]

12345678910>>...32