Home
last modified time | relevance | path

Searched refs:items (Results 1 – 25 of 173) sorted by relevance

1234567

/frameworks/base/core/java/com/android/internal/view/menu/
DActionMenu.java132 final ArrayList<ActionMenuItem> items = mItems; in findItemIndex() local
133 final int itemCount = items.size(); in findItemIndex()
135 if (items.get(i).getItemId() == id) { in findItemIndex()
152 final ArrayList<ActionMenuItem> items = mItems; in hasVisibleItems() local
153 final int itemCount = items.size(); in hasVisibleItems()
156 if (items.get(i).isVisible()) { in hasVisibleItems()
167 final ArrayList<ActionMenuItem> items = mItems; in findItemWithShortcut() local
168 final int itemCount = items.size(); in findItemWithShortcut()
171 ActionMenuItem item = items.get(i); in findItemWithShortcut()
208 final ArrayList<ActionMenuItem> items = mItems; in removeGroup() local
[all …]
DMenuAdapter.java53 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getCount() local
56 return items.size(); in getCount()
58 return items.size() - 1; in getCount()
66 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getItem() local
71 return items.get(position); in getItem()
104 final ArrayList<MenuItemImpl> items = mAdapterMenu.getNonActionItems(); in findExpandedIndex() local
105 final int count = items.size(); in findExpandedIndex()
107 final MenuItemImpl item = items.get(i); in findExpandedIndex()
DListMenuPresenter.java231 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getCount() local
232 int count = items.size() - mItemIndexOffset; in getCount()
240 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getItem() local
245 return items.get(position); in getItem()
267 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in findExpandedIndex() local
268 final int count = items.size(); in findExpandedIndex()
270 final MenuItemImpl item = items.get(i); in findExpandedIndex()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/
DComparableUtils.java43 static <T> void assertAscendingOrdering(final List<T> items, in assertAscendingOrdering() argument
45 for (int i = 1; i < items.size(); i++) { in assertAscendingOrdering()
46 final T x = items.get(i - 1); in assertAscendingOrdering()
47 final T y = items.get(i); in assertAscendingOrdering()
61 static <T> void assertSameOrdering(final Collection<T> items,
63 for (final T x : items) {
64 for (final T y : items) {
86 static <T> void assertComparableContracts(final Collection<T> items,
88 for (final T x : items) {
92 for (final T y : items) {
[all …]
DInputMethodSubtypePreferenceTest.java82 final Collection<InputMethodSubtypePreference> items = new ArrayList<>(); in testComparableContracts() local
83 items.addAll(ITEMS_IN_ASCENDING); in testComparableContracts()
84 items.addAll(SAME_ORDER_ITEMS); in testComparableContracts()
85 items.add(createPreference("", "", Locale.US)); in testComparableContracts()
86 items.add(createPreference("A", "en", Locale.US)); in testComparableContracts()
87 items.add(createPreference("A", "en_US", Locale.US)); in testComparableContracts()
88 items.add(createPreference("E", "hi_IN", Locale.US)); in testComparableContracts()
89 items.add(createPreference("E", "en", Locale.US)); in testComparableContracts()
90 items.add(createPreference("Z", "en_US", Locale.US)); in testComparableContracts()
93 items, in testComparableContracts()
/frameworks/base/services/tests/servicestests/src/com/android/server/inputmethod/
DInputMethodSubtypeSwitchingControllerTest.java66 private static void addDummyImeSubtypeListItems(List<ImeSubtypeListItem> items, in addDummyImeSubtypeListItems() argument
92 items.add(new ImeSubtypeListItem(imeName, null /* variableName */, imi, in addDummyImeSubtypeListItems()
97 items.add(new ImeSubtypeListItem(imeName, subtypeLocale, imi, i, subtypeLocale, in addDummyImeSubtypeListItems()
134 final List<ImeSubtypeListItem> items = new ArrayList<ImeSubtypeListItem>(); in createEnabledImeSubtypes() local
135 addDummyImeSubtypeListItems(items, "LatinIme", "LatinIme", Arrays.asList("en_US", "fr"), in createEnabledImeSubtypes()
137 addDummyImeSubtypeListItems(items, "switchUnawareLatinIme", "switchUnawareLatinIme", in createEnabledImeSubtypes()
140 addDummyImeSubtypeListItems(items, "subtypeUnawareIme", "subtypeUnawareIme", null, in createEnabledImeSubtypes()
142 addDummyImeSubtypeListItems(items, "JapaneseIme", "JapaneseIme", Arrays.asList("ja_JP"), in createEnabledImeSubtypes()
144 addDummyImeSubtypeListItems(items, "switchUnawareJapaneseIme", "switchUnawareJapaneseIme", in createEnabledImeSubtypes()
146 return items; in createEnabledImeSubtypes()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DOverflowMenuAdapter.java49 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getCount() local
51 return items.size(); in getCount()
53 return items.size() - 1; in getCount()
58 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getItem() local
62 return items.get(position); in getItem()
88 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in findExpandedIndex() local
89 final int count = items.size(); in findExpandedIndex()
91 final MenuItemImpl item = items.get(i); in findExpandedIndex()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DMenu.java33 public List<Item> items; field in Menu
47 items = new ArrayList<Item>(); in Menu()
64 items = new ArrayList<Item>(); in Menu()
68 items.add(item); in Menu()
88 int size = items.size(); in writeToParcel()
91 dest.writeParcelable(items.get(i), flags); in writeToParcel()
/frameworks/base/core/tests/coretests/src/android/metrics/
DLogMakerTest.java286 Object[] items = new Object[2];
287 items[0] = null;
288 items[1] = "foo";
289 new LogMaker(items);
294 Object[] items = new Object[2];
295 items[0] = 10;
296 items[1] = null;
297 new LogMaker(items);
302 Object[] items = new Object[1];
303 items[0] = 10;
[all …]
/frameworks/av/media/codec2/sfplugin/
DFrameReassembler.cpp89 std::list<std::unique_ptr<C2Work>> *items) { in process() argument
95 items->splice(items->end(), mPendingWork); in process()
123 finishCurrentBlock(items); in process()
138 finishCurrentBlock(items); in process()
170 finishCurrentBlock(items); in process()
176 finishCurrentBlock(items); in process()
202 void FrameReassembler::finishCurrentBlock(std::list<std::unique_ptr<C2Work>> *items) { in finishCurrentBlock() argument
218 items->push_back(std::move(work)); in finishCurrentBlock()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DItemInflaterTest.java25 import com.android.setupwizardlib.items.Item;
26 import com.android.setupwizardlib.items.ItemGroup;
27 import com.android.setupwizardlib.items.ItemHierarchy;
28 import com.android.setupwizardlib.items.ItemInflater;
DItemAdapterTest.java27 import com.android.setupwizardlib.items.Item;
28 import com.android.setupwizardlib.items.ItemAdapter;
29 import com.android.setupwizardlib.items.ItemGroup;
30 import com.android.setupwizardlib.items.ItemHierarchy;
/frameworks/base/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/
DRecentTasksAdapter.kt32 @Assisted private val items: List<RecentTask>, constant in com.android.systemui.mediaprojection.appselector.view.RecentTasksAdapter
46 val task = items[position] in onBindViewHolder()
52 override fun getItemCount(): Int = items.size in getItemCount()
64 fun create(items: List<RecentTask>, listener: RecentTaskClickListener): RecentTasksAdapter in onRecentAppClicked()
/frameworks/base/core/java/android/metrics/
DLogMaker.java56 public LogMaker(Object[] items) { in LogMaker() argument
57 if (items != null) { in LogMaker()
58 deserialize(items); in LogMaker()
409 public void deserialize(Object[] items) { in deserialize() argument
411 while (items != null && i < items.length) { in deserialize()
412 Object key = items[i++]; in deserialize()
413 Object value = i < items.length ? items[i++] : null; in deserialize()
/frameworks/base/services/core/java/com/android/server/om/
DOverlayManagerSettings.java183 final List<SettingsItem> items = selectWhereTarget(targetPackageName, userId); in getOverlaysForTarget() local
184 items.removeIf(OverlayManagerSettings::isImmutableFrameworkOverlay); in getOverlaysForTarget()
185 return CollectionUtils.map(items, SettingsItem::getOverlayInfo); in getOverlaysForTarget()
191 final List<SettingsItem> items = selectWhereUser(userId); in getOverlaysForUser() local
192 items.removeIf(OverlayManagerSettings::isImmutableFrameworkOverlay); in getOverlaysForUser()
195 for (int i = 0, n = items.size(); i < n; i++) { in getOverlaysForUser()
196 final SettingsItem item = items.get(i); in getOverlaysForUser()
354 Stream<SettingsItem> items = mItems.stream();
356 items = items.filter(item -> item.mUserId == dumpState.getUserId());
359 items = items.filter(item -> item.mOverlay.getPackageName()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/
DSemiStableSort.kt37 items: MutableList<T>, in <lambda>()
44 items, in <lambda>()
49 items.clear() in <lambda>()
50 items.addAll(workspace) in <lambda>()
61 items: Iterable<T>, in <lambda>()
69 items.filterTo(result) { stableOrder.getRank(it) != null } in <lambda>()
73 items.filterTo(additions) { stableOrder.getRank(it) == null } in <lambda>()
/frameworks/base/core/java/android/widget/
DRemoteCollectionItemsAdapter.java48 @NonNull RemoteCollectionItems items, in RemoteCollectionItemsAdapter()
55 mViewTypeCount = items.getViewTypeCount(); in RemoteCollectionItemsAdapter()
57 mItems = items; in RemoteCollectionItemsAdapter()
70 @NonNull RemoteCollectionItems items, in setData()
73 if (mViewTypeCount < items.getViewTypeCount()) { in setData()
78 mItems = items; in setData()
/frameworks/base/core/java/com/android/internal/util/
DArrayUtils.java143 public static @NonNull <T> T[] emptyIfNull(@Nullable T[] items, Class<T> kind) { in emptyIfNull() argument
144 return items != null ? items : emptyArray(kind); in emptyIfNull()
811 public static @Nullable <T> T[] filter(@Nullable T[] items, in filter() argument
814 if (isEmpty(items)) { in filter()
815 return items; in filter()
819 int size = size(items); in filter()
822 tests[i] = predicate.test(items[i]); in filter()
827 if (matchesCount == items.length) { in filter()
828 return items; in filter()
837 result[outIdx++] = items[i]; in filter()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DListViewTest.java45 List<String> items = Lists.newArrayList("hello"); in testRequestLayout() local
46 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testRequestLayout()
75 List<String> items = Lists.newArrayList("hello"); in testNoSelectableItems() local
76 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testNoSelectableItems()
87 items.remove(0); in testNoSelectableItems()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/privacy/
DPrivacyChipBuilderTest.kt45 val items = listOf(bar2, foo0, baz1, bar3) in testGenerateAppsList() constant
47 val textBuilder = PrivacyChipBuilder(context, items) in testGenerateAppsList()
72 val items = listOf(appLocation, appMicrophone, appCamera) in testOrder() constant
73 val textBuilder = PrivacyChipBuilder(context, items) in testOrder()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/animation/
DAppearAnimationUtils.java129 private <T> AppearAnimationProperties getDelays(T[] items) { in getDelays() argument
133 mProperties.delays = new long[items.length][]; in getDelays()
134 for (int row = 0; row < items.length; row++) { in getDelays()
138 if (items[row] != null && delay > maxDelay) { in getDelays()
147 private <T> AppearAnimationProperties getDelays(T[][] items) { in getDelays() argument
151 mProperties.delays = new long[items.length][]; in getDelays()
152 for (int row = 0; row < items.length; row++) { in getDelays()
153 T[] columns = items[row]; in getDelays()
158 if (items[row][col] != null && delay > maxDelay) { in getDelays()
/frameworks/base/core/java/android/view/
DKeyboardShortcutGroup.java44 @NonNull List<KeyboardShortcutInfo> items) { in KeyboardShortcutGroup() argument
46 mItems = new ArrayList<>(checkNotNull(items)); in KeyboardShortcutGroup()
64 @NonNull List<KeyboardShortcutInfo> items, boolean isSystemGroup) { in KeyboardShortcutGroup() argument
66 mItems = new ArrayList<>(checkNotNull(items)); in KeyboardShortcutGroup()
/frameworks/base/core/tests/coretests/src/android/database/
DDatabaseLocaleTest.java69 ArrayList<String> items = new ArrayList<String>(); in query() local
71 items.add(c.getString(0)); in query()
74 String[] result = items.toArray(new String[items.size()]); in query()
/frameworks/av/services/audiopolicy/engineconfigurable/tools/
DbuildCommonTypesStructureFile.py76 for component_types_name, values_dict in componentTypeDict.items():
81 ordered_values = OrderedDict(sorted(values_dict.items(), key=lambda x: x[1]))
82 for key, value in ordered_values.items():
92 ordered_values = OrderedDict(sorted(values_dict.items(), key=lambda x: x[1]))
93 for key, value in ordered_values.items():
199 …','.join('{}:{}'.format(value, key) for key, value in all_component_types[component_types].items())
/frameworks/av/media/codec2/sfplugin/tests/
DFrameReassembler_test.cpp88 std::list<std::unique_ptr<C2Work>> items; in testPushSameSize() local
89 ASSERT_EQ(C2_OK, frameReassembler.process(buffer, &items)); in testPushSameSize()
90 while (!items.empty()) { in testPushSameSize()
91 std::unique_ptr<C2Work> work = std::move(*items.begin()); in testPushSameSize()
92 items.erase(items.begin()); in testPushSameSize()

1234567