Home
last modified time | relevance | path

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

12345

/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/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 …]
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 …]
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()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DSelectionTest.java29 import com.android.providers.media.photopicker.data.model.Item;
52 final Item item = generateFakeImageItem(id); in testAddSelectedItem()
56 final Item selectedItem = mSelection.getSelectedItems().get(0); in testAddSelectedItem()
67 final Item item = generateFakeImageItem(id); in testDeleteSelectedItem()
81 final Item item = generateFakeImageItem(id); in testClearSelectedItem()
83 final Item item2 = generateFakeImageItem(id2); in testClearSelectedItem()
98 final Item item1 = generateFakeImageItem(id1); in testSetSelectedItem()
100 final Item item2 = generateFakeImageItem(id2); in testSetSelectedItem()
102 final Item item3 = generateFakeImageItem(id3); in testSetSelectedItem()
119 final Item item1 = generateFakeImageItem(id1); in testGetSelectedItemsForPreview_multiSelect()
[all …]
DPickerResultTest.java38 import com.android.providers.media.photopicker.data.model.Item;
66 List<Item> items = null; in testGetResultSingle()
93 ArrayList<Item> items = null; in testGetResultMultiple()
98 for (Item item: items) { in testGetResultMultiple()
124 ArrayList<Item> items = null; in testGetResultMultiple_onlyOneItemSelected()
150 private ArrayList<Item> createItemSelection(int count) throws Exception { in createItemSelection()
151 ArrayList<Item> selectedItemList = new ArrayList<>(); in createItemSelection()
162 private Item createImageItem() throws Exception { in createImageItem()
173 return new Item(imageUri.getLastPathSegment(), "image/jpeg", /* dateTaken */ 0, in createImageItem()
213 private void deleteFiles(List<Item> items) { in deleteFiles()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/ui/
DPhotosTabAdapterTest.java33 import com.android.providers.media.photopicker.data.model.Item;
49 final List<Item> mediaItems = generateFakeImageItemList(1); in test_hasRecentItem()
50 final Item mediaItem = mediaItems.get(0); in test_hasRecentItem()
65 assertThat(secondAdapterItem).isInstanceOf(Item.class); in test_hasRecentItem()
66 assertThat(((Item) secondAdapterItem).getId()) in test_hasRecentItem()
75 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in test_exceedMinCount_notSameDay_hasRecentItemAndOneDateItem()
103 final List<Item> mediaItems = generateFakeImageItemList(12); in test_exceedMinCount_sameDay_hasRecentItemNoDateItem()
108 final Item lastItem = generateJpegItem(lastItemId, dateTakenMs, /* generationModified */ 1); in test_exceedMinCount_sameDay_hasRecentItemNoDateItem()
129 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in test_noRecentSection()
160 final List<Item> mediaItems = generateFakeImageItemList(mediaItemCount); in testGetCategoryItems_dataIsUpdated()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DSelection.java27 import com.android.providers.media.photopicker.data.model.Item;
40 private Map<Uri, Item> mSelectedItems = new HashMap<>();
44 private List<Item> mSelectedItemsForPreview = new ArrayList<>();
53 public List<Item> getSelectedItems() { in getSelectedItems()
70 public void addSelectedItem(Item item) { in addSelectedItem()
79 public void setSelectedItem(Item item) { in setSelectedItem()
91 public void removeSelectedItem(Item item) { in removeSelectedItem()
110 public boolean isItemSelected(Item item) { in isItemSelected()
143 mSelectedItemsForPreview.sort(Collections.reverseOrder(Item::compareTo)); in prepareSelectedItemsForPreviewAll()
150 public void prepareItemForPreviewOnLongPress(Item item) { in prepareItemForPreviewOnLongPress()
[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()
86 public static List<Uri> getPickerUrisForItems(@NonNull List<Item> items) { in getPickerUrisForItems()
88 for (Item item : items) { in getPickerUrisForItems()
/packages/apps/Launcher3/src/com/android/launcher3/
DLauncherPrefs.kt50 private val Item.encryptedPrefs in <lambda>() constant
62 private fun chooseSharedPreferences(item: Item): SharedPreferences = in <lambda>()
80 private fun <T> getInner(item: Item, default: T): T { in <lambda>()
111 fun put(vararg itemsToValues: Pair<Item, Any>): Unit = in <lambda>()
115 fun <T : Any> put(item: Item, value: T): Unit = put(item.to(value)) in <lambda>()
121 fun putSync(vararg itemsToValues: Pair<Item, Any>): Unit = in <lambda>()
135 updates: Array<out Pair<Item, Any>> in <lambda>()
148 prefToItemValueList.value.forEach { itemToValue: Pair<Item, Any> -> in <lambda>()
162 item: Item, in <lambda>()
187 fun addListener(listener: OnSharedPreferenceChangeListener, vararg items: Item) { in <lambda>()
[all …]
/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/ui/
DPreviewAdapter.java27 import com.android.providers.media.photopicker.data.model.Item;
41 private List<Item> mItemList = new ArrayList<>();
61 final Item item = getItem(position); in onBindViewHolder()
72 final Item item = (Item) holder.itemView.getTag(); in onViewAttachedToWindow()
95 final Item item = (Item) itemView.getTag(); in onHandlePageSelected()
107 Item getItem(int position) { in getItem()
111 void updateItemList(List<Item> itemList) { in updateItemList()
DPhotosTabFragment.java36 import com.android.providers.media.photopicker.data.model.Item;
154 private void onChangeMediaItems(@NonNull List<Item> itemList, in onChangeMediaItems()
166 mSelection.removeSelectedItem((Item) view.getTag()); in onItemClick()
180 final Item item = (Item) view.getTag(); in onItemClick()
190 final Item item = (Item) view.getTag(); in onItemClick()
197 final Item item = (Item) view.getTag(); in onItemLongClick()
/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/modules/Virtualization/libs/libfdt/src/
Diterators.rs29 const CHUNK_SIZE: usize = size_of::<<CellIterator as Iterator>::Item>(); in new()
36 type Item = u32; typedef
38 fn next(&mut self) -> Option<Self::Item> { in next() argument
39 Some(Self::Item::from_be_bytes(self.chunks.next()?.try_into().ok()?)) in next()
73 type Item = Reg<u64>; typedef
75 fn next(&mut self) -> Option<Self::Item> { in next() argument
84 Some(Self::Item { addr, size }) in next()
126 type Item = Range<usize>; typedef
128 fn next(&mut self) -> Option<Self::Item> { in next() argument
182 type Item = AddressRange<A, P, S>; typedef
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/
DRootsFragment.java103 final Item item = mAdapter.getItem(position);
113 final Item item = mAdapter.getItem(position);
129 private List<Item> mApplicationItemList;
196 final Item item = mAdapter.getItem(pos); in onRightClick()
230 final Item item = getItem(v); in onActivityCreated()
275 List<Item> sortedItems = sortLoadResult( in onActivityCreated()
349 List<Item> sortLoadResult( in sortLoadResult()
359 final List<Item> result = new ArrayList<>(); in sortLoadResult()
402 final List<Item> rootList = new ArrayList<>(); in sortLoadResult()
403 final List<Item> rootListOtherUser = new ArrayList<>(); in sortLoadResult()
[all …]
DUserItemsCombiner.java50 private List<Item> mRootList;
51 private List<Item> mRootListOtherUser;
66 UserItemsCombiner setRootListForCurrentUser(List<Item> rootList) { in setRootListForCurrentUser()
71 UserItemsCombiner setRootListForOtherUser(List<Item> rootList) { in setRootListForOtherUser()
80 public List<Item> createPresentableList() { in createPresentableList()
84 final List<Item> result = new ArrayList<>(); in createPresentableList()
88 final List<Item> personalRootList; in createPresentableList()
89 final List<Item> workRootList; in createPresentableList()
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/common/bluetooth/fastpair/
DBluetoothAudioPairerTest.java157 private List<Item> mLogs = new ArrayList<>();
161 mLogs.add(new Item(event)); in logEventSucceeded()
169 List<Item> getErrorLogs() { in getErrorLogs()
174 List<Item> getLogs() { in getLogs()
178 List<Item> getLast() { in getLast()
186 public static class Item { class in BluetoothAudioPairerTest.TestEventLogger
190 Item(Event event) { in Item() method in BluetoothAudioPairerTest.TestEventLogger.Item
200 public static class ItemFailed extends Item {
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/
DUserItemsCombinerTest.java54 private static final List<Item> PERSONAL_ITEMS = Lists.newArrayList(
60 private static final List<Item> WORK_ITEMS = Lists.newArrayList(
64 private static final Correspondence<Item, Item> ITEM_CORRESPONDENCE =
65 Correspondence.from((Item actual, Item expected) -> {
144 List<Item> expected = Lists.newArrayList(); in testCreatePresentableList_currentIsPersonal_personalAndWorkItems()
163 List<Item> expected = Lists.newArrayList(); in testCreatePresentableList_currentIsWork_personalAndWorkItems()
207 private static class TestItem extends Item {
/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/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/DocumentsUI/tests/unit/com/android/documentsui/dirlist/
DAppsRowManagerTest.java42 import com.android.documentsui.sidebar.Item;
96 final List<Item> rootList = new ArrayList<>(); in testUpdateList_byRootItem()
121 List<Item> hybridList = new ArrayList<>(); in testUpdateList_byHybridItem()
141 final List<Item> rootList = new ArrayList<>(); in testUpdateView_matchedState_showRow()
155 final List<Item> rootList = new ArrayList<>(); in testUpdateView_showSelectedUserItems()
179 final List<Item> rootList = new ArrayList<>(); in testUpdateView_showSelectedUserItems_otherUser()
198 final List<Item> rootList = new ArrayList<>(); in testUpdateView_notInRecent_hideRow()
214 final List<Item> rootList = new ArrayList<>(); in testUpdateView_notHandledAction_hideRow()
228 final List<Item> rootList = new ArrayList<>(); in testUpdateView_noItems_hideRow()
242 final List<Item> rootList = new ArrayList<>(); in testUpdateView_crossProfileSearch_hideRow()
[all …]
/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()

12345