Home
last modified time | relevance | path

Searched refs:Item (Results 1 – 25 of 126) sorted by relevance

123456

/packages/modules/Bluetooth/system/gd/common/
Dsync_map_count.h26 struct Item { struct
36 std::vector<Item> Vectorize() const { in Vectorize() argument
37 std::vector<Item> vec; in Vectorize()
39 vec.push_back(Item{it.first, it.second}); in Vectorize()
44 std::vector<Item> GetSorted(std::function<bool(const Item& a, const Item& b)> sort_func) const { in GetSorted()
45 std::vector<Item> vec = Vectorize(); in GetSorted()
46 …sort(vec.begin(), vec.end(), [=](const Item& a, const Item& b) -> bool { return sort_func(a, b); }… in GetSorted()
76 std::vector<Item> GetSortedHighToLow() const { in GetSortedHighToLow()
77 return GetSorted([](const Item& a, const Item& b) -> bool { return a.count > b.count; }); in GetSortedHighToLow()
80 std::vector<Item> GetSortedLowToHigh() const { in GetSortedLowToHigh()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DSelectionTest.java30 import com.android.providers.media.photopicker.data.model.Item;
53 final Item item = generateFakeImageItem(id); in testAddSelectedItem()
57 final Item selectedItem = mSelection.getSelectedItems().get(0); in testAddSelectedItem()
69 final Item item1 = generateFakeImageItem("1"); in testAddSelectedItem_orderedSelection()
70 final Item item2 = generateFakeImageItem("2"); in testAddSelectedItem_orderedSelection()
84 final Item item = generateFakeImageItem(id); in testDeleteSelectedItem()
99 final Item item1 = generateFakeImageItem("1"); in testDeleteSelectedItem_orderedSelection()
100 final Item item2 = generateFakeImageItem("2"); in testDeleteSelectedItem_orderedSelection()
101 final Item item3 = generateFakeImageItem("3"); in testDeleteSelectedItem_orderedSelection()
128 final Item item1 = generateFakeImageItem("1"); in testGetSelectedItems_orderedSelection()
[all …]
DPickerResultTest.java41 import com.android.providers.media.photopicker.data.model.Item;
69 List<Item> items = null; in testGetResultSingle()
93 List<Item> items = null; in testGetResultSingleForActionGetContent()
121 ArrayList<Item> items = null; in testGetResultMultiple()
126 for (Item item : items) { in testGetResultMultiple()
148 ArrayList<Item> items = null; in testGetResultMultipleForActionGetContent()
153 for (Item item : items) { in testGetResultMultipleForActionGetContent()
179 ArrayList<Item> items = null; in testGetResultMultiple_onlyOneItemSelected()
212 private ArrayList<Item> createItemSelection(int count) throws Exception { in createItemSelection()
213 ArrayList<Item> selectedItemList = new ArrayList<>(); in createItemSelection()
[all …]
/packages/apps/Settings/src/com/android/settings/
DAppWidgetLoader.java33 public class AppWidgetLoader<Item extends AppWidgetLoader.LabelledItem> {
39 ItemConstructor<Item> mItemConstructor;
46 ItemConstructor<Item> itemConstructor) { in AppWidgetLoader()
56 void putCustomAppWidgets(List<Item> items, Intent intent) { in putCustomAppWidgets()
115 List<Bundle> customExtras, List<Item> items, int categoryFilter, in putAppWidgetItems()
127 Item item = mItemConstructor.createItem(mContext, info, in putAppWidgetItems()
134 public interface ItemConstructor<Item> {
135 Item createItem(Context context, AppWidgetProviderInfo info, Bundle extras); in createItem()
144 protected List<Item> getItems(Intent intent) { in getItems()
148 List<Item> items = new ArrayList<Item>(); in getItems()
[all …]
DAppWidgetPickActivity.java47 implements AppWidgetLoader.ItemConstructor<PickAdapter.Item>{
51 List<PickAdapter.Item> mItems;
58 private AppWidgetLoader<PickAdapter.Item> mAppWidgetLoader;
66 mAppWidgetLoader = new AppWidgetLoader<PickAdapter.Item> in onCreate()
90 protected List<PickAdapter.Item> getItems() { in getItems()
96 public PickAdapter.Item createItem(Context context, AppWidgetProviderInfo info, Bundle extras) { in createItem()
134 PickAdapter.Item item = new PickAdapter.Item(context, label, icon); in createItem()
147 PickAdapter.Item item = mItems.get(which); in onClick()
DActivityPicker.java107 List<PickAdapter.Item> items = getItems(); in onCreate()
137 PickAdapter.Item item = (PickAdapter.Item) mAdapter.getItem(position); in getIntentForPosition()
148 protected List<PickAdapter.Item> getItems() { in getItems()
150 List<PickAdapter.Item> items = new ArrayList<PickAdapter.Item>(); in getItems()
175 items.add(new PickAdapter.Item(this, label, icon)); in getItems()
190 protected void putIntentItems(Intent baseIntent, List<PickAdapter.Item> items) { in putIntentItems()
199 items.add(new PickAdapter.Item(this, packageManager, resolveInfo)); in putIntentItems()
212 public static class Item implements AppWidgetLoader.LabelledItem { class in ActivityPicker.PickAdapter
233 Item(Context context, CharSequence label, Drawable icon) { in Item() method in ActivityPicker.PickAdapter.Item
242 Item(Context context, PackageManager pm, ResolveInfo resolveInfo) { in Item() method in ActivityPicker.PickAdapter.Item
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DSelection.java29 import com.android.providers.media.photopicker.data.model.Item;
54 private final Map<Item, Integer> mCheckedItemIndexes = new HashMap<>();
57 private Map<Uri, Item> mSelectedItems = new LinkedHashMap<>();
63 private List<Item> mSelectedItemsForPreview = new ArrayList<>();
73 private Map<Uri, Item> mItemGrantRevocationMap = new HashMap<>();
80 public List<Item> getSelectedItems() { in getSelectedItems()
81 ArrayList<Item> result = new ArrayList<>(mSelectedItems.values()); in getSelectedItems()
89 return mSelectedItems.values().stream().map(Item::getContentUri).collect( in getSelectedItemsUris()
126 public Set<Item> getDeselectedItemsToBeRevoked() { in getDeselectedItemsToBeRevoked()
140 public List<Item> getNewlySelectedItems() { in getNewlySelectedItems()
[all …]
DPickerResult.java26 import com.android.providers.media.photopicker.data.model.Item;
44 @NonNull List<Item> selectedItems) { in getPickerResponseIntent()
62 new ClipData.Item(selectedUris.get(0))); in getPickerResponseIntent()
64 clipData.addItem(new ClipData.Item(selectedUris.get(i))); in getPickerResponseIntent()
87 public static List<Uri> getPickerUrisForItems(String action, @NonNull List<Item> items) { in getPickerUrisForItems()
89 for (Item item : items) { in getPickerUrisForItems()
/packages/modules/Virtualization/libs/libfdt/src/
Diterators.rs42 type Item = FdtNode<'a>; typedef
44 fn next(&mut self) -> Option<Self::Item> { in next() argument
63 const CHUNK_SIZE: usize = size_of::<<CellIterator as Iterator>::Item>(); in new()
70 type Item = u32; typedef
72 fn next(&mut self) -> Option<Self::Item> { in next() argument
73 Some(Self::Item::from_be_bytes(self.chunks.next()?.try_into().ok()?)) in next()
122 type Item = Reg<u64>; typedef
124 fn next(&mut self) -> Option<Self::Item> { in next() argument
133 Some(Self::Item { addr, size }) in next()
165 type Item = Range<usize>; typedef
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/
DUserItemsCombiner.java51 private List<Item> mRootList;
52 private List<Item> mRootListOtherUser;
53 private List<List<Item>> mRootListAllUsers;
68 UserItemsCombiner setRootListForCurrentUser(List<Item> rootList) { in setRootListForCurrentUser()
73 UserItemsCombiner setRootListForOtherUser(List<Item> rootList) { in setRootListForOtherUser()
78 UserItemsCombiner setRootListForAllUsers(List<List<Item>> listOfRootLists) { in setRootListForAllUsers()
87 public List<Item> createPresentableList() { in createPresentableList()
91 final List<Item> result = new ArrayList<>(); in createPresentableList()
95 final List<Item> personalRootList; in createPresentableList()
96 final List<Item> workRootList; in createPresentableList()
[all …]
DRootsFragment.java107 final Item item = mAdapter.getItem(position);
117 final Item item = mAdapter.getItem(position);
133 private List<Item> mApplicationItemList;
201 final Item item = mAdapter.getItem(pos); in onRightClick()
235 final Item item = getItem(v); in onActivityCreated()
296 List<Item> sortedItems = sortLoadResult( in onActivityCreated()
390 List<Item> sortLoadResult( in sortLoadResult()
401 final List<Item> result = new ArrayList<>(); in sortLoadResult()
444 final List<Item> rootList = new ArrayList<>(); in sortLoadResult()
445 final List<Item> rootListOtherUser = new ArrayList<>(); in sortLoadResult()
[all …]
/packages/modules/IntentResolver/java/src/com/android/intentresolver/contentpreview/payloadtoggle/domain/intent/
DTargetIntentModifier.kt34 fun interface TargetIntentModifier<Item> { in <lambda>()
35 fun intentFromSelection(selection: Collection<Item>): Intent in <lambda>()
38 class TargetIntentModifierImpl<Item>(
40 private val getUri: Item.() -> Uri,
41 private val getMimeType: Item.() -> String?,
42 ) : TargetIntentModifier<Item> {
43 override fun intentFromSelection(selection: Collection<Item>): Intent { in intentFromSelection()
46 selection.fold(null) { target: String?, item: Item -> in intentFromSelection()
60 ClipData("", arrayOf(targetMimeType), ClipData.Item(uris[0])).also { in intentFromSelection()
62 it.addItem(ClipData.Item(uris[i])) in intentFromSelection()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/ui/
DPhotosTabAdapterTest.java33 import com.android.providers.media.photopicker.data.model.Item;
52 final List<Item> mediaItems = generateFakeImageItemList(1); in test_hasRecentItem()
53 final Item mediaItem = mediaItems.get(0); in test_hasRecentItem()
68 assertThat(secondAdapterItem).isInstanceOf(Item.class); in test_hasRecentItem()
69 assertThat(((Item) secondAdapterItem).getId()) in test_hasRecentItem()
78 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in test_exceedMinCount_notSameDay_hasRecentItemAndOneDateItem()
106 final List<Item> mediaItems = generateFakeImageItemList(12); in test_exceedMinCount_sameDay_hasRecentItemNoDateItem()
111 final Item lastItem = generateJpegItem(lastItemId, dateTakenMs, /* generationModified */ 1); in test_exceedMinCount_sameDay_hasRecentItemNoDateItem()
132 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in test_noRecentSection()
163 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in testGetCategoryItems_dataIsUpdated()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/
DUserItemsCombinerTest.java60 private static final List<Item> PERSONAL_ITEMS = Lists.newArrayList(
66 private static final List<Item> WORK_ITEMS = Lists.newArrayList(
70 private static final List<Item> PRIVATE_ITEMS = Lists.newArrayList(
74 private static final Correspondence<Item, Item> ITEM_CORRESPONDENCE =
75 Correspondence.from((Item actual, Item expected) -> {
121 final List<List<Item>> rootListAllUsers = new ArrayList<>(); in testCreatePresentableListForAllUsers_empty()
158 final List<List<Item>> rootListAllUsers = new ArrayList<>(); in testCreatePresentableListForAllUsers_currentIsPersonal_personalItemsOnly()
174 final List<List<Item>> rootListAllUsers = new ArrayList<>(); in testCreatePresentableListForAllUsers_currentIsWork_personalItemsOnly()
192 final List<List<Item>> rootListAllUsers = new ArrayList<>(); in testCreatePresentableListForAllUsers_currentIsPrivate_personalItemsOnly()
230 final List<List<Item>> rootListAllUsers = new ArrayList<>(); in testCreatePresentableListForAllUsers_currentIsPersonal_workItemsOnly()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DLauncherPrefs.kt49 private val Item.encryptedPrefs in <lambda>() constant
52 private fun chooseSharedPreferences(item: Item): SharedPreferences = in <lambda>()
69 private fun <T> getInner(item: Item, default: T): T { in <lambda>()
100 fun put(vararg itemsToValues: Pair<Item, Any>): Unit = in <lambda>()
104 fun <T : Any> put(item: Item, value: T): Unit = put(item.to(value)) in <lambda>()
110 fun putSync(vararg itemsToValues: Pair<Item, Any>): Unit = in <lambda>()
124 updates: Array<out Pair<Item, Any>> in <lambda>()
140 prefToItemValueList.value.forEach { itemToValue: Pair<Item, Any> -> in <lambda>()
154 item: Item, in <lambda>()
179 fun addListener(listener: OnSharedPreferenceChangeListener, vararg items: Item) { in <lambda>()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/ui/
DPreviewAdapter.java27 import com.android.providers.media.photopicker.data.model.Item;
41 private List<Item> mItemList = new ArrayList<>();
67 final Item item = getItem(position); in onBindViewHolder()
78 final Item item = (Item) holder.itemView.getTag(); in onViewAttachedToWindow()
101 final Item item = (Item) itemView.getTag(); in onHandlePageSelected()
113 Item getItem(int position) { in getItem()
117 void updateItemList(List<Item> itemList) { in updateItemList()
DViewPager2Wrapper.java29 import com.android.providers.media.photopicker.data.model.Item;
46 ViewPager2Wrapper(ViewPager2 viewPager, List<Item> selectedItems, MuteStatus muteStatus, in ViewPager2Wrapper()
65 void updateList(List<Item> selectedItems) { in updateList()
78 public Item getItemAt(int position) { in getItemAt()
82 public Item getCurrentItem() { in getCurrentItem()
86 private Item getItemAtInternal(int position) { in getItemAtInternal()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/model/
DItemTest.java68 final Item item = new Item(cursor, UserId.CURRENT_USER); in testConstructor()
96 final Item item = new Item(cursor, userId); in testConstructor_differentUser()
120 final Item item = generateItem(id, mimeType, dateTaken, generationModified, duration); in testIsImage()
136 final Item item = generateItem(id, mimeType, dateTaken, generationModified, duration); in testIsVideo()
152 final Item item = generateSpecialFormatItem(id, mimeType, dateTaken, generationModified, in testIsMotionPhoto()
169 final Item gifItem = generateSpecialFormatItem(id, mimeType, dateTaken, generationModified, in testIsGifOrAnimatedWebp()
179 final Item animatedWebpItem = generateSpecialFormatItem(id, mimeType, dateTaken, in testIsGifOrAnimatedWebp()
197 final Item item = generateSpecialFormatItem(id, mimeType, dateTaken, generationModified, in testIsGifDoesNotUseMimeType()
212 final Item item1 = generateJpegItem(id1, dateTaken1, generationModified1); in testCompareTo_differentDateTaken()
217 final Item item2 = generateJpegItem(id2, dateTaken2, generationModified2); in testCompareTo_differentDateTaken()
[all …]
DModelTestUtils.java35 public static Item generateItem(String id, String mimeType, long dateTaken, in generateItem()
37 return new Item(id, mimeType, dateTaken, generationModified, duration, in generateItem()
53 public static Item generateSpecialFormatItem(String id, String mimeType, long dateTaken, in generateSpecialFormatItem()
55 return new Item(id, mimeType, dateTaken, generationModified, duration, in generateSpecialFormatItem()
61 public static Item generateJpegItem(String id, long dateTaken, long generationModified) { in generateJpegItem()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/model/
DItem.java50 public class Item { class
51 public static final Item EMPTY_VIEW = new Item("EMPTY_VIEW");
75 public Item(@NonNull Cursor cursor, @NonNull UserId userId) { in Item() method in Item
80 public Item(String id, String mimeType, long dateTaken, long generationModified, long duration, in Item() method in Item
92 private Item(String id) { in Item() method in Item
163 public static Item fromCursor(@NonNull Cursor cursor, UserId userId) { in fromCursor()
164 return new Item(requireNonNull(cursor), userId); in fromCursor()
227 public int compareTo(Item anotherItem) { in compareTo()
247 if (obj == null || !(obj instanceof Item)) return false; in equals()
249 Item other = (Item) obj; in equals()
/packages/apps/Gallery/src/com/android/camera/
DGalleryPicker.java233 Item item = mAdapter.mItems.get(position); in onSlideShowClicked()
342 ArrayList<Item> allItems = new ArrayList<Item>(); in workerRun()
377 private void checkImageList(ArrayList<Item> allItems) { in checkImageList()
385 Item item = null; in checkImageList()
397 item = new Item(data.mType, in checkImageList()
404 final Item finalItem = item; in checkImageList()
414 private void updateItem(Item item) { in updateItem()
427 private void checkBucketIds(ArrayList<Item> allItems) { in checkBucketIds()
461 Item item = new Item(Item.TYPE_NORMAL_FOLDERS, key, in checkBucketIds()
466 final Item finalItem = item; in checkBucketIds()
[all …]
/packages/apps/Stk/src/com/android/stk/
DStkLauncherActivity.java33 import com.android.internal.telephony.cat.Item;
50 private ArrayList<Item> mStkMenuList = null;
92 Item item = getSelectedItem(position); in onListItemClick()
149 private Item getSelectedItem(int position) { in getSelectedItem()
150 Item item = null; in getSelectedItem()
176 mStkMenuList = new ArrayList<Item>(); in addStkMenuListItems()
198 Item item = new Item(i, stkItemName, icon); in addStkMenuListItems()
/packages/apps/Settings/src/com/android/settings/sim/
DChooseSimActivity.java42 import com.google.android.setupdesign.items.Item;
157 Item subItem = (Item) item; in onItemSelected()
216 Item item = (Item) mItemGroup.getItemAt(mSelectedItemIndex); in onStateChange()
235 Item item = new DisableableItem(); in displaySubscriptions()
262 Item item = new DisableableItem(); in displaySubscriptions()
299 Item item = (Item) mItemGroup.getItemAt(itemIndex); in handleEnableRemovableSimError()
305 class DisableableItem extends Item implements Dividable {
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPopupList.java44 public static class Item { class in PopupList
48 public Item(int id, String title) { in Item() method in PopupList.Item
60 private final ArrayList<Item> mItems = new ArrayList<Item>();
79 mItems.add(new Item(id, title)); in addItem()
172 public Item findItem(int id) { in findItem()
173 for (Item item : mItems) { in findItem()
/packages/apps/TV/src/com/android/tv/ui/sidepanel/
DCustomizeChannelListFragment.java59 private final List<Item> mItems = new ArrayList<>();
112 for (Item item : mItems) { in onCreateView()
159 protected List<Item> getItemList() { in getItemList()
172 private void cleanUpOneChannelGroupItem(List<Item> items) { in cleanUpOneChannelGroupItem()
173 Iterator<Item> iter = items.iterator(); in cleanUpOneChannelGroupItem()
175 Item item = iter.next(); in cleanUpOneChannelGroupItem()
186 private void addItemForGroupBySource(List<Item> items) { in addItemForGroupBySource()
209 private void addItemForGroupByHdSd(List<Item> items) { in addItemForGroupByHdSd()
353 protected List<Item> getItemList() { in getItemList()
354 List<Item> items = new ArrayList<>(); in getItemList()

123456