Home
last modified time | relevance | path

Searched refs:list (Results 1 – 25 of 513) sorted by relevance

12345678910>>...21

/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DGapWorkerTest.java84 ArrayList<GapWorker.Task> list = new ArrayList<>(); in taskOrderViewPresence() local
85 list.add(new GapWorker.Task()); in taskOrderViewPresence()
86 list.add(new GapWorker.Task()); in taskOrderViewPresence()
87 list.add(new GapWorker.Task()); in taskOrderViewPresence()
89 list.get(0).view = null; in taskOrderViewPresence()
90 list.get(1).view = new RecyclerView(getContext()); in taskOrderViewPresence()
91 list.get(2).view = null; in taskOrderViewPresence()
93 Collections.sort(list, GapWorker.sTaskComparator); in taskOrderViewPresence()
95 assertNotNull(list.get(0).view); in taskOrderViewPresence()
96 assertNull(list.get(1).view); in taskOrderViewPresence()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DEvents.java108 public static void writeEvent(Context context, int tag, Object... list) { in writeEvent() argument
111 if (list != null && list.length > 0) { in writeEvent()
117 (Boolean) list[1] ? 1 : 0); in writeEvent()
118 sb.append(SHOW_REASONS[(Integer) list[0]]).append(" keyguard=").append(list[1]); in writeEvent()
122 (Boolean) list[0]); in writeEvent()
123 sb.append(list[0]); in writeEvent()
127 sb.append(DISMISS_REASONS[(Integer) list[0]]); in writeEvent()
131 (Integer) list[0]); in writeEvent()
132 sb.append(AudioSystem.streamToString((Integer) list[0])); in writeEvent()
136 (Integer) list[1]); in writeEvent()
[all …]
/frameworks/base/core/java/android/hardware/camera2/utils/
DListUtils.java30 public static <T> boolean listContains(List<T> list, T needle) { in listContains() argument
31 if (list == null) { in listContains()
34 return list.contains(needle); in listContains()
42 public static <T> boolean listElementsEqualTo(List<T> list, T single) { in listElementsEqualTo() argument
43 if (list == null) { in listElementsEqualTo()
47 return (list.size() == 1 && list.contains(single)); in listElementsEqualTo()
53 public static <T> String listToString(List<T> list) { in listToString() argument
54 if (list == null) { in listToString()
61 int size = list.size(); in listToString()
63 for (T elem : list) { in listToString()
[all …]
DArrayUtils.java78 List<String> list, String[] convertFrom, int[] convertTo) { in convertStringListToIntArray() argument
79 if (list == null) { in convertStringListToIntArray()
83 List<Integer> convertedList = convertStringListToIntList(list, convertFrom, convertTo); in convertStringListToIntArray()
108 List<String> list, String[] convertFrom, int[] convertTo) { in convertStringListToIntList() argument
109 if (list == null) { in convertStringListToIntList()
113 List<Integer> convertedList = new ArrayList<>(list.size()); in convertStringListToIntList()
115 for (String str : list) { in convertStringListToIntList()
144 public static int[] toIntArray(List<Integer> list) { in toIntArray() argument
145 if (list == null) { in toIntArray()
149 int[] arr = new int[list.size()]; in toIntArray()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_HardwarePropertiesManagerService.cpp86 hidl_vec<CoolingDevice> list; in nativeGetFanSpeeds() local
88 [&list](ThermalStatus status, hidl_vec<CoolingDevice> devices) { in nativeGetFanSpeeds()
90 list = std::move(devices); in nativeGetFanSpeeds()
101 float values[list.size()]; in nativeGetFanSpeeds()
102 for (size_t i = 0; i < list.size(); ++i) { in nativeGetFanSpeeds()
103 values[i] = list[i].currentValue; in nativeGetFanSpeeds()
105 jfloatArray fanSpeeds = env->NewFloatArray(list.size()); in nativeGetFanSpeeds()
106 env->SetFloatArrayRegion(fanSpeeds, 0, list.size(), values); in nativeGetFanSpeeds()
116 hidl_vec<Temperature> list; in nativeGetDeviceTemperatures() local
118 [&list](ThermalStatus status, hidl_vec<Temperature> temperatures) { in nativeGetDeviceTemperatures()
[all …]
/frameworks/base/media/java/android/media/
DMediaInserter.java58 List<ContentValues> list = rowmap.get(tableUri); in insert() local
59 if (list == null) { in insert()
60 list = new ArrayList<ContentValues>(); in insert()
61 rowmap.put(tableUri, list); in insert()
63 list.add(new ContentValues(values)); in insert()
64 if (list.size() >= mBufferSizePerUri) { in insert()
66 flush(tableUri, list); in insert()
73 List<ContentValues> list = mRowMap.get(tableUri); in flushAll() local
74 flush(tableUri, list); in flushAll()
81 List<ContentValues> list = mPriorityRowMap.get(tableUri); in flushAllPriority() local
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DOpReorderer.java45 private void swapMoveOp(List<UpdateOp> list, int badMove, int next) { in swapMoveOp() argument
46 final UpdateOp moveOp = list.get(badMove); in swapMoveOp()
47 final UpdateOp nextOp = list.get(next); in swapMoveOp()
50 swapMoveRemove(list, badMove, moveOp, next, nextOp); in swapMoveOp()
53 swapMoveAdd(list, badMove, moveOp, next, nextOp); in swapMoveOp()
56 swapMoveUpdate(list, badMove, moveOp, next, nextOp); in swapMoveOp()
61 void swapMoveRemove(List<UpdateOp> list, int movePos, UpdateOp moveOp, in swapMoveRemove() argument
91 list.remove(removePos); in swapMoveRemove()
110 list.set(movePos, removeOp); in swapMoveRemove()
111 list.remove(removePos); in swapMoveRemove()
[all …]
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DOpReorderer.java45 private void swapMoveOp(List<UpdateOp> list, int badMove, int next) { in swapMoveOp() argument
46 final UpdateOp moveOp = list.get(badMove); in swapMoveOp()
47 final UpdateOp nextOp = list.get(next); in swapMoveOp()
50 swapMoveRemove(list, badMove, moveOp, next, nextOp); in swapMoveOp()
53 swapMoveAdd(list, badMove, moveOp, next, nextOp); in swapMoveOp()
56 swapMoveUpdate(list, badMove, moveOp, next, nextOp); in swapMoveOp()
61 void swapMoveRemove(List<UpdateOp> list, int movePos, UpdateOp moveOp, in swapMoveRemove() argument
91 list.remove(removePos); in swapMoveRemove()
110 list.set(movePos, removeOp); in swapMoveRemove()
111 list.remove(removePos); in swapMoveRemove()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DAidlTest.java113 public TestParcelable listParcelableLonger(List<TestParcelable> list, int index) { in listParcelableLonger() argument
114 list.add(list.get(index)); in listParcelableLonger()
115 return list.get(index); in listParcelableLonger()
118 public int listParcelableShorter(List<TestParcelable> list, int index) { in listParcelableShorter() argument
119 list.remove(index); in listParcelableShorter()
120 return list.size(); in listParcelableShorter()
241 List<TestParcelable> list = Lists.newArrayList(); in testListParcelableLonger() local
242 list.add(new TestParcelable(33, "asdf")); in testListParcelableLonger()
243 list.add(new TestParcelable(34, "jkl;")); in testListParcelableLonger()
245 TestParcelable result = mRemote.listParcelableLonger(list, 1); in testListParcelableLonger()
[all …]
/frameworks/data-binding/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/
DGenericAdapter.java30 public static <T> void setListText(TextView view, List<T> list) { in setListText() argument
31 setText(view, list); in setListText()
35 public static <T> void setCollectionText(TextView view, Collection<T> list) { in setCollectionText() argument
36 setText(view, list); in setCollectionText()
45 public static <T> void setListAndArray(TextView view, List<T> list, T[] values) { in setListAndArray() argument
46 setText(view, list); in setListAndArray()
55 public static <T> void setGenericListAndArray(GenericView<T> view, List<T> list, T[] values) { in setGenericListAndArray() argument
56 view.setList(list); in setGenericListAndArray()
60 public static void setGenericList(TextView view, List<String> list) { in setGenericList() argument
61 setText(view, list); in setGenericList()
[all …]
/frameworks/av/media/libstagefright/codec2/include/
DC2Work.h52 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>>> preChainInfoBlo…
146 std::list<std::unique_ptr<C2Worklet>> worklets;
155 std::list<node_id> chain;
/frameworks/base/tools/layoutlib/bridge/src/android/os/
DHandlerThread_Delegate.java42 List<HandlerThread> list = sThreads.get(context); in cleanUp() local
43 if (list != null) { in cleanUp()
44 for (HandlerThread thread : list) { in cleanUp()
48 list.clear(); in cleanUp()
59 List<HandlerThread> list = sThreads.get(context); in run() local
60 if (list == null) { in run()
61 list = new ArrayList<HandlerThread>(); in run()
62 sThreads.put(context, list); in run()
65 list.add(theThread); in run()
/frameworks/native/opengl/tests/hwc/
DhwcTestLib.cpp406 hwc_display_contents_1_t *list; in hwcTestCreateLayerList() local
409 if ((list = (hwc_display_contents_1_t *) calloc(1, size)) == NULL) { in hwcTestCreateLayerList()
412 list->flags = HWC_GEOMETRY_CHANGED; in hwcTestCreateLayerList()
413 list->numHwLayers = numLayers; in hwcTestCreateLayerList()
415 return list; in hwcTestCreateLayerList()
422 void hwcTestFreeLayerList(hwc_display_contents_1_t *list) in hwcTestFreeLayerList() argument
424 free(list); in hwcTestFreeLayerList()
428 void hwcTestDisplayList(hwc_display_contents_1_t *list) in hwcTestDisplayList() argument
430 testPrintI(" flags: %#x%s", list->flags, in hwcTestDisplayList()
431 (list->flags & HWC_GEOMETRY_CHANGED) ? " GEOMETRY_CHANGED" : ""); in hwcTestDisplayList()
[all …]
DhwcStress.cpp412 hwc_display_contents_1_t *list; in main() local
413 list = hwcTestCreateLayerList(testRandMod(frames.size()) + 1); in main()
414 if (list == NULL) { in main()
421 selectedFrames = vectorRandSelect(frames, list->numHwLayers); in main()
428 for (unsigned int n1 = 0; n1 < list->numHwLayers; n1++) { in main()
431 hwc_layer_1_t *layer = &list->hwLayers[n1]; in main()
480 if (verbose) { testPrintI("Prepare:"); hwcTestDisplayList(list); } in main()
481 hwcDevice->prepare(hwcDevice, 1, &list); in main()
484 hwcTestDisplayListPrepareModifiable(list); in main()
488 list->flags &= ~HWC_GEOMETRY_CHANGED; in main()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DHistoryEvaluator.java56 private float weightedAverage(ArrayList<Data> list) { in weightedAverage() argument
59 int size = list.size(); in weightedAverage()
61 Data data = list.get(i); in weightedAverage()
88 private void decayValue(ArrayList<Data> list, float factor) { in decayValue() argument
89 int size = list.size(); in decayValue()
91 list.get(i).weight *= factor; in decayValue()
95 while (!list.isEmpty() && isZero(list.get(0).weight)) { in decayValue()
96 list.remove(0); in decayValue()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DShortcutManagerTest3.java19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
74 mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
81 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
90 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
100 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
109 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
121 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
136 assertTrue(mManager.setDynamicShortcuts(list())); in testSetDynamicShortcuts_noManifestShortcuts()
169 mManager.addDynamicShortcuts(list( in testAddDynamicShortcuts_noManifestShortcuts()
178 mManager.addDynamicShortcuts(list( in testAddDynamicShortcuts_noManifestShortcuts()
[all …]
DShortcutManagerTest1.java51 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
279 assertTrue(mManager.setDynamicShortcuts(list(si1, si2, si3))); in testSetDynamicShortcuts()
287 assertTrue(mManager.setDynamicShortcuts(list(si1))); in testSetDynamicShortcuts()
293 assertTrue(mManager.setDynamicShortcuts(list())); in testSetDynamicShortcuts()
304 assertTrue(mManager.setDynamicShortcuts(list(si2, si3))); in testSetDynamicShortcuts()
312 assertTrue(mManager.setDynamicShortcuts(list(makeShortcut("s1")))); in testSetDynamicShortcuts()
325 assertTrue(mManager.setDynamicShortcuts(list(si1))); in testAddDynamicShortcuts()
331 assertTrue(mManager.addDynamicShortcuts(list(si2, si3))); in testAddDynamicShortcuts()
338 assertTrue(mManager.addDynamicShortcuts(list())); in testAddDynamicShortcuts()
347 assertTrue(mManager.addDynamicShortcuts(list(makeShortcut("shortcut1")))); in testAddDynamicShortcuts()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DParceledListSliceTest.java14 List<SmallObject> list = new ArrayList<SmallObject>(); in testSmallList() local
16 list.add(new SmallObject(i * 2, (i * 2) + 1)); in testSmallList()
23 parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0); in testSmallList()
59 List<LargeObject> list = new ArrayList<LargeObject>(); in testLargeList() local
61 list.add(new LargeObject( in testLargeList()
74 parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0); in testLargeList()
96 List<String> list = new ArrayList<String>(); in testStringList() local
98 list.add(Long.toString(i * (6 - i))); in testStringList()
104 parcel.writeParcelable(new StringParceledListSlice(list), 0); in testStringList()
113 assertEquals(list, slice.getList()); in testStringList()
[all …]
/frameworks/data-binding/extensions/library/src/main/java/android/databinding/
DListChangeRegistry.java68 public void notifyChanged(ObservableList list) { in notifyChanged() argument
69 notifyCallbacks(list, ALL, null); in notifyChanged()
79 public void notifyChanged(ObservableList list, int start, int count) { in notifyChanged() argument
81 notifyCallbacks(list, CHANGED, listChanges); in notifyChanged()
91 public void notifyInserted(ObservableList list, int start, int count) { in notifyInserted() argument
93 notifyCallbacks(list, INSERTED, listChanges); in notifyInserted()
104 public void notifyMoved(ObservableList list, int from, int to, int count) { in notifyMoved() argument
106 notifyCallbacks(list, MOVED, listChanges); in notifyMoved()
116 public void notifyRemoved(ObservableList list, int start, int count) { in notifyRemoved() argument
118 notifyCallbacks(list, REMOVED, listChanges); in notifyRemoved()
DViewDataBinding.java814 protected static <T> T getFromList(List<T> list, int index) { in getFromList() argument
815 if (list == null || index < 0 || index >= list.size()) { in getFromList()
818 return list.get(index); in getFromList()
822 protected static <T> void setTo(List<T> list, int index, T value) { in setTo() argument
823 if (list == null || index < 0 || index >= list.size()) { in setTo()
826 list.set(index, value); in setTo()
830 protected static <T> T getFromList(SparseArray<T> list, int index) { in getFromList() argument
831 if (list == null || index < 0) { in getFromList()
834 return list.get(index); in getFromList()
838 protected static <T> void setTo(SparseArray<T> list, int index, T value) { in setTo() argument
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListViewHeightTest.java56 ListView list = (ListView) mActivity.findViewById(R.id.inner_list); in testButtons() local
57 assertEquals("Unexpected items in adapter", 0, list.getCount()); in testButtons()
58 assertEquals("Unexpected children in list view", 0, list.getChildCount()); in testButtons()
66 assertTrue("List not be visible after clicking button1", list.isShown()); in testButtons()
67 assertTrue("List incorrect height", list.getHeight() == 200); in testButtons()
75 assertTrue("List not be visible after clicking button2", list.isShown()); in testButtons()
83 assertFalse("List should not be visible clicking button3", list.isShown()); in testButtons()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DSize.java40 ArrayList<Size> list = new ArrayList<Size>(cameraSizes.size()); in buildListFromCameraSizes() local
42 list.add(new Size(cameraSize)); in buildListFromCameraSizes()
44 return list; in buildListFromCameraSizes()
54 ArrayList<Size> list = new ArrayList<Size>(androidSizes.size()); in buildListFromAndroidSizes() local
56 list.add(new Size(androidSize)); in buildListFromAndroidSizes()
58 return list; in buildListFromAndroidSizes()
84 ArrayList<Size> list = new ArrayList<>(); in stringToList() local
88 list.add(new Size(width,height)); in stringToList()
90 return list; in stringToList()
/frameworks/native/libs/ui/
DGraphicBufferAllocator.cpp56 KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList); in dump() local
62 const size_t c = list.size(); in dump()
64 const alloc_rec_t& rec(list.valueAt(i)); in dump()
68 list.keyAt(i), rec.size/1024.0, in dump()
74 list.keyAt(i), in dump()
121 KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList); in allocate() local
132 list.add(*handle, rec); in allocate()
153 KeyedVector<buffer_handle_t, alloc_rec_t>& list(sAllocList); in free() local
154 list.removeItem(handle); in free()
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DConfig.java58 List<String> list = new ArrayList<String>(4); in getResourceDirs() local
61 list.add(GINGERBREAD_DIR); in getResourceDirs()
65 list.add(JELLYBEAN_DIR); in getResourceDirs()
69 list.add(KITKAT_DIR); in getResourceDirs()
71 list.add(DEFAULT_RESOURCE_DIR); in getResourceDirs()
73 return Collections.unmodifiableList(list); in getResourceDirs()
/frameworks/base/core/java/com/android/internal/midi/
DEventScheduler.java153 FastEventQueue list = mEventBuffer.get(event.getTimestamp()); in add() local
154 if (list == null) { in add()
157 list = new FastEventQueue(event); in add()
158 mEventBuffer.put(event.getTimestamp(), list); in add() local
165 list.add(event); in add()
172 FastEventQueue list = mEventBuffer.get(lowestTime); in removeNextEventLocked() local
174 if ((list.size() == 1)) { in removeNextEventLocked()
177 event = list.remove(); in removeNextEventLocked()

12345678910>>...21