/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/androidTest/java/com/android/car/ui/recyclerview/ |
D | CarUiListItemTest.java | 100 List<CarUiListItem> items = new ArrayList<>(); in testItemVisibility_withTitle() local 104 items.add(item); in testItemVisibility_withTitle() 107 () -> mCarUiRecyclerView.setAdapter(new CarUiListItemAdapter(items))); in testItemVisibility_withTitle() 117 List<CarUiListItem> items = new ArrayList<>(); in testItemVisibility_withBody() local 121 items.add(item); in testItemVisibility_withBody() 124 () -> mCarUiRecyclerView.setAdapter(new CarUiListItemAdapter(items))); in testItemVisibility_withBody() 136 List<CarUiListItem> items = new ArrayList<>(); in testHeaderItemVisibility() local 141 items.add(item); in testHeaderItemVisibility() 145 items.add(item); in testHeaderItemVisibility() 148 () -> mCarUiRecyclerView.setAdapter(new CarUiListItemAdapter(items))); in testHeaderItemVisibility() [all …]
|
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/util/ |
D | LauncherLayoutBuilder.java | 74 l.items.put(ATTR_CONTAINER, CONTAINER_HOTSEAT); in atHotseat() 75 l.items.put(ATTR_RANK, Integer.toString(rank)); in atHotseat() 81 l.items.put(ATTR_CONTAINER, CONTAINER_DESKTOP); in atWorkspace() 82 l.items.put(ATTR_X, Integer.toString(x)); in atWorkspace() 83 l.items.put(ATTR_Y, Integer.toString(y)); in atWorkspace() 84 l.items.put(ATTR_SCREEN, Integer.toString(screen)); in atWorkspace() 129 final HashMap<String, Object> items = new HashMap<>(); field in LauncherLayoutBuilder.Location 132 items.put(ATTR_PACKAGE_NAME, packageName); in putApp() 133 items.put(ATTR_CLASS_NAME, TextUtils.isEmpty(className) ? packageName : className); in putApp() 134 mNodes.add(Pair.create(TAG_AUTO_INSTALL, items)); in putApp() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/ |
D | AppDataUsagePreferenceController.java | 71 List<AppItem> items = new ArrayList<>(); in onDataLoaded() local 81 long size = aggregateDataUsage(knownItems, items, entry, profiles); in onDataLoaded() 86 updateRestrictedState(restrictedUids, knownItems, items, profiles); in onDataLoaded() 87 sortAndAddPreferences(items, largest); in onDataLoaded() 90 private long aggregateDataUsage(SparseArray<AppItem> knownItems, List<AppItem> items, in aggregateDataUsage() argument 104 return accumulate(collapseKey, knownItems, entry, category, items); in aggregateDataUsage() 110 return accumulate(collapseKey, knownItems, entry, category, items); in aggregateDataUsage() 117 return accumulate(collapseKey, knownItems, entry, category, items); in aggregateDataUsage() 124 items); in aggregateDataUsage() 127 long appLargest = accumulate(collapseKey, knownItems, entry, category, items); in aggregateDataUsage() [all …]
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | ChannelsRowAdapter.java | 163 List<ChannelsRowItem> items = new ArrayList<>(); in createItems() local 164 items.add(ChannelsRowItem.GUIDE_ITEM); in createItems() 166 items.add(ChannelsRowItem.UP_ITEM); in createItems() 167 items.add(ChannelsRowItem.DOWN_ITEM); in createItems() 171 items.add(ChannelsRowItem.SETUP_ITEM); in createItems() 174 items.add(ChannelsRowItem.DVR_ITEM); in createItems() 179 items.add(ChannelsRowItem.APP_LINK_ITEM); in createItems() 182 items.add(new ChannelsRowItem(channel, R.layout.menu_card_channel)); in createItems() 184 setItemList(items); in createItems() 188 List<ChannelsRowItem> items = getItemList(); in updateItems() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/timezone/ |
D | BaseTimeZoneAdapterTest.java | 43 List<TestItem> items = new ArrayList<>(); in testFilter() local 44 items.add(US); in testFilter() 45 items.add(HK); in testFilter() 46 items.add(UK); in testFilter() 47 items.add(secretCountry); in testFilter() 49 TestTimeZoneAdapter adapter = new TestTimeZoneAdapter(items); in testFilter() 50 assertSearch(adapter, "", items.toArray(new TestItem[0])); in testFilter() 57 private void assertSearch(TestTimeZoneAdapter adapter , String searchText, TestItem... items) in assertSearch() argument 62 assertThat(adapter.getItemCount()).isEqualTo(items.length); in assertSearch() 63 for (int i = 0; i < items.length; i++) { in assertSearch() [all …]
|
/packages/apps/TV/src/com/android/tv/ui/sidepanel/ |
D | CustomizeChannelListFragment.java | 172 private void cleanUpOneChannelGroupItem(List<Item> items) { in cleanUpOneChannelGroupItem() argument 173 Iterator<Item> iter = items.iterator(); in cleanUpOneChannelGroupItem() 186 private void addItemForGroupBySource(List<Item> items) { in addItemForGroupBySource() argument 187 items.add(new GroupBySubMenu(getString(R.string.edit_channels_group_by_sources))); in addItemForGroupBySource() 198 items.add(new DividerItem(inputLabel)); in addItemForGroupBySource() 200 items.add(selectGroupItem); in addItemForGroupBySource() 203 items.add(channelItem); in addItemForGroupBySource() 206 cleanUpOneChannelGroupItem(items); in addItemForGroupBySource() 209 private void addItemForGroupByHdSd(List<Item> items) { in addItemForGroupByHdSd() argument 210 items.add(new GroupBySubMenu(getString(R.string.edit_channels_group_by_hd_sd))); in addItemForGroupByHdSd() [all …]
|
D | DeveloperOptionFragment.java | 63 ImmutableList.Builder<Item> items = ImmutableList.builder(); in getItemList() local 65 items.addAll( in getItemList() 69 items.add(new DividerItem()); in getItemList() 72 items.add( in getItemList() 81 items.add( in getItemList() 89 items.add( in getItemList() 107 items.add( in getItemList() 116 return items.build(); in getItemList()
|
D | SettingsFragment.java | 54 List<Item> items = new ArrayList<>(); in getItemList() local 80 items.add(customizeChannelListItem); in getItemList() 85 items.add( in getItemList() 98 items.add( in getItemList() 142 items.add( in getItemList() 169 items.add( in getItemList() 183 items.add( in getItemList() 199 items.add(version); in getItemList() 200 return items; in getItemList()
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | ItemAdapter.kt | 44 val position = items!!.indexOf(itemHolder) in onItemChanged() 52 val position = items!!.indexOf(itemHolder) in onItemChanged() 88 var items: MutableList<T>? = null variable in com.android.deskclock.ItemAdapter 133 val oldItemHolders = items in setItems() 171 items = itemHolders?.toMutableList() in setItems() 189 variablePosition = min(variablePosition, items!!.size) in addItem() 190 items!!.add(variablePosition, itemHolder) in addItem() 205 val index = items!!.indexOf(variableItemHolder) in removeItem() 207 variableItemHolder = items!!.removeAt(index) in removeItem() 221 override fun getItemCount(): Int = items?.size ?: 0 in getItemCount() [all …]
|
/packages/apps/Settings/src/com/android/settings/ |
D | AppWidgetLoader.java | 56 void putCustomAppWidgets(List<Item> items, Intent intent) { in putCustomAppWidgets() argument 106 putAppWidgetItems(customInfo, customExtras, items, 0, true); in putCustomAppWidgets() 115 List<Bundle> customExtras, List<Item> items, int categoryFilter, in putAppWidgetItems() argument 130 items.add(item); in putAppWidgetItems() 148 List<Item> items = new ArrayList<Item>(); in getItems() local 154 putInstalledAppWidgets(items, categoryFilter); in getItems() 158 putCustomAppWidgets(items, intent); in getItems() 160 Collections.sort(items, new Comparator<Item>() { in getItems() 170 items.addAll(customItems); in getItems() 172 return items; in getItems() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/ts/ |
D | TsParser.java | 83 void onPatDetected(List<PatItem> items); in onPatDetected() argument 89 void onEitItemParsed(VctItem channel, List<EitItem> items); in onEitItemParsed() argument 160 public void onPatParsed(List<PatItem> items) { 161 for (PatItem i : items) { 165 mListener.onPatDetected(items); 170 public void onPmtParsed(int programNumber, List<PmtItem> items) { 171 mProgramNumberToPMTMap.put(programNumber, items); 190 handleVctItem(vctItem, items); 202 handleSdtItem(sdtItem, items); 208 public void onMgtParsed(List<MgtItem> items) { [all …]
|
/packages/apps/Car/Media/src/com/android/car/media/browse/ |
D | LimitedBrowseAdapter.java | 72 @Nullable List<MediaItemMetadata> items) { in submitItems() argument 73 mBrowseAdapter.submitItems(parentItem, items); in submitItems() 75 if (items == null) { in submitItems() 88 List<BrowseViewData> items = mBrowseAdapter.getCurrentList(); in validateAnchor() local 89 for (int i = 0; i < items.size(); i++) { in validateAnchor() 90 MediaItemMetadata mediaItem = items.get(i).mMediaItem; in validateAnchor() 104 List<BrowseViewData> items = mBrowseAdapter.getCurrentList(); in computeAnchorIndexWhenRestricting() local 105 if (items.size() <= 0) { in computeAnchorIndexWhenRestricting() 111 if (0 <= anchorIndex && anchorIndex < items.size()) { in computeAnchorIndexWhenRestricting() 112 MediaItemMetadata mediaItem = items.get(anchorIndex).mMediaItem; in computeAnchorIndexWhenRestricting()
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarDebug.java | 82 List<Map<String, String>> items = new ArrayList<Map<String, String>>(); in doInBackground() local 89 addItem(items, mActivity.getString(R.string.calendar_info_error), ""); in doInBackground() 131 addItem(items, displayName, text); in doInBackground() 137 addItem(items, mActivity.getString(R.string.calendar_info_error), e.toString()); in doInBackground() 144 if (items.size() == 0) { in doInBackground() 145 addItem(items, mActivity.getString(R.string.calendar_info_no_calendars), ""); in doInBackground() 147 return items; in doInBackground() 158 protected void onPostExecute(List<Map<String, String>> items) { in onPostExecute() argument 160 ListAdapter adapter = new SimpleAdapter(mActivity, items, in onPostExecute() 186 protected void addItem(List<Map<String, String>> items, String title, String text) { in addItem() argument [all …]
|
/packages/modules/NeuralNetworks/runtime/test/fuzzing/ |
D | RandomGraphGeneratorUtils.h | 122 inline std::string joinStr(const std::string& joint, const std::vector<T>& items) { in joinStr() argument 124 for (uint32_t i = 0; i < items.size(); i++) { in joinStr() 126 ss << items[i]; in joinStr() 128 ss << joint << items[i]; in joinStr() 135 inline std::string joinStr(const std::string& joint, const std::vector<T>& items, Function str) { in joinStr() argument 137 for (uint32_t i = 0; i < items.size(); i++) { in joinStr() 139 ss << str(items[i]); in joinStr() 145 inline std::string joinStr(const std::string& joint, int limit, const std::vector<T>& items) { in joinStr() argument 146 if (items.size() > static_cast<size_t>(limit)) { in joinStr() 147 std::vector<T> topMax(items.begin(), items.begin() + limit); in joinStr() [all …]
|
/packages/apps/TvSettings/TwoPanelSettingsLib/src/com/android/tv/twopanelsettings/slices/ |
D | SlicePreferencesUtil.java | 299 List<SliceItem> items = sliceItem.getSlice().getItems(); in extract() local 300 for (int i = 0; i < items.size(); i++) { in extract() 301 final SliceItem item = items.get(i); in extract() 416 List<SliceItem> items = sliceItem.getSlice().getItems(); in isIconNeedsToBeProcessed() local 417 for (SliceItem item : items) { in isIconNeedsToBeProcessed() 427 List<SliceItem> items = sliceItem.getSlice().getItems(); in getButtonStyle() local 428 for (SliceItem item : items) { in getButtonStyle() 438 List<SliceItem> items = sliceItem.getSlice().getItems(); in getSeekbarMin() local 439 for (SliceItem item : items) { in getSeekbarMin() 449 List<SliceItem> items = sliceItem.getSlice().getItems(); in getSeekbarMax() local [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | BgDataModel.java | 176 public synchronized void removeItem(Context context, ItemInfo... items) { in removeItem() argument 177 removeItem(context, Arrays.asList(items)); in removeItem() 180 public synchronized void removeItem(Context context, Iterable<? extends ItemInfo> items) { in removeItem() argument 182 for (ItemInfo item : items) { in removeItem() 381 ArrayList<ItemInfo> items = new ArrayList<>(workspaceItems.size() + appWidgets.size()); in getAllWorkspaceItems() local 382 items.addAll(workspaceItems); in getAllWorkspaceItems() 383 items.addAll(appWidgets); in getAllWorkspaceItems() 384 return items; in getAllWorkspaceItems() 400 for (ItemInfo info : extraItems.valueAt(i).items) { in forAllWorkspaceItemInfos() 414 public final List<ItemInfo> items; field in BgDataModel.FixedContainerItems [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/common/ |
D | BaseFragment.java | 129 List<MenuItem> items = getToolbarMenuItems(); in onActivityCreated() local 130 if (items != null) { in onActivityCreated() 131 if (items.size() == 1) { in onActivityCreated() 132 items.get(0).setId(R.id.toolbar_menu_item_0); in onActivityCreated() 133 } else if (items.size() == 2) { in onActivityCreated() 134 items.get(0).setId(R.id.toolbar_menu_item_0); in onActivityCreated() 135 items.get(1).setId(R.id.toolbar_menu_item_1); in onActivityCreated() 139 toolbar.setMenuItems(items); in onActivityCreated()
|
/packages/apps/Launcher3/src/com/android/launcher3/widget/model/ |
D | WidgetsListHeaderEntry.java | 33 List<WidgetItem> items) { in WidgetsListHeaderEntry() argument 34 this(pkgItem, titleSectionName, items, /* isWidgetListShown= */ false); in WidgetsListHeaderEntry() 38 List<WidgetItem> items, boolean isWidgetListShown) { in WidgetsListHeaderEntry() argument 39 super(pkgItem, titleSectionName, items); in WidgetsListHeaderEntry() 40 widgetsCount = (int) items.stream().filter(item -> item.widgetInfo != null).count(); in WidgetsListHeaderEntry() 41 shortcutsCount = Math.max(0, items.size() - widgetsCount); in WidgetsListHeaderEntry()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/ |
D | RootItemListBuilder.java | 77 for (Collection<RootItem> items : mItems.asMap().values()) { in getList() 78 result.addAll(getRootItemForSelectedUser(items)); in getList() 83 private Collection<RootItem> getRootItemForSelectedUser(Collection<RootItem> items) { in getRootItemForSelectedUser() argument 84 RootItem testRootItem = items.iterator().next(); in getRootItemForSelectedUser() 87 return items; in getRootItemForSelectedUser() 92 for (RootItem item : items) { in getRootItemForSelectedUser()
|
/packages/providers/MediaProvider/src/com/android/providers/media/playlist/ |
D | PlsPlaylistPersister.java | 39 public void read(@NonNull InputStream in, @NonNull List<Path> items) throws IOException { in read() argument 59 items.add(res[i]); in read() 66 public void write(@NonNull OutputStream out, @NonNull List<Path> items) throws IOException { in write() argument 69 for (int i = 0; i < items.size(); i++) { in write() 70 writer.printf("File%d=%s\n", i + 1, items.get(i)); in write() 72 writer.printf("NumberOfEntries=%d\n", items.size()); in write()
|
/packages/apps/Settings/src/com/android/settings/utils/ |
D | LocaleUtils.java | 35 public static CharSequence getConcatenatedString(List<CharSequence> items) { in getConcatenatedString() argument 37 final CharSequence lastItem = items.get(items.size() - 1); in getConcatenatedString() 38 items.add("fake last item"); in getConcatenatedString() 44 final String formatted = listFormatter.format(items); in getConcatenatedString()
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/camerafocus/ |
D | PieRenderer.java | 77 private List<PieItem> items; field in PieRenderer 153 items = new ArrayList<PieItem>(); in init() 192 items.add(item); in addItem() 196 items.remove(item); in removeItem() 200 items.clear(); in clearItems() 233 for (PieItem item : items) { in show() 281 layoutItems(items, (float) (Math.PI / 2), inner, outer, gap); in layoutPie() 284 private void layoutItems(List<PieItem> items, float centerAngle, int inner, int outer, int gap) { in layoutItems() argument 286 float sweep = (PIE_SWEEP - 2 * emptyangle) / items.size(); in layoutItems() 291 for (PieItem item : items) { in layoutItems() [all …]
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestMenu.java | 38 private SparseArray<TestMenuItem> items = new SparseArray<>(); field in TestMenu 94 menu.items = new SparseArray<>(); in create() 108 items.put(id, item); in addMenuItem() 113 return items.get(id); in findItem() 118 return items.size(); in size() 123 return items.valueAt(index); in getItem()
|
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/browse/ |
D | MediaBrowserViewModelImpl.java | 51 @Nullable List<MediaItemMetadata> items) { in filterItems() argument 52 if (items == null) return null; in filterItems() 55 return items.stream().filter(predicate).collect(Collectors.toList()); in filterItems() 61 @Nullable List<MediaItemMetadata> items) { in selectBrowseableItems() 62 if (items == null) return null; in selectBrowseableItems() 64 return items.stream().filter(predicate).collect(Collectors.toList()); in selectBrowseableItems()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | TimeClustering.java | 119 ArrayList<SmallItem> items = new ArrayList<SmallItem>(total); in run() local 122 items.add(buf[i]); in run() 126 Collections.sort(items, sDateComparator); in run() 128 int n = items.size(); in run() 132 long t = items.get(i).dateInMs; in run() 145 compute(items.get(i)); in run() 164 ArrayList<SmallItem> items = mClusters.get(index).getItems(); in getCluster() local 165 ArrayList<Path> result = new ArrayList<Path>(items.size()); in getCluster() 166 for (int i = 0, n = items.size(); i < n; i++) { in getCluster() 167 result.add(items.get(i).path); in getCluster()
|