Searched refs:list (Results 1 - 25 of 535) sorted by relevance

1234567891011>>

/frameworks/support/paging/common/src/test/java/android/arch/paging/
H A DNullPaddedListTest.java36 NullPaddedList<String> list = new NullPaddedList<>(
39 assertNull(list.get(0));
40 assertNull(list.get(1));
41 assertSame(data.get(2), list.get(2));
42 assertSame(data.get(3), list.get(3));
43 assertNull(list.get(4));
44 assertNull(list.get(5));
46 assertEquals(6, list.size());
47 assertEquals(2, list.getLeadingNullCount());
48 assertEquals(2, list
[all...]
H A DPageArrayListTest.java33 PageArrayList<String> list = new PageArrayList<>(2, data.size());
35 assertEquals(2, list.mPageSize);
36 assertEquals(data.size(), list.size());
37 assertEquals(3, list.mMaxPageCount);
40 assertEquals(null, list.get(i));
42 for (int i = 0; i < data.size(); i += list.mPageSize) {
43 list.mPages.add(data.subList(i, i + 2));
46 assertEquals(data.get(i), list.get(i));
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
H A DGapWorkerTest.java84 ArrayList<GapWorker.Task> list = new ArrayList<>();
85 list.add(new GapWorker.Task());
86 list.add(new GapWorker.Task());
87 list.add(new GapWorker.Task());
89 list.get(0).view = null;
90 list.get(1).view = new RecyclerView(getContext());
91 list.get(2).view = null;
93 Collections.sort(list, GapWorker.sTaskComparator);
95 assertNotNull(list.get(0).view);
96 assertNull(list
[all...]
/frameworks/base/core/java/android/hardware/camera2/utils/
H A DListUtils.java22 * Various assortment of list utilities.
24 * <p>Using a {@code null} list is supported and will almost always return the default value
29 /** Return {@code} true if the {@code list} contains the {@code needle}. */
30 public static <T> boolean listContains(List<T> list, T needle) { argument
31 if (list == null) {
34 return list.contains(needle);
39 * Return {@code true} if the {@code list} is only a single element equal to
42 public static <T> boolean listElementsEqualTo(List<T> list, T single) { argument
43 if (list == null) {
47 return (list
53 listToString(List<T> list) argument
87 listSelectFirstFrom(List<T> list, T[] choices) argument
[all...]
H A DArrayUtils.java71 * @param list Source list of strings
72 * @param convertFrom Conversion list of strings
73 * @param convertTo Conversion list of ints
75 * or {@code null} if {@code list} was {@code null}
78 List<String> list, String[] convertFrom, int[] convertTo) {
79 if (list == null) {
83 List<Integer> convertedList = convertStringListToIntList(list, convertFrom, convertTo);
101 * @param list Source list o
77 convertStringListToIntArray( List<String> list, String[] convertFrom, int[] convertTo) argument
107 convertStringListToIntList( List<String> list, String[] convertFrom, int[] convertTo) argument
144 toIntArray(List<Integer> list) argument
[all...]
/frameworks/compile/slang/
H A Dslang_pragma_list.h20 #include <list>
26 typedef std::list< std::pair<std::string, std::string> > PragmaList;
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DUtils.java23 * Allows lambda iteration over a list. It is done in reverse order so it is safe
26 public static <T> void safeForeach(List<T> list, Consumer<T> c) { argument
27 for (int i = list.size() - 1; i >= 0; i--) {
28 c.accept(list.get(i));
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
H A DEvents.java110 public static void writeEvent(Context context, int tag, Object... list) { argument
113 if (list != null && list.length > 0) {
119 (Boolean) list[1] ? 1 : 0);
120 sb.append(SHOW_REASONS[(Integer) list[0]]).append(" keyguard=").append(list[1]);
124 (Boolean) list[0]);
125 sb.append(list[0]);
129 sb.append(DISMISS_REASONS[(Integer) list[0]]);
133 (Integer) list[
217 writeEvent(long time, int tag, Object[] list) argument
[all...]
/frameworks/base/core/java/com/google/android/collect/
H A DLists.java47 * <p>{@code List<Base> list = Lists.newArrayList(sub1, sub2);}
53 * <p>{@code List<Base> list = Lists.<Base>newArrayList(sub1, sub2);}
55 * @param elements the elements that the list should contain, in order
60 ArrayList<E> list = new ArrayList<E>(capacity);
61 Collections.addAll(list, elements);
62 return list;
/frameworks/base/media/java/android/media/
H A DMediaInserter.java58 List<ContentValues> list = rowmap.get(tableUri);
59 if (list == null) {
60 list = new ArrayList<ContentValues>();
61 rowmap.put(tableUri, list);
63 list.add(new ContentValues(values));
64 if (list.size() >= mBufferSizePerUri) {
66 flush(tableUri, list);
73 List<ContentValues> list = mRowMap.get(tableUri);
74 flush(tableUri, list);
81 List<ContentValues> list
87 flush(Uri tableUri, List<ContentValues> list) argument
[all...]
/frameworks/layoutlib/bridge/src/android/os/
H A DHandlerThread_Delegate.java42 List<HandlerThread> list = sThreads.get(context);
43 if (list != null) {
44 for (HandlerThread thread : list) {
48 list.clear();
59 List<HandlerThread> list = sThreads.get(context);
60 if (list == null) {
61 list = new ArrayList<HandlerThread>();
62 sThreads.put(context, list);
65 list.add(theThread);
/frameworks/av/media/libstagefright/codec2/include/
H A DC2Work.h28 #include <list>
52 std::list<C2ParamField> conflictingFields;
90 std::list<std::unique_ptr<C2Info>> infos;
91 std::list<std::shared_ptr<C2InfoBuffer>> infoBuffers;
99 std::list<std::unique_ptr<C2Param>> tunings; //< tunings to be applied before processing this
101 std::list<C2Param::Type> requestedInfos;
107 std::list<std::unique_ptr<C2SettingResult>> failures;
142 std::list<std::pair<std::unique_ptr<C2PortMimeConfig>, std::unique_ptr<C2Info>>> preChainInfos;
143 std::list<std::pair<std::unique_ptr<C2PortMimeConfig>, std::unique_ptr<C2Buffer>>> preChainInfoBlobs;
146 std::list<st
[all...]
/frameworks/data-binding/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/
H A DGenericAdapter.java30 public static <T> void setListText(TextView view, List<T> list) { argument
31 setText(view, list);
35 public static <T> void setCollectionText(TextView view, Collection<T> list) { argument
36 setText(view, list);
45 public static <T> void setListAndArray(TextView view, List<T> list, T[] values) { argument
46 setText(view, list);
49 @BindingAdapter("list")
54 @BindingAdapter({"list", "array"})
55 public static <T> void setGenericListAndArray(GenericView<T> view, List<T> list, T[] values) { argument
56 view.setList(list);
60 setGenericList(TextView view, List<String> list) argument
65 setGenericIntegerList(TextView view, List<Integer> list) argument
[all...]
/frameworks/support/paging/common/src/main/java/android/arch/paging/
H A DKeyedDataSource.java123 List<Value> list;
126 list = loadInitial(initialLoadSize);
127 if (list == null) {
145 // the list, so we need to load after the last item in the before list
151 // assemble full list
152 list = new ArrayList<>();
153 list.addAll(before);
154 // Note - we reverse the list instead of before, in case before is immutable
155 Collections.reverse(list);
[all...]
H A DNullPaddedList.java27 * NullPaddedList is a simple list, with optional null padding on the beginning and end.
29 * @param <Type> The type of the entries in the list.
55 * Create a static, immutable NullPaddedList with the specified list,
57 * @param leadingNullCount Number of empty items in advance of the passed list.
58 * @param list List of items.
59 * @param trailingNullCount Number of empty items following the passed list.
61 NullPaddedList(int leadingNullCount, List<Type> list, int trailingNullCount) { argument
65 if (list == null) {
66 throw new IllegalArgumentException("list must be non-null");
68 mList = list;
73 NullPaddedList(int leadingNullCount, int totalCount, List<Type> list) argument
85 NullPaddedList(int positionOffset, List<Type> list) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
H A DListViewHeightTest.java56 ListView list = (ListView) mActivity.findViewById(R.id.inner_list);
57 assertEquals("Unexpected items in adapter", 0, list.getCount());
58 assertEquals("Unexpected children in list view", 0, list.getChildCount());
66 assertTrue("List not be visible after clicking button1", list.isShown());
67 assertTrue("List incorrect height", list.getHeight() == 200);
75 assertTrue("List not be visible after clicking button2", list.isShown());
83 assertFalse("List should not be visible clicking button3", list.isShown());
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
H A DHistoryEvaluator.java56 private float weightedAverage(ArrayList<Data> list) { argument
59 int size = list.size();
61 Data data = list.get(i);
88 private void decayValue(ArrayList<Data> list, float factor) { argument
89 int size = list.size();
91 list.get(i).weight *= factor;
95 while (!list.isEmpty() && isZero(list.get(0).weight)) {
96 list.remove(0);
/frameworks/base/core/java/com/android/internal/widget/
H A DOpReorderer.java38 // we push them to the end of the list so that they can be handled easily.
45 private void swapMoveOp(List<UpdateOp> list, int badMove, int next) { argument
46 final UpdateOp moveOp = list.get(badMove);
47 final UpdateOp nextOp = list.get(next);
50 swapMoveRemove(list, badMove, moveOp, next, nextOp);
53 swapMoveAdd(list, badMove, moveOp, next, nextOp);
56 swapMoveUpdate(list, badMove, moveOp, next, nextOp);
61 void swapMoveRemove(List<UpdateOp> list, int movePos, UpdateOp moveOp, argument
91 list.remove(removePos);
110 list
160 swapMoveAdd(List<UpdateOp> list, int move, UpdateOp moveOp, int add, UpdateOp addOp) argument
181 swapMoveUpdate(List<UpdateOp> list, int move, UpdateOp moveOp, int update, UpdateOp updateOp) argument
218 getLastMoveOutOfOrder(List<UpdateOp> list) argument
[all...]
/frameworks/base/services/core/jni/
H A Dcom_android_server_HardwarePropertiesManagerService.cpp128 hidl_vec<CoolingDevice> list; local
130 [&list](ThermalStatus status, hidl_vec<CoolingDevice> devices) {
132 list = std::move(devices);
143 float values[list.size()];
144 for (size_t i = 0; i < list.size(); ++i) {
145 values[i] = list[i].currentValue;
147 jfloatArray fanSpeeds = env->NewFloatArray(list.size());
148 env->SetFloatArrayRegion(fanSpeeds, 0, list.size(), values);
160 hidl_vec<Temperature> list; local
162 [&list](ThermalStatu
207 hidl_vec<CpuUsage> list; local
[all...]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
H A DOpReorderer.java38 // we push them to the end of the list so that they can be handled easily.
45 private void swapMoveOp(List<UpdateOp> list, int badMove, int next) { argument
46 final UpdateOp moveOp = list.get(badMove);
47 final UpdateOp nextOp = list.get(next);
50 swapMoveRemove(list, badMove, moveOp, next, nextOp);
53 swapMoveAdd(list, badMove, moveOp, next, nextOp);
56 swapMoveUpdate(list, badMove, moveOp, next, nextOp);
61 void swapMoveRemove(List<UpdateOp> list, int movePos, UpdateOp moveOp, argument
91 list.remove(removePos);
110 list
160 swapMoveAdd(List<UpdateOp> list, int move, UpdateOp moveOp, int add, UpdateOp addOp) argument
181 swapMoveUpdate(List<UpdateOp> list, int move, UpdateOp moveOp, int update, UpdateOp updateOp) argument
218 getLastMoveOutOfOrder(List<UpdateOp> list) argument
[all...]
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/
H A DGenericAdapterTest.java36 List<String> list = Arrays.asList(arr);
37 getBinder().setList(list);
44 assertEquals(list, getBinder().view5.getList());
45 assertEquals(list, getBinder().view6.getList());
/frameworks/data-binding/extensions/library/src/main/java/android/databinding/
H A DListChangeRegistry.java64 * Notify registered callbacks that there was an unknown or whole-list change.
66 * @param list The list that changed.
68 public void notifyChanged(ObservableList list) { argument
69 notifyCallbacks(list, ALL, null);
75 * @param list The list that changed.
79 public void notifyChanged(ObservableList list, int start, int count) { argument
81 notifyCallbacks(list, CHANGED, listChanges);
87 * @param list Th
91 notifyInserted(ObservableList list, int start, int count) argument
104 notifyMoved(ObservableList list, int from, int to, int count) argument
116 notifyRemoved(ObservableList list, int start, int count) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DParceledListSliceTest.java16 List<SmallObject> list = new ArrayList<SmallObject>();
18 list.add(new SmallObject(i * 2, (i * 2) + 1));
25 parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0);
53 * Test that when the list is large, the data is successfully parceled
54 * and unparceled (the implementation will send pieces of the list in
61 List<LargeObject> list = new ArrayList<LargeObject>();
63 list.add(new LargeObject(
76 parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0);
96 private void sendParcelStringList(List<String> list) { argument
101 parcel.writeParcelable(new StringParceledListSlice(list),
163 writeEvilParceledListSlice(Parcel dest, List<T> list) argument
[all...]
/frameworks/compile/libbcc/include/bcc/
H A DRSCompilerDriver.h25 #include <list>
154 const std::list<std::list<std::pair<int, int>>>& toFuse,
155 const std::list<std::string>& fused,
156 const std::list<std::list<std::pair<int, int>>>& invokes,
157 const std::list<std::string>& invokeBatchNames);
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
H A DSize.java33 * An helper method to build a list of this class from a list of
37 * @return The built list.
40 ArrayList<Size> list = new ArrayList<Size>(cameraSizes.size());
42 list.add(new Size(cameraSize));
44 return list;
48 * A helper method to build a list of this class from a list of {@link android.util.Size}.
51 * @return The built list.
54 ArrayList<Size> list
[all...]

Completed in 857 milliseconds

1234567891011>>