/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListHeterogeneous.java | 39 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument 40 switch (position % 3) { in createView() 43 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 46 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 49 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 56 public View convertView(int position, View convertView, ViewGroup parent) { in convertView() argument 57 switch (position % 3) { in convertView() 59 return ListItemFactory.convertText(convertView, getValueAtPosition(position), position); in convertView() 61 return ListItemFactory.convertButton(convertView, getValueAtPosition(position), in convertView() 62 position); in convertView() [all …]
|
D | ListThrasher.java | 79 public Object getItem(int position) { in getItem() argument 80 return position; in getItem() 83 public long getItemId(int position) { in getItemId() argument 84 return position; in getItemId() 87 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 95 view.setText(mTitles[position] + " " + mVersion[position]); in getView() 101 int position = mRandomizer.nextInt(getCount()); in bumpVersion() local 102 mVersion[position]++; in bumpVersion() 124 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onItemSelected() argument 125 mText.setText("Position " + position); in onItemSelected()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | DividerSnapAlgorithm.java | 157 public SnapTarget calculateSnapTarget(int position, float velocity) { in calculateSnapTarget() argument 158 return calculateSnapTarget(position, velocity, true /* hardDismiss */); in calculateSnapTarget() 166 public SnapTarget calculateSnapTarget(int position, float velocity, boolean hardDismiss) { in calculateSnapTarget() argument 167 if (position < mFirstSplitTarget.position && velocity < -mMinDismissVelocityPxPerSecond) { in calculateSnapTarget() 170 if (position > mLastSplitTarget.position && velocity > mMinDismissVelocityPxPerSecond) { in calculateSnapTarget() 174 return snap(position, hardDismiss); in calculateSnapTarget() 183 public SnapTarget calculateNonDismissingSnapTarget(int position) { in calculateNonDismissingSnapTarget() argument 184 SnapTarget target = snap(position, false /* hardDismiss */); in calculateNonDismissingSnapTarget() 194 public float calculateDismissingFraction(int position) { in calculateDismissingFraction() argument 195 if (position < mFirstSplitTarget.position) { in calculateDismissingFraction() [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | ListScenario.java | 91 private boolean isItemAtPositionSelectable(int position) { in isItemAtPositionSelectable() argument 92 return !mUnselectableItems.contains(position); in isItemAtPositionSelectable() 163 int position, double itemScreenSizeFactor) { in setPositionScreenSizeFactorOverride() argument 164 mOverrideItemScreenSizeFactors.put(position, itemScreenSizeFactor); in setPositionScreenSizeFactorOverride() 173 public Params setPositionUnselectable(int position) { in setPositionUnselectable() argument 174 mUnselectableItems.add(position); in setPositionUnselectable() 288 protected void positionClicked(int position) { in positionClicked() argument 289 setClickedPosition(position); in positionClicked() 297 protected void positionLongClicked(int position) { in positionLongClicked() argument 298 setLongClickedPosition(position); in positionLongClicked() [all …]
|
D | GridScenario.java | 139 int position, double itemScreenSizeFactor) { in setPositionScreenSizeFactorOverride() argument 140 mOverrideItemScreenSizeFactors.put(position, itemScreenSizeFactor); in setPositionScreenSizeFactorOverride() 266 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onCreate() 267 positionSelected(position); in onCreate() 315 public final String getValueAtPosition(int position) { in getValueAtPosition() argument 316 return "postion " + position; in getValueAtPosition() 328 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument 331 result.setText(getValueAtPosition(position)); in createView() 336 result.setId(position); in createView() 348 public Object getItem(int position) { in getItem() argument [all …]
|
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/ |
D | AddPrinterActivity.java | 262 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument 263 ((ActionAdapter) getListAdapter()).performAction(position); in onItemClick() 275 abstract void performAction(@IntRange(from = 0) int position); in performAction() 334 private @NonNull Pair<ActionAdapter, Integer> getSubAdapter(int position) { in getSubAdapter() argument 339 if (position < adapter.getCount()) { in getSubAdapter() 340 return new Pair<>(adapter, position); in getSubAdapter() 342 position -= adapter.getCount(); in getSubAdapter() 350 public int getItemViewType(int position) { in getItemViewType() argument 357 if (position < adapter.getCount()) { in getItemViewType() 358 return numLowerViewTypes + adapter.getItemViewType(position); in getItemViewType() [all …]
|
/frameworks/ex/common/java/com/android/common/widget/ |
D | CompositeCursorAdapter.java | 242 public int getPartitionForPosition(int position) { in getPartitionForPosition() argument 247 if (position >= start && position < end) { in getPartitionForPosition() 259 public int getOffsetInPartition(int position) { in getOffsetInPartition() argument 264 if (position >= start && position < end) { in getOffsetInPartition() 265 int offset = position - start; in getOffsetInPartition() 281 int position = 0; in getPositionForPartition() local 283 position += mPartitions.get(i).count; in getPositionForPartition() 285 return position; in getPositionForPartition() 306 protected int getItemViewType(int partition, int position) { in getItemViewType() argument 311 public int getItemViewType(int position) { in getItemViewType() argument [all …]
|
D | GroupingListAdapter.java | 268 public void obtainPositionMetadata(PositionMetadata metadata, int position) { in obtainPositionMetadata() argument 271 if (metadata.listPosition == position) { in obtainPositionMetadata() 284 if (position <= mLastCachedListPosition) { in obtainPositionMetadata() 287 int index = mPositionCache.indexOfKey(position); in obtainPositionMetadata() 340 if (position < listPosition) { in obtainPositionMetadata() 342 metadata.cursorPosition = cursorPosition - (listPosition - position); in obtainPositionMetadata() 350 if (position == listPosition) { in obtainPositionMetadata() 361 if (position < listPosition + size + 1) { in obtainPositionMetadata() 363 metadata.cursorPosition = cursorPosition + (position - listPosition) - 1; in obtainPositionMetadata() 381 metadata.cursorPosition = cursorPosition + (position - listPosition); in obtainPositionMetadata() [all …]
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/adapters/ |
D | BaseCursorPagerAdapter.java | 67 public abstract Fragment getItem(Context context, Cursor cursor, int position); in getItem() argument 72 public Fragment getItem(int position) { in getItem() argument 73 if (mCursor != null && moveCursorTo(position)) { in getItem() 74 return getItem(mContext, mCursor, position); in getItem() 89 public Object instantiateItem(View container, int position) { in instantiateItem() argument 95 if (moveCursorTo(position)) { in instantiateItem() 102 final Object obj = super.instantiateItem(container, position); in instantiateItem() 110 public void destroyItem(View container, int position, Object object) { in destroyItem() argument 113 super.destroyItem(container, position, object); in destroyItem() 123 final int position = mItemPosition.get(rowId, POSITION_NONE); in getItemPosition() local [all …]
|
/frameworks/base/core/java/android/widget/ |
D | DropDownListView.java | 134 final int position = pointToPosition((int) ev.getX(), (int) ev.getY()); in onHoverEvent() local 135 if (position != INVALID_POSITION && position != mSelectedPosition) { in onHoverEvent() 136 final View hoveredItem = getChildAt(position - getFirstVisiblePosition()); in onHoverEvent() 142 positionSelector(position, hoveredItem); in onHoverEvent() 143 setSelectedPositionInt(position); in onHoverEvent() 144 setNextSelectedPositionInt(position); in onHoverEvent() 194 final int position = pointToPosition(x, y); in onForwardedEvent() local 195 if (position == INVALID_POSITION) { in onForwardedEvent() 200 final View child = getChildAt(position - getFirstVisiblePosition()); in onForwardedEvent() 201 setPressedItem(child, position, x, y); in onForwardedEvent() [all …]
|
D | YearPickerView.java | 61 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in YearPickerView() 62 final int year = mAdapter.getYearForPosition(position); in YearPickerView() 90 final int position = mAdapter.getPositionForYear(year); in setYear() 91 if (position >= 0 && position < getCount()) { in setYear() 92 setSelectionCentered(position); in setYear() 98 public void setSelectionCentered(int position) { in setSelectionCentered() argument 100 setSelectionFromTop(position, offset); in setSelectionCentered() 150 public Integer getItem(int position) { in getItem() argument 151 return getYearForPosition(position); in getItem() 155 public long getItemId(int position) { in getItemId() argument [all …]
|
D | HeaderViewListAdapter.java | 150 public boolean isEnabled(int position) { in isEnabled() argument 153 if (position < numHeaders) { in isEnabled() 154 return mHeaderViewInfos.get(position).isSelectable; in isEnabled() 158 final int adjPosition = position - numHeaders; in isEnabled() 171 public Object getItem(int position) { in getItem() argument 174 if (position < numHeaders) { in getItem() 175 return mHeaderViewInfos.get(position).data; in getItem() 179 final int adjPosition = position - numHeaders; in getItem() 192 public long getItemId(int position) { in getItemId() argument 194 if (mAdapter != null && position >= numHeaders) { in getItemId() [all …]
|
D | AbsSpinner.java | 133 int position = mItemCount > 0 ? 0 : INVALID_POSITION; in setAdapter() local 135 setSelectedPositionInt(position); in setAdapter() 136 setNextSelectedPositionInt(position); in setAdapter() 268 final int position = mFirstPosition; in recycleAllViews() local 273 int index = position + i; in recycleAllViews() 281 public void setSelection(int position, boolean animate) { in setSelection() argument 283 boolean shouldAnimate = animate && mFirstPosition <= position && in setSelection() 284 position <= mFirstPosition + getChildCount() - 1; in setSelection() 285 setSelectionInt(position, shouldAnimate); in setSelection() 289 public void setSelection(int position) { in setSelection() argument [all …]
|
D | RemoteViewsAdapter.java | 297 for (int position : visibleWindow) { in handleMessage() 301 if (position < newCount) { in handleMessage() 302 adapter.updateRemoteViews(mRemoteViewsFactory, position, false); in handleMessage() 319 final int position = adapter.mCache.getNextIndexToLoad(); in handleMessage() local 320 if (position > -1) { in handleMessage() 322 adapter.updateRemoteViews(mRemoteViewsFactory, position, true); in handleMessage() 430 public void add(int position, RemoteViewsFrameLayout layout) { in add() argument 431 LinkedList<RemoteViewsFrameLayout> refs = get(position); in add() 436 put(position, refs); in add() 440 layout.cacheIndex = position; in add() [all …]
|
D | DayPickerPagerAdapter.java | 112 final int position = getPositionForDay(day); in getBoundsForDate() local 113 final ViewHolder monthView = mItems.get(position, null); in getBoundsForDate() 204 private int getMonthForPosition(int position) { in getMonthForPosition() argument 205 return (position + mMinDate.get(Calendar.MONTH)) % MONTHS_IN_YEAR; in getMonthForPosition() 208 private int getYearForPosition(int position) { in getYearForPosition() argument 209 final int yearOffset = (position + mMinDate.get(Calendar.MONTH)) / MONTHS_IN_YEAR; in getYearForPosition() 220 final int position = yearOffset * MONTHS_IN_YEAR + monthOffset; in getPositionForDay() local 221 return position; in getPositionForDay() 225 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 248 final int month = getMonthForPosition(position); in instantiateItem() [all …]
|
/frameworks/base/core/java/android/preference/ |
D | PreferenceGroupAdapter.java | 220 public Preference getItem(int position) { in getItem() argument 221 if (position < 0 || position >= getCount()) return null; in getItem() 222 return mPreferenceList.get(position); in getItem() 225 public long getItemId(int position) { in getItemId() argument 226 if (position < 0 || position >= getCount()) return ListView.INVALID_ROW_ID; in getItemId() 227 return this.getItem(position).getId(); in getItemId() 233 public void setHighlighted(int position) { in setHighlighted() argument 234 mHighlightedPosition = position; in setHighlighted() 244 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 245 final Preference preference = this.getItem(position); in getView() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | FrameParser.java | 90 data.position(data.position() + ETHERNET_SRC_MAC_ADDR_LEN + ETHERNET_DST_MAC_ADDR_LEN); in parseEthernetFrame() 136 data.position(data.position() + IP_V4_DSCP_AND_ECN_LEN + IP_V4_TOTAL_LEN_LEN in parseIpv4Packet() 139 data.position(data.position() + IP_V4_HEADER_CHECKSUM_LEN + IP_V4_SRC_ADDR_LEN in parseIpv4Packet() 144 data.position(data.position() + headerLen); in parseIpv4Packet() 179 data.position(data.position() + TCP_SRC_PORT_LEN); in parseTcpPacket() 200 data.position(data.position() + UDP_CHECKSUM_LEN); in parseUdpPacket() 229 data.position(data.position() + BOOTP_OPCODE_LEN + BOOTP_HWTYPE_LEN + BOOTP_HWADDR_LEN_LEN in parseDhcpPacket() 251 data.position(data.position() + dhcpOptionLen); in parseDhcpPacket() 324 data.position(data.position() + ARP_HWTYPE_LEN + ARP_PROTOTYPE_LEN + ARP_HWADDR_LEN_LEN in parseArpPacket() 354 data.position(data.position() + IP_V6_PAYLOAD_LENGTH_LEN); in parseIpv6Packet() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | PagerAdapter.java | 109 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 110 return instantiateItem((View) container, position); in instantiateItem() 123 public void destroyItem(ViewGroup container, int position, Object object) { in destroyItem() argument 124 destroyItem((View) container, position, object); in destroyItem() local 136 public void setPrimaryItem(ViewGroup container, int position, Object object) { in setPrimaryItem() argument 137 setPrimaryItem((View) container, position, object); in setPrimaryItem() local 174 public Object instantiateItem(View container, int position) { in instantiateItem() argument 191 public void destroyItem(View container, int position, Object object) { in destroyItem() argument 206 public void setPrimaryItem(View container, int position, Object object) { in setPrimaryItem() argument 306 public CharSequence getPageTitle(int position) { in getPageTitle() argument [all …]
|
D | AdapterHelper.java | 137 for (int position = op.positionStart; position < tmpEnd; position++) { in applyRemove() 139 RecyclerView.ViewHolder vh = mCallback.findViewHolder(position); in applyRemove() 140 if (vh != null || canFindInPreLayout(position)) { in applyRemove() 168 position -= tmpCount; // also equal to tmpStart in applyRemove() 191 for (int position = op.positionStart; position < tmpEnd; position++) { in applyUpdate() 192 RecyclerView.ViewHolder vh = mCallback.findViewHolder(position); in applyUpdate() 193 if (vh != null || canFindInPreLayout(position)) { // deferred in applyUpdate() 199 tmpStart = position; in applyUpdate() 208 tmpStart = position; in applyUpdate() 409 private boolean canFindInPreLayout(int position) { in canFindInPreLayout() argument [all …]
|
D | WatchHeaderListView.java | 151 public boolean isEnabled(int position) { in isEnabled() argument 153 return position < topPanelCount ? false : super.isEnabled(position - topPanelCount); in isEnabled() 157 public Object getItem(int position) { in getItem() argument 159 return position < topPanelCount ? null : super.getItem(position - topPanelCount); in getItem() 163 public long getItemId(int position) { in getItemId() argument 165 if (getWrappedAdapter() != null && position >= numHeaders) { in getItemId() 166 int adjPosition = position - numHeaders; in getItemId() 176 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 178 return position < topPanelCount in getView() 179 ? mTopPanel : super.getView(position - topPanelCount, convertView, parent); in getView() [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/items/ |
D | AbstractItemHierarchy.java | 76 public void notifyItemRangeChanged(int position, int itemCount) { in notifyItemRangeChanged() argument 77 if (position < 0) { in notifyItemRangeChanged() 78 Log.w(TAG, "notifyItemRangeChanged: Invalid position=" + position); in notifyItemRangeChanged() 87 observer.onItemRangeChanged(this, position, itemCount); in notifyItemRangeChanged() 92 public void notifyItemRangeInserted(int position, int itemCount) { in notifyItemRangeInserted() argument 93 if (position < 0) { in notifyItemRangeInserted() 94 Log.w(TAG, "notifyItemRangeInserted: Invalid position=" + position); in notifyItemRangeInserted() 103 observer.onItemRangeInserted(this, position, itemCount); in notifyItemRangeInserted() 128 public void notifyItemRangeRemoved(int position, int itemCount) { in notifyItemRangeRemoved() argument 129 if (position < 0) { in notifyItemRangeRemoved() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/clock/ |
D | SmallClockPositionTest.kt | 36 private lateinit var position: SmallClockPosition variable in com.android.keyguard.clock.SmallClockPositionTest 40 position = SmallClockPosition(statusBarHeight, lockPadding, lockHeight, burnInY) in setUp() 46 position = SmallClockPosition(context.resources) in loadResources() 47 position.setDarkAmount(1f) in loadResources() 48 assertThat(position.preferredY).isGreaterThan(0) in loadResources() 54 position.setDarkAmount(1f) in darkPosition() 56 assertThat(position.preferredY).isEqualTo(185) in darkPosition() 62 position.setDarkAmount(0f) in lockPosition() 65 assertThat(position.preferredY).isEqualTo(165) in lockPosition()
|
/frameworks/av/media/libaaudio/tests/ |
D | test_clock_model.cpp | 98 int64_t position = model.convertDeltaTimeToPosition(NANOS_PER_SECOND); in TEST_F() local 99 ASSERT_EQ(SAMPLE_RATE, position); in TEST_F() 104 position = model.convertDeltaTimeToPosition(NANOS_PER_SECOND + (kNanosPerBurst / 2)); in TEST_F() 105 ASSERT_EQ(SAMPLE_RATE + (HW_FRAMES_PER_BURST / 2), position); in TEST_F() 120 int64_t position = model.convertTimeToPosition(startTime); in TEST_F() local 121 EXPECT_EQ(0, position); in TEST_F() 123 int64_t time = model.convertPositionToTime(position); in TEST_F() 127 position = model.convertTimeToPosition(time); in TEST_F() 128 EXPECT_EQ(0, position); in TEST_F() 136 const int64_t position = HW_FRAMES_PER_BURST; // hardware in TEST_F() local [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/stackdivider/ |
D | DividerView.java | 384 calculateBoundsForPosition(mSnapTargetBeforeMinimized.position, in getNonMinimizedSplitScreenSecondaryBounds() 423 public void stopDragging(int position, float velocity, boolean avoidDismissStart, in stopDragging() argument 426 fling(position, velocity, avoidDismissStart, logMetrics); in stopDragging() 431 public void stopDragging(int position, SnapTarget target, long duration, in stopDragging() argument 433 stopDragging(position, target, duration, 0 /* startDelay*/, 0 /* endDelay */, interpolator); in stopDragging() 436 public void stopDragging(int position, SnapTarget target, long duration, in stopDragging() argument 438 stopDragging(position, target, duration, 0 /* startDelay*/, endDelay, interpolator); in stopDragging() 441 public void stopDragging(int position, SnapTarget target, long duration, long startDelay, in stopDragging() argument 444 flingTo(position, target, duration, startDelay, endDelay, interpolator); in stopDragging() 535 int position = calculatePosition(x, y); in onTouch() local [all …]
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
D | MenuAdapter.java | 65 public MenuItemImpl getItem(int position) { in getItem() argument 68 if (mExpandedIndex >= 0 && position >= mExpandedIndex) { in getItem() 69 position++; in getItem() 71 return items.get(position); in getItem() 74 public long getItemId(int position) { in getItemId() argument 77 return position; in getItemId() 80 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 85 final int currGroupId = getItem(position).getGroupId(); in getView() 87 position - 1 >= 0 ? getItem(position - 1).getGroupId() : currGroupId; in getView() 97 itemView.initialize(getItem(position), 0); in getView()
|