/packages/apps/DocumentsUI/src/com/android/documentsui/selection/ |
D | Range.java | 42 void snapSelection(int position, @RangeType int type) { in snapSelection() argument 43 assert(position != RecyclerView.NO_POSITION); in snapSelection() 48 establishRange(position, type); in snapSelection() 50 reviseRange(position, type); in snapSelection() 54 private void establishRange(int position, @RangeType int type) { in establishRange() argument 57 if (position == mBegin) { in establishRange() 58 mEnd = position; in establishRange() 61 if (position > mBegin) { in establishRange() 62 updateRange(mBegin + 1, position, true, type); in establishRange() 63 } else if (position < mBegin) { in establishRange() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/agenda/ |
D | AgendaByDayAdapter.java | 83 public long getInstanceId(int position) { in getInstanceId() argument 84 if (mRowInfo == null || position >= mRowInfo.size()) { in getInstanceId() 87 return mRowInfo.get(position).mInstanceId; in getInstanceId() 90 public long getStartTime(int position) { in getStartTime() argument 91 if (mRowInfo == null || position >= mRowInfo.size()) { in getStartTime() 94 return mRowInfo.get(position).mEventStartTimeMilli; in getStartTime() 99 public int getHeaderPosition(int position) { in getHeaderPosition() argument 100 if (mRowInfo == null || position >= mRowInfo.size()) { in getHeaderPosition() 104 for (int i = position; i >=0; i --) { in getHeaderPosition() 113 public int getHeaderItemsCount(int position) { in getHeaderItemsCount() argument [all …]
|
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/ |
D | SearchCursorManager.java | 153 int getRowType(int position) { in getRowType() argument 155 position -= contactsCursor.getCount(); in getRowType() 157 if (position < 0) { in getRowType() 163 if (position == 0) { in getRowType() 166 position--; // header in getRowType() 169 position -= nearbyPlacesCursor.getCount(); in getRowType() 171 if (position < 0) { in getRowType() 177 if (position == 0) { in getRowType() 180 position--; // header in getRowType() 183 position -= corpDirectoryCursor.getCount(); in getRowType() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | AnimatedAdapter.java | 405 public int getItemViewType(int position) { in getItemViewType() argument 407 if (mHeaders.size() > position) { in getItemViewType() 409 } else if (position == getCount() - 1) { in getItemViewType() 419 } else if (mSpecialViews.get(getSpecialViewsPos(position)) != null) { in getItemViewType() 470 if (c.position >= startPosition && c.position <= endPosition) { in delete() 488 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 489 if (mHeaders.size() > position) { in getView() 490 return mHeaders.get(position); in getView() 491 } else if (position == getCount() - 1) { in getView() 497 getSpecialViewsPos(position)); in getView() [all …]
|
/packages/apps/Dialer/java/com/android/contacts/common/list/ |
D | ViewPagerTabs.java | 124 public void setUnreadCount(int count, int position) { in setUnreadCount() argument 125 if (mUnreadCounts == null || position >= mUnreadCounts.length) { in setUnreadCount() 128 mUnreadCounts[position] = count; in setUnreadCount() 140 private void addTab(CharSequence tabTitle, final int position) { in addTab() argument 142 if (mTabIcons != null && position < mTabIcons.length) { in addTab() 145 iconView.setBackgroundResource(mTabIcons[position]); in addTab() 148 if (mUnreadCounts != null && mUnreadCounts[position] > 0) { in addTab() 149 textView.setText(Integer.toString(mUnreadCounts[position])); in addTab() 155 mUnreadCounts[position], in addTab() 157 mUnreadCounts[position])); in addTab() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/selectcalendars/ |
D | SelectCalendarsSimpleAdapter.java | 217 public View getView(final int position, View convertView, ViewGroup parent) { in getView() argument 218 if (position >= mRowCount) { in getView() 221 String name = mData[position].displayName; in getView() 222 boolean selected = mData[position].selected; in getView() 224 int color = Utils.getDisplayColorFromColor(mData[position].color); in getView() 256 if (!hasMoreColors(position)) { in getView() 261 mColorPickerDialog = CalendarColorPickerDialog.newInstance(mData[position].id, in getView() 264 mColorPickerDialog.setCalendarId(mData[position].id); in getView() 287 colorView.setEnabled(hasMoreColors(position)); in getView() 290 if (!TextUtils.isEmpty(mData[position].ownerAccount) in getView() [all …]
|
D | SelectCalendarsSyncAdapter.java | 147 public View getView(final int position, View convertView, ViewGroup parent) { in getView() argument 148 if (position >= mRowCount) { in getView() 151 String name = mData[position].displayName; in getView() 152 boolean selected = mData[position].synced; in getView() 153 int color = Utils.getDisplayColorFromColor(mData[position].color); in getView() 176 view.setTag(mData[position]); in getView() 188 colorView.setEnabled(hasMoreColors(position)); in getView() 195 if (!hasMoreColors(position)) { in getView() 200 mColorPickerDialog = CalendarColorPickerDialog.newInstance(mData[position].id, in getView() 203 mColorPickerDialog.setCalendarId(mData[position].id); in getView() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
D | CompositeListAdapter.java | 139 public Object getItem(int position) { in getItem() argument 144 if (position >= start && position < end) { in getItem() 145 return mAdapters[i].getItem(position - start); in getItem() 150 throw new ArrayIndexOutOfBoundsException(position); in getItem() 153 public long getItemId(int position) { in getItemId() argument 158 if (position >= start && position < end) { in getItemId() 159 return mAdapters[i].getItemId(position - start); in getItemId() 164 throw new ArrayIndexOutOfBoundsException(position); in getItemId() 174 public int getItemViewType(int position) { in getItemViewType() argument 180 if (position >= start && position < end) { in getItemViewType() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/ |
D | MtpDeviceIndex.java | 243 public Object get(int position, SortOrder order) { in get() argument 249 DateBucket bucket = results.buckets[results.unifiedLookupIndex[position]]; in get() 250 if (bucket.unifiedStartIndex == position) { in get() 253 return results.mtpObjects[bucket.itemsStartIndex + position - 1 in get() 257 int zeroIndex = results.unifiedLookupIndex.length - 1 - position; in get() 273 public IngestObjectInfo getWithoutLabels(int position, SortOrder order) { in getWithoutLabels() argument 279 return results.mtpObjects[position]; in getWithoutLabels() 281 return results.mtpObjects[results.mtpObjects.length - 1 - position]; in getWithoutLabels() 292 public int getPositionFromPositionWithoutLabels(int position, SortOrder order) { in getPositionFromPositionWithoutLabels() argument 302 position = results.mtpObjects.length - 1 - position; in getPositionFromPositionWithoutLabels() [all …]
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | SectionedAlbumDataAdapter.java | 113 public boolean isEnabled(int position) { in isEnabled() argument 114 if (isHeader(position)) { in isEnabled() 117 return mAlbumData.isEnabled(internalPosition(position)); in isEnabled() 129 public Object getItem(int position) { in getItem() argument 130 if (isHeader(position)) { in getItem() 131 return mAlbumData.getItem(internalPosition(position+1)).account; in getItem() 133 return mAlbumData.getItem(internalPosition(position)); in getItem() 138 public long getItemId(int position) { in getItemId() argument 139 return position; in getItemId() 143 public int getItemViewType(int position) { in getItemViewType() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/adapter/ |
D | MtpAdapter.java | 93 public Object getItem(int position) { in getItem() argument 94 return mModel.get(position, mSortOrder); in getItem() 103 public boolean isEnabled(int position) { in isEnabled() argument 108 public long getItemId(int position) { in getItemId() argument 109 return position; in getItemId() 118 public int getItemViewType(int position) { in getItemViewType() argument 121 if (position == getPositionForSection(getSectionForPosition(position))) { in getItemViewType() 128 public boolean itemAtPositionIsBucket(int position) { in itemAtPositionIsBucket() argument 129 return getItemViewType(position) == ITEM_TYPE_BUCKET; in itemAtPositionIsBucket() 132 public boolean itemAtPositionIsMedia(int position) { in itemAtPositionIsMedia() argument [all …]
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | MenuLayoutManager.java | 180 int position = 0; in dumpChildren() local 184 Log.d(TAG, prefix + " position=" + position++ in dumpChildren() 213 private boolean isVisibleInLayout(int position, MenuRowView view, List<Integer> rowsToAdd, in isVisibleInLayout() argument 216 return (view.getVisibility() != View.GONE && !rowsToRemove.contains(position)) in isVisibleInLayout() 217 || rowsToAdd.contains(position); in isVisibleInLayout() 268 int position = mSelectedPosition + 1; in getViewLayouts() local 269 for (; position < count; ++position) { in getViewLayouts() 271 MenuRowView nextView = mMenuRowViews.get(position); in getViewLayouts() 272 if (isVisibleInLayout(position, nextView, rowsToAdd, rowsToRemove)) { in getViewLayouts() 299 for (++position; position < count; ++position) { in getViewLayouts() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | HeaderGridView.java | 307 public boolean isEnabled(int position) { in isEnabled() argument 310 if (position < numHeadersAndPlaceholders) { in isEnabled() 311 return (position % mNumColumns == 0) in isEnabled() 312 && mHeaderViewInfos.get(position / mNumColumns).isSelectable; in isEnabled() 316 final int adjPosition = position - numHeadersAndPlaceholders; in isEnabled() 325 throw new ArrayIndexOutOfBoundsException(position); in isEnabled() 329 public Object getItem(int position) { in getItem() argument 332 if (position < numHeadersAndPlaceholders) { in getItem() 333 if (position % mNumColumns == 0) { in getItem() 334 return mHeaderViewInfos.get(position / mNumColumns).data; in getItem() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/input/ |
D | NullInputStream.java | 66 private long position; field in NullInputStream 106 return position; in getPosition() 124 long avail = size - position; in available() 142 position = 0; in close() 157 mark = position; in mark() 184 if (position == size) { in read() 187 position++; in read() 223 if (position == size) { in read() 226 position += length; in read() 228 if (position > size) { in read() [all …]
|
D | NullReader.java | 66 private long position; field in NullReader 106 return position; in getPosition() 126 position = 0; in close() 141 mark = position; in mark() 168 if (position == size) { in read() 171 position++; in read() 207 if (position == size) { in read() 210 position += length; in read() 212 if (position > size) { in read() 213 returnLength = length - (int)(position - size); in read() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
D | CompositeAdapter.java | 143 public int getPartitionAtPosition(final int position) { in getPartitionAtPosition() argument 148 if (position >= start && position < end) { in getPartitionAtPosition() 149 int offset = position - start; in getPartitionAtPosition() 194 public Object getItem(final int position) { in getItem() argument 199 if (position >= start && position < end) { in getItem() 200 final int offset = position - start; in getItem() 216 public long getItemId(final int position) { in getItemId() argument 221 if (position >= start && position < end) { in getItemId() 222 final int offset = position - start; in getItemId() 238 public boolean isEnabled(int position) { in isEnabled() argument [all …]
|
D | ViewPagerTabs.java | 157 private void addTab(CharSequence tabTitle, final int position) { in addTab() argument 165 mPager.setCurrentItem(getRtlPosition(position)); in addTab() 184 if (position == 0) { in addTab() 191 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument 192 position = getRtlPosition(position); in onPageScrolled() 194 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageScrolled() 198 mTabStrip.onPageScrolled(position, positionOffset, positionOffsetPixels); in onPageScrolled() 202 public void onPageSelected(int position) { in onPageSelected() argument 203 position = getRtlPosition(position); in onPageSelected() 205 if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { in onPageSelected() [all …]
|
/packages/experimental/LoaderApp/src/com/android/loaderapp/fragments/ |
D | ContactEntryAdapter.java | 108 int position = 0; in setSections() local 115 position += j; in setSections() 116 return position; in setSections() 119 position += sectionSize; in setSections() 143 public final boolean isEnabled(int position) { in isEnabled() argument 156 if (position == 0) { in isEnabled() 160 position -= sectionSize; in isEnabled() 168 public final Object getItem(int position) { in getItem() argument 169 return getEntry(mSections, position, mSeparators); in getItem() 180 int position, boolean separators) { in getEntry() argument [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/worldclock/ |
D | CitySelectionActivity.java | 312 public City getItem(int position) { in getItem() argument 314 final int itemViewType = getItemViewType(position); in getItem() 319 return mFilteredCities.get(position - 1); in getItem() 324 return mFilteredCities.get(position); in getItem() 328 public long getItemId(int position) { in getItemId() argument 329 return position; in getItemId() 333 public View getView(int position, View view, ViewGroup parent) { in getView() argument 334 final int itemViewType = getItemViewType(position); in getView() 343 final City city = getItem(position); in getView() 368 final boolean showIndex = getShowIndex(position); in getView() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
D | IndexerListAdapter.java | 42 private int position = ListView.INVALID_POSITION; field in IndexerListAdapter.Placement 48 position = ListView.INVALID_POSITION; in invalidate() 120 public int getSectionForPosition(int position) { in getSectionForPosition() argument 125 return mIndexer.getSectionForPosition(position); in getSectionForPosition() 162 int position = listPosition - listView.getHeaderViewsCount(); in configurePinnedHeaders() local 165 int partition = getPartitionForPosition(position); in configurePinnedHeaders() 167 int offset = getOffsetInPartition(position); in configurePinnedHeaders() 191 boolean isLastInSection = position == nextSectionPosition - 1; in configurePinnedHeaders() 205 private View getViewAtVisiblePosition(ListView list, int position) { in getViewAtVisiblePosition() argument 208 final int index = position - firstVisiblePosition; in getViewAtVisiblePosition() [all …]
|
D | HeaderEntryContactListAdapter.java | 58 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 59 if (position == 0 && getHeaderEntryCount() > 0) { in getView() 72 return super.getView(position - getHeaderEntryCount(), convertView, parent); in getView() 76 public Object getItem(int position) { in getItem() argument 77 return super.getItem(position - getHeaderEntryCount()); in getItem() 81 public boolean isEnabled(int position) { in isEnabled() argument 82 return position < getHeaderEntryCount() || super in isEnabled() 83 .isEnabled(position - getHeaderEntryCount()); in isEnabled() 87 public int getPartitionForPosition(int position) { in getPartitionForPosition() argument 88 return super.getPartitionForPosition(position - getHeaderEntryCount()); in getPartitionForPosition() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | EnterprisePrivacySettingsTest.java | 132 int position = 0; in verifyPreferenceControllers() local 133 assertThat(controllers.get(position++)).isInstanceOf(NetworkLogsPreferenceController.class); in verifyPreferenceControllers() 134 assertThat(controllers.get(position++)).isInstanceOf(BugReportsPreferenceController.class); in verifyPreferenceControllers() 135 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 137 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 139 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 141 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 143 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 145 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() 147 assertThat(controllers.get(position++)).isInstanceOf( in verifyPreferenceControllers() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | SlotView.java | 45 public void onScrollPositionChanged(int position, int total); in onScrollPositionChanged() argument 53 @Override public void onScrollPositionChanged(int position, int total) {} in onScrollPositionChanged() argument 112 int position = WIDE in setCenterIndex() local 115 setScrollPosition(position); in setCenterIndex() 126 int position = visibleBegin; in makeSlotVisible() local 128 position = visibleBegin; in makeSlotVisible() 130 position = slotBegin; in makeSlotVisible() 132 position = slotEnd - visibleLength; in makeSlotVisible() 135 setScrollPosition(position); in makeSlotVisible() 138 public void setScrollPosition(int position) { in setScrollPosition() argument [all …]
|
/packages/apps/ExactCalculator/src/com/android/calculator2/ |
D | HistoryAdapter.java | 68 public void onBindViewHolder(final HistoryAdapter.ViewHolder holder, int position) { in onBindViewHolder() argument 69 final HistoryItem item = getItem(position); in onBindViewHolder() 84 if (shouldShowHeader(position, item)) { in onBindViewHolder() 87 holder.mDivider.setVisibility(position == getItemCount() - 1 in onBindViewHolder() 113 public long getItemId(int position) { in getItemId() argument 114 return getItem(position).getEvaluatorIndex(); in getItemId() 118 public int getItemViewType(int position) { in getItemViewType() argument 119 return getItem(position).isEmptyView() ? EMPTY_VIEW_TYPE : HISTORY_VIEW_TYPE; in getItemViewType() 147 private int getEvaluatorIndex(int position) { in getEvaluatorIndex() argument 149 return (int) (mEvaluator.getMaxIndex() - position); in getEvaluatorIndex() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/ |
D | IngestActivity.java | 117 public void onItemClick(AdapterView<?> adapterView, View itemView, int position, 119 mLastCheckedPosition = position; 120 mGridView.setItemChecked(position, !mGridView.getCheckedItemPositions().get(position)); 134 public void onItemCheckedStateChanged(ActionMode mode, int position, long id, 139 if (mAdapter.itemAtPositionIsBucket(position)) { 142 mGridView.setItemChecked(position, false); 147 mAdapter.getSectionForPosition(position) + 1); 148 if (nextSectionStart == position) { 156 for (int i = position + 1; i < nextSectionStart; i++) { 164 for (int i = position + 1; i < nextSectionStart; i++) { [all …]
|