Home
last modified time | relevance | path

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

12345678910>>...38

/frameworks/base/core/tests/coretests/src/android/os/
DPackageTagsListTest.java46 PackageTagsList list = builder.build(); in testPackageTagsList() local
48 assertTrue(list.contains(builder.build())); in testPackageTagsList()
49 assertTrue(list.contains("package1", "attr1")); in testPackageTagsList()
50 assertTrue(list.contains("package1", "attr2")); in testPackageTagsList()
51 assertTrue(list.contains("package2", "attr1")); in testPackageTagsList()
52 assertTrue(list.contains("package2", "attr2")); in testPackageTagsList()
53 assertTrue(list.contains("package2", "attr3")); in testPackageTagsList()
54 assertTrue(list.contains("package4", "attr1")); in testPackageTagsList()
55 assertTrue(list.contains("package4", "attr2")); in testPackageTagsList()
56 assertTrue(list.containsAll("package2")); in testPackageTagsList()
[all …]
DAidlTest.java121 public TestParcelable listParcelableLonger(List<TestParcelable> list, int index) { in listParcelableLonger() argument
122 list.add(list.get(index)); in listParcelableLonger()
123 return list.get(index); in listParcelableLonger()
126 public int listParcelableShorter(List<TestParcelable> list, int index) { in listParcelableShorter() argument
127 list.remove(index); in listParcelableShorter()
128 return list.size(); in listParcelableShorter()
249 List<TestParcelable> list = Lists.newArrayList(); in testListParcelableLonger() local
250 list.add(new TestParcelable(33, "asdf")); in testListParcelableLonger()
251 list.add(new TestParcelable(34, "jkl;")); in testListParcelableLonger()
253 TestParcelable result = mRemote.listParcelableLonger(list, 1); in testListParcelableLonger()
[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/media/java/android/media/
DMediaInserter.java59 List<ContentValues> list = rowmap.get(tableUri); in insert() local
60 if (list == null) { in insert()
61 list = new ArrayList<ContentValues>(); in insert()
62 rowmap.put(tableUri, list); in insert()
64 list.add(new ContentValues(values)); in insert()
65 if (list.size() >= mBufferSizePerUri) { in insert()
67 flush(tableUri, list); in insert()
75 List<ContentValues> list = mRowMap.get(tableUri); in flushAll() local
76 flush(tableUri, list); in flushAll()
83 List<ContentValues> list = mPriorityRowMap.get(tableUri); in flushAllPriority() local
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_HardwarePropertiesManagerService.cpp152 std::vector<CoolingDevice> list; in getFanSpeedsAidl() local
153 auto status = gThermalAidlHal->getCoolingDevices(&list); in getFanSpeedsAidl()
158 float values[list.size()]; in getFanSpeedsAidl()
159 for (size_t i = 0; i < list.size(); ++i) { in getFanSpeedsAidl()
160 values[i] = list[i].value; in getFanSpeedsAidl()
162 jfloatArray fanSpeeds = env->NewFloatArray(list.size()); in getFanSpeedsAidl()
163 env->SetFloatArrayRegion(fanSpeeds, 0, list.size(), values); in getFanSpeedsAidl()
168 hidl_vec<hardware::thermal::V1_0::CoolingDevice> list; in getFanSpeedsHidl() local
170 [&list](ThermalStatus status, in getFanSpeedsHidl()
173 list = std::move(devices); in getFanSpeedsHidl()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DEvents.java339 public static void writeEvent(int tag, Object... list) { in writeEvent() argument
341 Log.i(TAG, logEvent(tag, list)); in writeEvent()
343 sCallback.writeEvent(time, tag, list); in writeEvent()
355 public static String logEvent(int tag, Object... list) { in logEvent() argument
361 if (list == null || list.length == 0) { in logEvent()
373 if (list.length > 1) { in logEvent()
374 final Integer reason = (Integer) list[0]; in logEvent()
375 final Boolean keyguard = (Boolean) list[1]; in logEvent()
382 final Boolean expand = (Boolean) list[0]; in logEvent()
391 final Integer reason = (Integer) list[0]; in logEvent()
[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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierRestrictionRulesTest.java197 ArrayList<CarrierIdentifier> list = new ArrayList<>(); in testTestCarrierId_allCarriersAllowed() local
198 list.add(new CarrierIdentifier(MCC1, MNC1, null, null, null, null)); in testTestCarrierId_allCarriersAllowed()
199 list.add(new CarrierIdentifier(MCC1, MNC1, SPN, null, GID1, GID2)); in testTestCarrierId_allCarriersAllowed()
200 list.add(new CarrierIdentifier(MCC2, MNC2, SPN, null, null, null)); in testTestCarrierId_allCarriersAllowed()
201 list.add(new CarrierIdentifier(MCC3, MNC3, null, IMSI, null, null)); in testTestCarrierId_allCarriersAllowed()
202 list.add(new CarrierIdentifier(MCC4, MNC4, null, null, GID1, null)); in testTestCarrierId_allCarriersAllowed()
203 list.add(new CarrierIdentifier(MCC6, MNC1, null, null, null, null)); in testTestCarrierId_allCarriersAllowed()
204 list.add(new CarrierIdentifier(MCC1, MNC6, null, null, null, null)); in testTestCarrierId_allCarriersAllowed()
205 list.add(new CarrierIdentifier(MCC2, MNC2, null, null, null, null)); in testTestCarrierId_allCarriersAllowed()
206 list.add(new CarrierIdentifier(MCC3, MNC3, null, null, null, null)); in testTestCarrierId_allCarriersAllowed()
[all …]
/frameworks/hardware/interfaces/automotive/display/1.0/vts/functional/
DVtsHalAutomotiveDisplayV1_0TargetTest.cpp52 mDisplayProxy->getDisplayIdList([&displayIdList](const auto& list) { in TEST_P() argument
53 displayIdList.resize(list.size()); in TEST_P()
54 for (auto i = 0; i < list.size(); ++i) { in TEST_P()
55 displayIdList[i] = list[i]; in TEST_P()
76 mDisplayProxy->getDisplayIdList([&displayIdList](const auto& list) { in TEST_P() argument
77 displayIdList.resize(list.size()); in TEST_P()
78 for (auto i = 0; i < list.size(); ++i) { in TEST_P()
79 displayIdList[i] = list[i]; in TEST_P()
92 mDisplayProxy->getDisplayIdList([&displayIdList](const auto& list) { in TEST_P() argument
93 displayIdList.resize(list.size()); in TEST_P()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DDisplayTrackerImpl.kt49 val list = synchronized(displayCallbacks) { displayCallbacks.toList() } in onDisplayAdded() constant
50 onDisplayAdded(displayId, list) in onDisplayAdded()
54 val list = synchronized(displayCallbacks) { displayCallbacks.toList() } in onDisplayRemoved() constant
55 onDisplayRemoved(displayId, list) in onDisplayRemoved()
59 val list = synchronized(displayCallbacks) { displayCallbacks.toList() } in onDisplayChanged() constant
60 onDisplayChanged(displayId, list) in onDisplayChanged()
72 val list = synchronized(brightnessCallbacks) { brightnessCallbacks.toList() } in onDisplayChanged() constant
73 onDisplayChanged(displayId, list) in onDisplayChanged()
123 private fun onDisplayAdded(displayId: Int, list: List<DisplayTrackerDataItem>) { in onDisplayAdded()
126 notifySubscribers({ onDisplayAdded(displayId) }, list) in onDisplayAdded()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/privacy/
DPrivacyDialogControllerTest.kt115 var list: List<PrivacyDialog.PrivacyElement>? = null in <lambda>() variable in com.android.systemui.privacy.PrivacyDialogControllerTest
120 list: List<PrivacyDialog.PrivacyElement>, in <lambda>()
123 this.list = list in <lambda>()
154 dialogProvider.list = null in <lambda>()
265 dialogProvider.list?.let { list -> in <lambda>() method
266 assertThat(list.get(0).type).isEqualTo(PrivacyType.TYPE_CAMERA) in <lambda>()
267 assertThat(list.get(0).packageName).isEqualTo(TEST_PACKAGE_NAME) in <lambda>()
268 assertThat(list.get(0).userId).isEqualTo(USER_ID) in <lambda>()
269 assertThat(list.get(0).applicationName).isEqualTo(TEST_PACKAGE_NAME) in <lambda>()
270 assertThat(list.get(0).attributionTag).isNull() in <lambda>()
[all …]
DPrivacyDialogControllerV2Test.kt121 var list: List<PrivacyDialogV2.PrivacyElement>? = null in <lambda>() variable in com.android.systemui.privacy.PrivacyDialogControllerV2Test
128 list: List<PrivacyDialogV2.PrivacyElement>, in <lambda>()
133 this.list = list in <lambda>()
167 dialogProvider.list = null in <lambda>()
294 dialogProvider.list?.let { list -> in <lambda>() method
295 assertThat(list.get(0).type).isEqualTo(PrivacyType.TYPE_CAMERA) in <lambda>()
296 assertThat(list.get(0).packageName).isEqualTo(TEST_PACKAGE_NAME) in <lambda>()
297 assertThat(list.get(0).userId).isEqualTo(USER_ID) in <lambda>()
298 assertThat(list.get(0).applicationName).isEqualTo(TEST_PACKAGE_NAME) in <lambda>()
299 assertThat(list.get(0).attributionTag).isNull() in <lambda>()
[all …]
DPrivacyDialogV2Test.kt103 val list = listOf(createPrivacyElement()) in testManageAppCalledWithCorrectParams() constant
104 dialog = PrivacyDialogV2(context, list, manageApp, closeApp, openPrivacyDashboard) in testManageAppCalledWithCorrectParams()
114 val list = listOf(createPrivacyElement(isActive = true)) in testCloseAppCalledWithCorrectParams() constant
115 dialog = PrivacyDialogV2(context, list, manageApp, closeApp, openPrivacyDashboard) in testCloseAppCalledWithCorrectParams()
125 val list = listOf(createPrivacyElement(isActive = true, isService = true)) in testCloseAppMissingForService() constant
126 dialog = PrivacyDialogV2(context, list, manageApp, closeApp, openPrivacyDashboard) in testCloseAppMissingForService()
184 val list = in testCorrectNumElements() constant
189 dialog = PrivacyDialogV2(context, list, manageApp, closeApp, openPrivacyDashboard) in testCorrectNumElements()
201 val list = listOf(createPrivacyElement()) in testHeaderText() constant
202 dialog = PrivacyDialogV2(context, list, manageApp, closeApp, openPrivacyDashboard) in testHeaderText()
[all …]
DPrivacyDialogTest.kt69 val list = listOf( in testStarterCalledWithCorrectParams() constant
86 dialog = PrivacyDialog(context, list, starter) in testStarterCalledWithCorrectParams()
117 val list = listOf( in testCorrectNumElements() constant
149 dialog = PrivacyDialog(context, list, starter) in testCorrectNumElements()
172 val list = listOf(element) in testUsingText() constant
173 dialog = PrivacyDialog(context, list, starter) in testUsingText()
202 val list = listOf(element) in testRecentText() constant
203 dialog = PrivacyDialog(context, list, starter) in testRecentText()
232 val list = listOf(element) in testEnterprise() constant
233 dialog = PrivacyDialog(context, list, starter) in testEnterprise()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DApplicationExitInfoTest.java249 ArrayList<ApplicationExitInfo> list = new ArrayList<ApplicationExitInfo>(); in testApplicationExitInfo() local
250 mAppExitInfoTracker.getExitInfo(app1PackageName, app1Uid, app1Pid1, 0, list); in testApplicationExitInfo()
251 assertEquals(1, list.size()); in testApplicationExitInfo()
253 ApplicationExitInfo info = list.get(0); in testApplicationExitInfo()
324 list.clear(); in testApplicationExitInfo()
327 mAppExitInfoTracker.getExitInfo(null, app1Uid, 0, 0, list); in testApplicationExitInfo()
328 assertEquals(3, list.size()); in testApplicationExitInfo()
330 info = list.get(1); in testApplicationExitInfo()
352 info = list.get(0); in testApplicationExitInfo()
370 info = list.get(2); in testApplicationExitInfo()
[all …]
/frameworks/libs/modules-utils/javatests/com/android/modules/utils/
DParceledListSliceTest.java35 List<SmallObject> list = new ArrayList<SmallObject>(); in testSmallList() local
37 list.add(new SmallObject(i * 2, (i * 2) + 1)); in testSmallList()
44 parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0); in testSmallList()
80 List<LargeObject> list = new ArrayList<LargeObject>(); in testLargeList() local
82 list.add(new LargeObject( in testLargeList()
95 parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0); in testLargeList()
115 private void sendParcelStringList(List<String> list) { in sendParcelStringList() argument
120 parcel.writeParcelable(new StringParceledListSlice(list), 0); in sendParcelStringList()
129 assertEquals(list, slice.getList()); in sendParcelStringList()
134 List<String> list = new ArrayList<String>(); in testStringList() local
[all …]
/frameworks/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/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/widget/
DSettingsSpinnerPreferenceTest.java59 final List<CharSequence> list = new ArrayList<>(); in onBindViewHolder_noSetSelection_getDefaultItem() local
60 list.add("TEST1"); in onBindViewHolder_noSetSelection_getDefaultItem()
61 list.add("TEST2"); in onBindViewHolder_noSetSelection_getDefaultItem()
62 list.add("TEST3"); in onBindViewHolder_noSetSelection_getDefaultItem()
64 adapter.addAll(list); in onBindViewHolder_noSetSelection_getDefaultItem()
76 final List<CharSequence> list = new ArrayList<>(); in onBindViewHolder_setSelection_getSelectedItem() local
77 list.add("TEST1"); in onBindViewHolder_setSelection_getSelectedItem()
78 list.add("TEST2"); in onBindViewHolder_setSelection_getSelectedItem()
79 list.add("TEST3"); in onBindViewHolder_setSelection_getSelectedItem()
81 adapter.addAll(list); in onBindViewHolder_setSelection_getSelectedItem()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/appops/
DAppOpsControllerTest.java188 List<AppOpItem> list = mController.getActiveAppOps(); in startListening_fetchesCurrentActive_oneActive() local
189 assertEquals(1, list.size()); in startListening_fetchesCurrentActive_oneActive()
190 AppOpItem first = list.get(0); in startListening_fetchesCurrentActive_oneActive()
220 List<AppOpItem> list = mController.getActiveAppOps(); in startListening_fetchesCurrentActive_multiplePackages() local
221 assertEquals(2, list.size()); in startListening_fetchesCurrentActive_multiplePackages()
223 AppOpItem item0 = list.get(0); in startListening_fetchesCurrentActive_multiplePackages()
228 AppOpItem item1 = list.get(1); in startListening_fetchesCurrentActive_multiplePackages()
267 List<AppOpItem> list = mController.getActiveAppOps(); in startListening_fetchesCurrentActive_multipleEntries() local
268 assertEquals(2, list.size()); in startListening_fetchesCurrentActive_multipleEntries()
270 AppOpItem first = list.get(0); in startListening_fetchesCurrentActive_multipleEntries()
[all …]
/frameworks/base/services/permission/java/com/android/server/permission/access/collection/
DIndexedListSet.kt20 private val list: ArrayList<T> in <lambda>() constant in com.android.server.permission.access.collection.IndexedListSet
25 get() = list.size in <lambda>()
27 override fun contains(element: T): Boolean = list.contains(element) in <lambda>()
29 override fun isEmpty(): Boolean = list.isEmpty() in <lambda>()
31 override fun iterator(): MutableIterator<T> = list.iterator() in <lambda>()
37 fun elementAt(index: Int): T = list[index] in <lambda>()
39 fun indexOf(element: T): Int = list.indexOf(element) in <lambda>()
42 if (list.contains(element)) { in <lambda>()
45 list.add(element) in <lambda>()
49 override fun remove(element: T): Boolean = list.remove(element) in <lambda>()
[all …]
/frameworks/av/media/libeffects/preprocessing/aidl/
DPreProcessingSession.h45 std::vector<std::shared_ptr<PreProcessingContext>>& list,
47 auto itor = std::find_if(list.begin(), list.end(),
51 if (itor == list.end()) {
56 list.erase(itor);
83 auto& list = mSessionMap[sessionId]; in createSession() local
92 list.push_back(context); in createSession()
100 auto& list = mSessionMap[sessionId]; in releaseSession() local
101 if (!findPreProcessingTypeInList(list, type, true /* remove */)) { in releaseSession()
105 if (list.empty()) { in releaseSession()
/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 …]
/frameworks/av/media/libeffects/lvm/wrapper/Aidl/
DGlobalSession.h49 static bool findBundleTypeInList(std::vector<std::shared_ptr<BundleContext>>& list,
51 auto itor = std::find_if(list.begin(), list.end(),
55 if (itor == list.end()) {
60 list.erase(itor);
86 auto& list = mSessionMap[sessionId]; in createSession() local
95 list.push_back(context); in createSession()
103 auto& list = mSessionMap[sessionId]; in releaseSession() local
104 if (!findBundleTypeInList(list, type, true /* remove */)) { in releaseSession()
108 if (list.size() == 0) { in releaseSession()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DParceledListSliceTest.java40 List<SmallObject> list = new ArrayList<SmallObject>(); in testSmallList() local
42 list.add(new SmallObject(i * 2, (i * 2) + 1)); in testSmallList()
49 parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0); in testSmallList()
85 List<LargeObject> list = new ArrayList<LargeObject>(); in testLargeList() local
87 list.add(new LargeObject( in testLargeList()
100 parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0); in testLargeList()
148 private void sendParcelStringList(List<String> list) { in sendParcelStringList() argument
153 parcel.writeParcelable(new StringParceledListSlice(list), 0); in sendParcelStringList()
162 assertEquals(list, slice.getList()); in sendParcelStringList()
167 List<String> list = new ArrayList<String>(); in testStringList() local
[all …]

12345678910>>...38