Home
last modified time | relevance | path

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

12345678910>>...52

/packages/modules/Bluetooth/system/osi/src/
Dlist.cc22 static list_node_t* list_free_node_(list_t* list, list_node_t* node);
29 list_t* list = (list_t*)zeroed_allocator->alloc(sizeof(list_t)); in list_new_internal() local
30 if (!list) return NULL; in list_new_internal()
32 list->free_cb = callback; in list_new_internal()
33 list->allocator = zeroed_allocator; in list_new_internal()
34 return list; in list_new_internal()
41 void list_free(list_t* list) { in list_free() argument
42 if (!list) return; in list_free()
44 list_clear(list); in list_free()
45 list->allocator->free(list); in list_free()
[all …]
Dfixed_queue.cc35 list_t* list; member
55 ret->list = list_new(NULL); in fixed_queue_new()
56 if (!ret->list) goto error; in fixed_queue_new()
77 for (const list_node_t* node = list_begin(queue->list); in fixed_queue_free()
78 node != list_end(queue->list); node = list_next(node)) in fixed_queue_free()
81 list_free(queue->list); in fixed_queue_free()
103 return list_is_empty(queue->list); in fixed_queue_is_empty()
110 return list_length(queue->list); in fixed_queue_length()
127 list_append(queue->list, data); in fixed_queue_enqueue()
141 ret = list_front(queue->list); in fixed_queue_dequeue()
[all …]
/packages/modules/Bluetooth/system/osi/test/
Dlist_test.cc10 list_t* list = list_new(NULL); in TEST_F() local
11 ASSERT_TRUE(list != NULL); in TEST_F()
12 list_free(list); in TEST_F()
21 list_t* list = list_new(NULL); in TEST_F() local
22 EXPECT_TRUE(list_is_empty(list)); in TEST_F()
23 list_free(list); in TEST_F()
27 list_t* list = list_new(NULL); in TEST_F() local
28 EXPECT_EQ(list_length(list), 0U); in TEST_F()
29 list_free(list); in TEST_F()
33 list_t* list = list_new(NULL); in TEST_F() local
[all …]
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/
DCellBroadcastChannelManagerTest.java112 List<CellBroadcastChannelRange> list = mChannelManager1.getCellBroadcastChannelRanges( in testGetCellBroadcastChannelRanges() local
115 verifyChannelRangesForConfig1(list); in testGetCellBroadcastChannelRanges()
117 list = mChannelManager2.getCellBroadcastChannelRanges( in testGetCellBroadcastChannelRanges()
120 verifyChannelRangesForConfig2(list); in testGetCellBroadcastChannelRanges()
123 private void verifyChannelRangesForConfig1(List<CellBroadcastChannelRange> list) in verifyChannelRangesForConfig1() argument
125 assertEquals(10, list.size()); in verifyChannelRangesForConfig1()
127 assertEquals(12, list.get(0).mStartId); in verifyChannelRangesForConfig1()
128 assertEquals(12, list.get(0).mEndId); in verifyChannelRangesForConfig1()
129 assertEquals(AlertType.ETWS_EARTHQUAKE, list.get(0).mAlertType); in verifyChannelRangesForConfig1()
130 assertEquals(CellBroadcastChannelRange.LEVEL_EMERGENCY, list.get(0).mEmergencyLevel); in verifyChannelRangesForConfig1()
[all …]
/packages/modules/Bluetooth/system/osi/test/fuzzers/list/
Dfuzz_list.cc57 list_node_t* getArbitraryNode(list_t* list, FuzzedDataProvider* dataProvider) { in getArbitraryNode() argument
58 if (list == nullptr || list_is_empty(list)) { in getArbitraryNode()
62 dataProvider->ConsumeIntegralInRange<size_t>(0, list_length(list) - 1); in getArbitraryNode()
63 list_node_t* node = list_begin(list); in getArbitraryNode()
74 list_t* list = nullptr; in callArbitraryFunction() local
83 list = createList(dataProvider); in callArbitraryFunction()
84 list_vector->push_back(list); in callArbitraryFunction()
93 list = reinterpret_cast<list_t*>(list_vector->at(index)); in callArbitraryFunction()
95 list_free(list); in callArbitraryFunction()
97 if (list != nullptr) { in callArbitraryFunction()
[all …]
/packages/modules/Bluetooth/system/test/mock/
Dmock_osi_list.h43 std::function<bool(list_t* list, void* data)> body{
45 bool operator()(list_t* list, void* data) { return body(list, data); }; in operator()
54 std::function<void*(const list_t* list)> body{
56 void* operator()(const list_t* list) { return body(list); }; in operator()
65 std::function<list_node_t*(const list_t* list)> body{
67 list_node_t* operator()(const list_t* list) { return body(list); }; in operator()
76 std::function<list_node_t*(const list_t* list)> body{
78 list_node_t* operator()(const list_t* list) { return body(list); }; in operator()
86 std::function<void(list_t* list)> body{[](list_t* /* list */) {}};
87 void operator()(list_t* list) { body(list); }; in operator()
[all …]
Dmock_osi_list.cc60 bool list_append(list_t* list, void* data) { in list_append() argument
62 return test::mock::osi_list::list_append(list, data); in list_append()
64 void* list_back(const list_t* list) { in list_back() argument
66 return test::mock::osi_list::list_back(list); in list_back()
68 list_node_t* list_back_node(const list_t* list) { in list_back_node() argument
70 return test::mock::osi_list::list_back_node(list); in list_back_node()
72 list_node_t* list_begin(const list_t* list) { in list_begin() argument
74 return test::mock::osi_list::list_begin(list); in list_begin()
76 void list_clear(list_t* list) { in list_clear() argument
78 test::mock::osi_list::list_clear(list); in list_clear()
[all …]
/packages/modules/Wifi/framework/tests/src/android/net/wifi/p2p/
DWifiP2pGroupListTest.java73 WifiP2pGroupList list = new WifiP2pGroupList(); in testListOperations() local
74 list.add(mTestGroup1); in testListOperations()
75 list.add(mTestGroup2); in testListOperations()
76 list.add(mTestGroup3); in testListOperations()
77 list.add(mTestGroup4); in testListOperations()
78 assertEquals(4, list.getGroupList().size()); in testListOperations()
82 list.getNetworkId(TEST_GROUP_OWNER_2.deviceAddress)); in testListOperations()
84 list.getOwnerAddr(mTestGroup2.getNetworkId())); in testListOperations()
86 assertEquals(-1, list.getNetworkId(TEST_GROUP_OWNER_OTHER.deviceAddress)); in testListOperations()
89 list.getNetworkId(TEST_GROUP_OWNER_1.deviceAddress)); in testListOperations()
[all …]
DWifiP2pDeviceListTest.java43 WifiP2pDeviceList list = new WifiP2pDeviceList(); in testListOperations() local
44 list.update(TEST_DEVICE_1); in testListOperations()
45 list.update(TEST_DEVICE_2); in testListOperations()
46 list.update(TEST_DEVICE_3); in testListOperations()
47 assertEquals(3, list.getDeviceList().size()); in testListOperations()
49 assertEquals(TEST_DEVICE_1, list.get(TEST_DEVICE_1.deviceAddress)); in testListOperations()
50 assertEquals(null, list.get(TEST_DEVICE_4.deviceAddress)); in testListOperations()
52 list.remove(TEST_DEVICE_2.deviceAddress); in testListOperations()
53 assertEquals(null, list.get(TEST_DEVICE_2.deviceAddress)); in testListOperations()
55 list.remove(TEST_DEVICE_3); in testListOperations()
[all …]
/packages/modules/Bluetooth/system/osi/include/
Dlist.h48 void list_free(list_t* list);
52 bool list_is_empty(const list_t* list);
56 bool list_contains(const list_t* list, const void* data);
59 size_t list_length(const list_t* list);
63 void* list_front(const list_t* list);
67 void* list_back(const list_t* list);
71 list_node_t* list_back_node(const list_t* list);
78 bool list_insert_after(list_t* list, list_node_t* prev_node, void* data);
86 bool list_prepend(list_t* list, void* data);
93 bool list_append(list_t* list, void* data);
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/legal/
DLegalPreferenceControllerTestCase.java103 List<ResolveInfo> list = new ArrayList<>(); in getAvailabilityStatus_systemApp_shouldReturnAvailable() local
104 list.add(getTestResolveInfo(/* isSystemApp= */ true)); in getAvailabilityStatus_systemApp_shouldReturnAvailable()
106 .thenReturn(list); in getAvailabilityStatus_systemApp_shouldReturnAvailable()
115 List<ResolveInfo> list = new ArrayList<>(); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneWrite() local
116 list.add(getTestResolveInfo(/* isSystemApp= */ true)); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneWrite()
118 .thenReturn(list); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneWrite()
127 List<ResolveInfo> list = new ArrayList<>(); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneRead() local
128 list.add(getTestResolveInfo(/* isSystemApp= */ true)); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneRead()
130 .thenReturn(list); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneRead()
139 List<ResolveInfo> list = new ArrayList<>(); in getAvailabilityStatus_systemApp_shouldReturnAvailable_zoneHidden() local
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/util/
DScanResultUtil.java321 List<SecurityParams> list = generateSecurityParamsListFromScanResult(scanResult); in createNetworkFromScanResult() local
322 if (list.isEmpty()) { in createNetworkFromScanResult()
325 config.setSecurityParams(list); in createNetworkFromScanResult()
336 List<SecurityParams> list = new ArrayList<>(); in generateSecurityParamsListFromScanResult() local
340 list.add(SecurityParams.createSecurityParamsBySecurityType( in generateSecurityParamsListFromScanResult()
342 list.add(SecurityParams.createSecurityParamsBySecurityType( in generateSecurityParamsListFromScanResult()
344 return list; in generateSecurityParamsListFromScanResult()
346 list.add(SecurityParams.createSecurityParamsBySecurityType( in generateSecurityParamsListFromScanResult()
348 return list; in generateSecurityParamsListFromScanResult()
350 list.add(SecurityParams.createSecurityParamsBySecurityType( in generateSecurityParamsListFromScanResult()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/privacy/
DCameraQcPanelTest.java109 QCList list = getQCList(); in testGetQCItem_cameraDisabled_noPrivacyItems_returnsOnlyCameraOffRow() local
111 assertThat(list.getRows().size()).isEqualTo(1); in testGetQCItem_cameraDisabled_noPrivacyItems_returnsOnlyCameraOffRow()
112 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mCameraOffTitleText); in testGetQCItem_cameraDisabled_noPrivacyItems_returnsOnlyCameraOffRow()
121 QCList list = getQCList(); in testGetQCItem_cameraEnabled_noPrivacyItems_returnsOnlyCameraOffRow() local
123 assertThat(list.getRows().size()).isEqualTo(1); in testGetQCItem_cameraEnabled_noPrivacyItems_returnsOnlyCameraOffRow()
124 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mCameraOnTitleText); in testGetQCItem_cameraEnabled_noPrivacyItems_returnsOnlyCameraOffRow()
134 QCList list = getQCList(); in testGetQCItem_cameraEnabled_onlyOneActivePrivacyItem_firstRowCameraEnabled() local
136 assertThat(list.getRows().size()).isEqualTo(2); in testGetQCItem_cameraEnabled_onlyOneActivePrivacyItem_firstRowCameraEnabled()
137 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mCameraOnTitleText); in testGetQCItem_cameraEnabled_onlyOneActivePrivacyItem_firstRowCameraEnabled()
149 QCList list = getQCList(); in testGetQCItem_cameraEnabled_onlyOneActivePrivacyItem_secondRowActiveApp() local
[all …]
DMicQcPanelTest.java109 QCList list = getQCList(); in testGetQCItem_micDisabled_noPrivacyItems_returnsOnlyMicMutedRow() local
111 assertThat(list.getRows().size()).isEqualTo(1); in testGetQCItem_micDisabled_noPrivacyItems_returnsOnlyMicMutedRow()
112 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mMicOffTitleText); in testGetQCItem_micDisabled_noPrivacyItems_returnsOnlyMicMutedRow()
121 QCList list = getQCList(); in testGetQCItem_micEnabled_noPrivacyItems_returnsOnlyMicMutedRow() local
123 assertThat(list.getRows().size()).isEqualTo(1); in testGetQCItem_micEnabled_noPrivacyItems_returnsOnlyMicMutedRow()
124 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mMicOnTitleText); in testGetQCItem_micEnabled_noPrivacyItems_returnsOnlyMicMutedRow()
134 QCList list = getQCList(); in testGetQCItem_micEnabled_onlyOneActivePrivacyItem_firstRowMicEnabled() local
136 assertThat(list.getRows().size()).isEqualTo(2); in testGetQCItem_micEnabled_onlyOneActivePrivacyItem_firstRowMicEnabled()
137 assertThat(list.getRows().get(0).getTitle()).isEqualTo(mMicOnTitleText); in testGetQCItem_micEnabled_onlyOneActivePrivacyItem_firstRowMicEnabled()
149 QCList list = getQCList(); in testGetQCItem_micEnabled_onlyOneActivePrivacyItem_secondRowActiveApp() local
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/qc/
DPairedBluetoothDevicesTest.java130 QCList list = (QCList) item; in getQCItem_bluetoothDisabled_returnsBluetoothDisabledMessage() local
131 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_bluetoothDisabled_returnsBluetoothDisabledMessage()
132 QCRow row = list.getRows().get(0); in getQCItem_bluetoothDisabled_returnsBluetoothDisabledMessage()
140 QCList list = (QCList) mPairedBluetoothDevices.getQCItem(); in getQCItem_noDevices_returnsPairMessage() local
141 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_noDevices_returnsPairMessage()
142 QCRow row = list.getRows().get(0); in getQCItem_noDevices_returnsPairMessage()
156 QCList list = (QCList) mPairedBluetoothDevices.getQCItem(); in getQCItem_hasDevices_hasRows() local
157 assertThat(list.getRows().size()).isEqualTo(2); in getQCItem_hasDevices_hasRows()
168 QCList list = (QCList) mPairedBluetoothDevices.getQCItem(); in getQCItem_hasDevices_onlyDisplaysHumanReadableNames() local
169 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_hasDevices_onlyDisplaysHumanReadableNames()
[all …]
DBluetoothSwitchTest.java77 QCList list = (QCList) item; in getQCItem_createsRow() local
78 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_createsRow()
86 QCList list = (QCList) item; in getQCItem_createsRow_zoneWrite() local
87 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_createsRow_zoneWrite()
88 QCRow row = list.getRows().get(0); in getQCItem_createsRow_zoneWrite()
98 QCList list = (QCList) item; in getQCItem_createsRow_zoneRead() local
99 assertThat(list.getRows().size()).isEqualTo(1); in getQCItem_createsRow_zoneRead()
100 QCRow row = list.getRows().get(0); in getQCItem_createsRow_zoneRead()
115 QCList list = (QCList) mBluetoothSwitch.getQCItem(); in getQCItem_titleSet() local
116 QCRow row = list.getRows().get(0); in getQCItem_titleSet()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/cache/
DBitmapCache.java145 ArrayList<WeakReference<Bitmap>> list = mBitmapCache.get(key); in cache() local
146 if (list == null) { in cache()
147 list = new ArrayList<WeakReference<Bitmap>>(); in cache()
148 mBitmapCache.put(key, list); in cache()
151 while (i < list.size()) { in cache()
152 if (list.get(i).get() == null) { in cache()
153 list.remove(i); in cache()
158 for (i = 0; i < list.size(); i++) { in cache()
159 if (list.get(i).get() == null) { in cache()
160 list.remove(i); in cache()
[all …]
/packages/modules/Bluetooth/system/gd/
Dmodule_unittest.cc89 void ListDependencies(ModuleList* list) const { in ListDependencies()
90 list->add<TestModuleNoDependency>(); in ListDependencies()
149 void ListDependencies(ModuleList* list) const { in ListDependencies()
150 list->add<TestModuleOneDependency>(); in ListDependencies()
151 list->add<TestModuleNoDependencyTwo>(); in ListDependencies()
188 void ListDependencies(ModuleList* list) const { in ListDependencies()
189 list->add<TestModuleNoDependency>(); in ListDependencies()
225 ModuleList list; in TEST_F() local
226 list.add<TestModuleNoDependency>(); in TEST_F()
227 registry_->Start(&list, thread_); in TEST_F()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DGlobalSearchSupport.java99 ArrayList<Object> list = new ArrayList<Object>(); in asList() local
101 list.add(contactId); // _id in asList()
102 list.add(text1); // text1 in asList()
103 list.add(text2); // text2 in asList()
104 list.add(icon1); // icon1 in asList()
105 list.add(icon2); // icon2 in asList()
106 list.add(intentData == null ? buildUri() : intentData); // intent data in asList()
107 list.add(intentAction); // intentAction in asList()
108 list.add(lookupKey); // shortcut id in asList()
109 list.add(filter); // extra data in asList()
[all …]
/packages/apps/Contacts/src/com/android/contacts/group/
DGroupUtil.java34 import com.android.contacts.list.ContactsSectionIndexer;
35 import com.android.contacts.list.UiIntentActions;
179 public static String convertArrayToString(long[] list) { in convertArrayToString() argument
180 if (list == null || list.length == 0) return ""; in convertArrayToString()
181 return Arrays.toString(list).replace("[", "").replace("]", ""); in convertArrayToString()
268 final List<String> list = new ArrayList<>(); in clearEmptyString() local
271 list.add(s); in clearEmptyString()
274 return list.toArray(new String[list.size()]); in clearEmptyString()
278 final List<Integer> list = new ArrayList<>(); in clearZeros() local
281 list.add(n); in clearZeros()
[all …]
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DRecurrenceSetTest.java115 List<ICalendar.Property> list = component.getProperties("DTSTART"); in testRRULEfolding() local
116 assertTrue(list.size() == 1); in testRRULEfolding()
117 assertEquals("19700101T000000Z", list.get(0).getValue()); in testRRULEfolding()
119 list = component.getProperties("RRULE"); in testRRULEfolding()
120 assertTrue(list.size() == 1); in testRRULEfolding()
121 assertEquals(RRULE_LESS_THAN_75_CHARS,list.get(0).getValue()); in testRRULEfolding()
132 list = component.getProperties("RRULE"); in testRRULEfolding()
133 assertTrue(list.size() == 1); in testRRULEfolding()
134 assertEquals(RRULE_MORE_THAN_75_CHARS_FOLDED, list.get(0).getValue()); in testRRULEfolding()
145 list = component.getProperties("RRULE"); in testRRULEfolding()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DScanDetailCache.java121 ArrayList<ScanDetail> list = new ArrayList<ScanDetail>(mMap.values()); in trim() local
122 if (list.size() != 0) { in trim()
124 Collections.sort(list, new Comparator() { in trim()
140 ScanDetail result = list.get(i); in trim()
149 ArrayList<ScanDetail> list = sort(); in getMostRecentScanResult() local
150 if (list.size() == 0) { in getMostRecentScanResult()
153 return list.get(0).getScanResult(); in getMostRecentScanResult()
162 ArrayList<ScanDetail> list = new ArrayList<ScanDetail>(mMap.values()); in sort() local
163 if (list.size() != 0) { in sort()
164 Collections.sort(list, new Comparator() { in sort()
[all …]
/packages/modules/Telephony/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/
DQnsMetricsTest.java106 List<Integer> list = new ArrayList<>(); in sendQualifiedNetworksMessage() local
107 list.add(accessNetworkType); in sendQualifiedNetworksMessage()
110 list, in sendQualifiedNetworksMessage()
351 List<AtomsQualifiedRatListChangedInfo> list = capture.getAllValues(); in testAtomsQualifiedRatListChangedInfo() local
352 mQnsMetrics.log("QnsMetricsTest QualifiedRat atom[0]:" + list.get(0)); in testAtomsQualifiedRatListChangedInfo()
353 mQnsMetrics.log("QnsMetricsTest QualifiedRat atom[1]:" + list.get(1)); in testAtomsQualifiedRatListChangedInfo()
356 list.get(0).getFirstQualifiedRat()); in testAtomsQualifiedRatListChangedInfo()
358 AccessNetworkConstants.AccessNetworkType.IWLAN, list.get(1).getFirstQualifiedRat()); in testAtomsQualifiedRatListChangedInfo()
363 assertEquals(expectedRestriction, list.get(0).getRestrictionsOnWlan()); in testAtomsQualifiedRatListChangedInfo()
364 assertEquals(expectedRestriction, list.get(1).getRestrictionsOnWwan()); in testAtomsQualifiedRatListChangedInfo()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/store/imap/
DImapUtility.java63 ArrayList<String> list = new ArrayList<String>(); in getImapSequenceValues() local
71 list.add(item); in getImapSequenceValues()
78 list.add(rangeItem); in getImapSequenceValues()
83 String[] stringList = new String[list.size()]; in getImapSequenceValues()
84 return list.toArray(stringList); in getImapSequenceValues()
98 ArrayList<String> list = new ArrayList<String>(); in getImapRangeValues() local
107 list.add(Integer.toString(i)); in getImapRangeValues()
111 list.add(Integer.toString(i)); in getImapRangeValues()
119 String[] stringList = new String[list.size()]; in getImapRangeValues()
120 return list.toArray(stringList); in getImapRangeValues()
DImapList.java38 private ArrayList<ImapElement> list = new ArrayList<ImapElement>(); field in ImapList
44 list.add(e); in add()
58 return list.size(); in size()
87 return (index >= list.size()) ? ImapElement.NONE : list.get(index); in getElementOrNone()
115 return list.get(i); in getKeyedElementOrNull()
165 if (list != null) { in destroy()
166 for (ImapElement e : list) { in destroy()
169 list = null; in destroy()
176 return list.toString(); in toString()
195 for (int i = 0; i < list.size(); i++) { in flatten()
[all …]

12345678910>>...52