/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/connectivity/ |
D | NetworkListAdapter.java | 51 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 83 if (position < getCount()) { in getView() 84 vh.netId.setText("" + mNetworkList[position].mNetId); in getView() 85 vh.netType.setText(mNetworkList[position].mType); in getView() 86 vh.netState.setText(mNetworkList[position].mState); in getView() 87 vh.connected.setText(mNetworkList[position].mConnected); in getView() 88 vh.available.setText(mNetworkList[position].mAvailable); in getView() 89 vh.roaming.setText(mNetworkList[position].mRoaming); in getView() 90 vh.netIface.setText(mNetworkList[position].mInterfaceName); in getView() 91 vh.hwAddress.setText(mNetworkList[position].mHwAddress); in getView() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | BasePrivacySettingsPreferenceTest.java | 58 int position = 0; in verifyEnterprisePreferenceControllers() local 59 assertThat(controllers.get(position++)).isInstanceOf(NetworkLogsPreferenceController.class); in verifyEnterprisePreferenceControllers() 60 assertThat(controllers.get(position++)).isInstanceOf(BugReportsPreferenceController.class); in verifyEnterprisePreferenceControllers() 61 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 63 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 65 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 67 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 69 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 71 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() 73 assertThat(controllers.get(position++)).isInstanceOf( in verifyEnterprisePreferenceControllers() [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/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/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/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/modules/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 …]
|
/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/Dialer/java/com/android/dialer/app/calllog/ |
D | CallLogActivity.java | 171 public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { in onPageScrolled() argument 172 viewPagerTabs.onPageScrolled(position, positionOffset, positionOffsetPixels); in onPageScrolled() 176 public void onPageSelected(int position) { in onPageSelected() argument 177 updateMissedCalls(position); in onPageSelected() 178 selectedPageIndex = position; in onPageSelected() 182 viewPagerTabs.onPageSelected(position); in onPageSelected() 194 private int getRtlPosition(int position) { in getRtlPosition() argument 196 return viewPagerAdapter.getCount() - 1 - position; in getRtlPosition() 198 return position; in getRtlPosition() 201 private void updateMissedCalls(int position) { in updateMissedCalls() argument [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/apps/Dialer/java/com/android/dialer/voicemail/listui/ |
D | NewVoicemailAdapter.java | 240 public void onBindViewHolder(ViewHolder viewHolder, int position) { in onBindViewHolder() argument 241 LogUtil.enterBlock("NewVoicemailAdapter.onBindViewHolder, pos:" + position); in onBindViewHolder() 243 if (deletedVoicemailPosition.contains(position)) { in onBindViewHolder() 247 position, in onBindViewHolder() 252 onBindViewHolder(viewHolder, ++position); in onBindViewHolder() 263 "NewVoicemailAdapter.onBindViewHolder", "view holder at pos:%d is a header", position); in onBindViewHolder() 264 onBindHeaderViewHolder(viewHolder, position); in onBindViewHolder() 270 "NewVoicemailAdapter.onBindViewHolder", "view holder at pos:%d is a alert", position); in onBindViewHolder() 271 onBindAlertViewHolder(viewHolder, position); in onBindViewHolder() 278 position); in onBindViewHolder() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
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 …]
|
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 …]
|
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/ |
D | SearchCursorManager.java | 175 int getSearchAction(int position) { in getSearchAction() argument 176 return searchActions.get(position - getCount() + searchActions.size()); in getSearchAction() 200 int getRowType(int position) { in getRowType() argument 202 if (position >= cursorCount) { in getRowType() 204 String.format("Invalid position: %d, cursor count: %d", position, cursorCount)); in getRowType() 205 } else if (position >= cursorCount - searchActions.size()) { in getRowType() 209 SearchCursor cursor = getCursor(position); in getRowType() 234 SearchCursor getCursor(int position) { in getCursor() argument 236 if (position == 0) { in getCursor() 239 position--; in getCursor() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/app/list/ |
D | DialtactsPagerAdapter.java | 71 public long getItemId(int position) { in getItemId() argument 72 return getRtlPosition(position); in getItemId() 76 public Fragment getItem(int position) { in getItem() argument 77 LogUtil.d("ViewPagerAdapter.getItem", "position: %d", position); in getItem() 78 switch (getRtlPosition(position)) { in getItem() 104 throw Assert.createIllegalStateFailException("No fragment at position " + position); in getItem() 109 public Fragment instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 110 LogUtil.d("ViewPagerAdapter.instantiateItem", "position: %d", position); in instantiateItem() 114 final Fragment fragment = (Fragment) super.instantiateItem(container, position); in instantiateItem() 117 } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { in instantiateItem() [all …]
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | MenuLayoutManager.java | 174 int position = 0; in dumpChildren() local 182 + position++ in dumpChildren() 240 int position, MenuRowView view, List<Integer> rowsToAdd, List<Integer> rowsToRemove) { in isVisibleInLayout() argument 242 return (view.getVisibility() != View.GONE && !rowsToRemove.contains(position)) in isVisibleInLayout() 243 || rowsToAdd.contains(position); in isVisibleInLayout() 303 int position = mSelectedPosition + 1; in getViewLayouts() local 304 for (; position < count; ++position) { in getViewLayouts() 306 MenuRowView nextView = mMenuRowViews.get(position); in getViewLayouts() 307 if (isVisibleInLayout(position, nextView, rowsToAdd, rowsToRemove)) { in getViewLayouts() 341 for (++position; position < count; ++position) { in getViewLayouts() [all …]
|
/packages/apps/Settings/src/com/android/settings/localepicker/ |
D | LocaleLinearLayoutManager.java | 82 final int position = this.getPosition(host); in onInitializeAccessibilityNodeInfoForItem() local 89 (position + 1) + ", " + dragCell.getCheckbox().getContentDescription(); in onInitializeAccessibilityNodeInfoForItem() 99 if (position > 0) { // it is not the first one in onInitializeAccessibilityNodeInfoForItem() 103 if (position + 1 < itemCount) { // it is not the last one in onInitializeAccessibilityNodeInfoForItem() 117 final int position = this.getPosition(host); in performAccessibilityActionForItem() local 121 if (position > 0) { in performAccessibilityActionForItem() 122 mAdapter.onItemMove(position, position - 1); in performAccessibilityActionForItem() 126 if (position + 1 < itemCount) { in performAccessibilityActionForItem() 127 mAdapter.onItemMove(position, position + 1); in performAccessibilityActionForItem() 131 if (position != 0) { in performAccessibilityActionForItem() [all …]
|
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/toolbar/ |
D | TabLayout.java | 116 public void selectTab(int position) { in selectTab() argument 117 if (position < 0 || position > mTabs.size()) { in selectTab() 118 position = mTabs.isEmpty() ? -1 : 0; in selectTab() 120 if (position == mSelectedTab) { in selectTab() 125 mSelectedTab = position; in selectTab() 127 presentTabView(position); in selectTab() 129 if (position >= 0) { in selectTab() 130 com.android.car.ui.toolbar.Tab tab = mTabs.get(position); in selectTab() 148 private void presentTabView(int position) { in presentTabView() argument 149 if (position < 0 || position > mTabs.size()) { in presentTabView() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/group/ |
D | GroupMembersAdapter.java | 85 public Uri getContactUri(int position) { in getContactUri() argument 86 final Cursor cursor = (Cursor) getItem(position); in getContactUri() 93 public long getContactId(int position) { in getContactId() argument 94 final Cursor cursor = (Cursor) getItem(position); in getContactId() 133 public String getContactDisplayName(int position) { in getContactDisplayName() argument 134 return ((Cursor) getItem(position)).getString(GroupMembersQuery.CONTACT_DISPLAY_NAME); in getContactDisplayName() 139 int position, ViewGroup parent) { in newView() argument 141 super.newView(context, partition, cursor, position, parent); in newView() 147 protected void bindView(View v, int partition, Cursor cursor, int position) { in bindView() argument 148 super.bindView(v, partition, cursor, position); in bindView() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/worldclock/ |
D | CitySelectionActivity.kt | 273 override fun getItem(position: Int): City? { in getItem() 275 val itemViewType = getItemViewType(position) in getItem() 278 VIEW_TYPE_CITY -> return mFilteredCities[position - 1] in getItem() 283 return mFilteredCities[position] in getItem() 286 override fun getItemId(position: Int): Long { in getItemId() 287 return position.toLong() in getItemId() 290 override fun getView(position: Int, view: View?, parent: ViewGroup): View { in getView() 292 val itemViewType = getItemViewType(position) in getView() 299 val city = getItem(position) in getView() 322 val showIndex = getShowIndex(position) in getView() [all …]
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/terms/ |
D | TermsViewModel.java | 63 void setTermExpanded(int position, boolean expanded) { in setTermExpanded() argument 64 validateIndex(position); in setTermExpanded() 65 mTermsListExpandedStates.put(position, expanded); in setTermExpanded() 67 markTermRead(position); in setTermExpanded() 71 boolean isTermExpanded(int position) { in isTermExpanded() argument 72 validateIndex(position); in isTermExpanded() 73 return mTermsListExpandedStates.getOrDefault(position, /* defaultValue= */ false); in isTermExpanded() 80 private void markTermRead(int position) { in markTermRead() argument 81 mExpandedGroupsPosition.add(position); in markTermRead() 84 private void validateIndex(int position) { in validateIndex() argument [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/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 …]
|