Home
last modified time | relevance | path

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

12345678910>>...27

/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DEvents.java128 public static void writeEvent(Context context, int tag, Object... list) { in writeEvent() argument
132 if (list != null && list.length > 0) { in writeEvent()
138 (Boolean) list[1] ? 1 : 0); in writeEvent()
139 sb.append(SHOW_REASONS[(Integer) list[0]]).append(" keyguard=").append(list[1]); in writeEvent()
143 (Boolean) list[0]); in writeEvent()
144 sb.append(list[0]); in writeEvent()
148 sb.append(DISMISS_REASONS[(Integer) list[0]]); in writeEvent()
152 (Integer) list[0]); in writeEvent()
153 sb.append(AudioSystem.streamToString((Integer) list[0])); in writeEvent()
157 (Integer) list[0]); in writeEvent()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/p2p/
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 …]
DWifiP2pGroupListTest.java72 WifiP2pGroupList list = new WifiP2pGroupList(); in testListOperations() local
73 list.add(mTestGroup1); in testListOperations()
74 list.add(mTestGroup2); in testListOperations()
75 list.add(mTestGroup3); in testListOperations()
76 list.add(mTestGroup4); in testListOperations()
77 assertEquals(4, list.getGroupList().size()); in testListOperations()
81 list.getNetworkId(TEST_GROUP_OWNER_2.deviceAddress)); in testListOperations()
83 list.getOwnerAddr(mTestGroup2.getNetworkId())); in testListOperations()
85 assertEquals(-1, list.getNetworkId(TEST_GROUP_OWNER_OTHER.deviceAddress)); in testListOperations()
88 list.getNetworkId(TEST_GROUP_OWNER_1.deviceAddress)); in testListOperations()
[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.cpp128 hidl_vec<CoolingDevice> list; in nativeGetFanSpeeds() local
130 [&list](ThermalStatus status, hidl_vec<CoolingDevice> devices) { in nativeGetFanSpeeds()
132 list = std::move(devices); in nativeGetFanSpeeds()
143 float values[list.size()]; in nativeGetFanSpeeds()
144 for (size_t i = 0; i < list.size(); ++i) { in nativeGetFanSpeeds()
145 values[i] = list[i].currentValue; in nativeGetFanSpeeds()
147 jfloatArray fanSpeeds = env->NewFloatArray(list.size()); in nativeGetFanSpeeds()
148 env->SetFloatArrayRegion(fanSpeeds, 0, list.size(), values); in nativeGetFanSpeeds()
160 hidl_vec<Temperature> list; in nativeGetDeviceTemperatures() local
162 [&list](ThermalStatus status, hidl_vec<Temperature> temperatures) { in nativeGetDeviceTemperatures()
[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/base/core/tests/coretests/src/android/os/
DAidlTest.java112 public TestParcelable listParcelableLonger(List<TestParcelable> list, int index) { in listParcelableLonger() argument
113 list.add(list.get(index)); in listParcelableLonger()
114 return list.get(index); in listParcelableLonger()
117 public int listParcelableShorter(List<TestParcelable> list, int index) { in listParcelableShorter() argument
118 list.remove(index); in listParcelableShorter()
119 return list.size(); in listParcelableShorter()
240 List<TestParcelable> list = Lists.newArrayList(); in testListParcelableLonger() local
241 list.add(new TestParcelable(33, "asdf")); in testListParcelableLonger()
242 list.add(new TestParcelable(34, "jkl;")); in testListParcelableLonger()
244 TestParcelable result = mRemote.listParcelableLonger(list, 1); in testListParcelableLonger()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
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/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/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/SystemUI/tests/src/com/android/keyguard/
DCarrierTextControllerTest.java140 List<SubscriptionInfo> list = new ArrayList<>(); in testAirplaneMode() local
141 list.add(TEST_SUBSCRIPTION); in testAirplaneMode()
142 when(mKeyguardUpdateMonitor.getFilteredSubscriptionInfo(anyBoolean())).thenReturn(list); in testAirplaneMode()
160 List<SubscriptionInfo> list = new ArrayList<>(); in testCardIOError() local
161 list.add(TEST_SUBSCRIPTION); in testCardIOError()
162 when(mKeyguardUpdateMonitor.getFilteredSubscriptionInfo(anyBoolean())).thenReturn(list); in testCardIOError()
256 List<SubscriptionInfo> list = new ArrayList<>(); in testCreateInfo_OneValidSubscription() local
257 list.add(TEST_SUBSCRIPTION); in testCreateInfo_OneValidSubscription()
259 when(mKeyguardUpdateMonitor.getFilteredSubscriptionInfo(anyBoolean())).thenReturn(list); in testCreateInfo_OneValidSubscription()
280 List<SubscriptionInfo> list = new ArrayList<>(); in testCreateInfo_OneValidSubscriptionWithRoaming() local
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/om/
DOverlayManagerSettingsTests.java163 List<OverlayInfo> list = map.get(OVERLAY_A0.targetPackageName); in testGetOverlaysForUser() local
164 assertEquals(2, list.size()); in testGetOverlaysForUser()
165 assertTrue(list.contains(OVERLAY_A0)); in testGetOverlaysForUser()
166 assertTrue(list.contains(OVERLAY_B0)); in testGetOverlaysForUser()
198 List<OverlayInfo> list = in testOrderOfNewlyAddedItems() local
200 assertListsAreEqual(list, OVERLAY_A0, OVERLAY_B0, OVERLAY_C0); in testOrderOfNewlyAddedItems()
206 list = mSettings.getOverlaysForTarget(OVERLAY_A0.targetPackageName, OVERLAY_A0.userId); in testOrderOfNewlyAddedItems()
207 assertListsAreEqual(list, OVERLAY_A0, oi, OVERLAY_C0); in testOrderOfNewlyAddedItems()
216 List<OverlayInfo> list = in testSetPriority() local
218 assertListsAreEqual(list, OVERLAY_A0, OVERLAY_B0, OVERLAY_C0); in testSetPriority()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DShortcutManagerTest3.java19 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list;
81 mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
88 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
97 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
107 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
116 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
128 assertTrue(mManager.setDynamicShortcuts(list( in testSetDynamicShortcuts_noManifestShortcuts()
143 assertTrue(mManager.setDynamicShortcuts(list())); in testSetDynamicShortcuts_noManifestShortcuts()
176 mManager.addDynamicShortcuts(list( in testAddDynamicShortcuts_noManifestShortcuts()
185 mManager.addDynamicShortcuts(list( in testAddDynamicShortcuts_noManifestShortcuts()
[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/cmds/incidentd/tests/
DPrivacyFilter_test.cpp84 Privacy* list[size + 1];
85 list[0] = privacy;
90 list[i] = pPrivacyFilter
93 list[size] = NULL;
94 assertStrip(privacyPolicy, expected, create_message_privacy(300, list));
235 Privacy* list[] = {create_privacy(1, OTHER_TYPE, PRIVACY_POLICY_LOCAL), NULL};
237 assertStripByFields(PRIVACY_POLICY_EXPLICIT, expected, 1, create_message_privacy(5, list));
242 Privacy* list[] = {create_privacy(1, OTHER_TYPE, PRIVACY_POLICY_LOCAL), NULL};
246 create_message_privacy(5, list));
252 Privacy* list[] = {create_privacy(1, OTHER_TYPE, PRIVACY_POLICY_LOCAL), NULL};
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DScanDetailCache.java119 ArrayList<ScanDetail> list = new ArrayList<ScanDetail>(mMap.values()); in trim() local
120 if (list.size() != 0) { in trim()
122 Collections.sort(list, new Comparator() { in trim()
138 ScanDetail result = list.get(i); in trim()
145 ArrayList<ScanDetail> list = new ArrayList<ScanDetail>(mMap.values()); in sort() local
146 if (list.size() != 0) { in sort()
147 Collections.sort(list, new Comparator() { in sort()
167 return list; in sort()
175 ArrayList<ScanDetail> list = sort(); in toString() local
177 if (list.size() > 0) { in toString()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DBroadcastDispatcher.java268 private static int pendingInDeferralsList(ArrayList<Deferrals> list) { in pendingInDeferralsList() argument
270 final int numEntries = list.size(); in pendingInDeferralsList()
272 pending += list.get(i).size(); in pendingInDeferralsList()
277 private static boolean isDeferralsListEmpty(ArrayList<Deferrals> list) { in isDeferralsListEmpty() argument
278 return pendingInDeferralsList(list) == 0; in isDeferralsListEmpty()
329 private BroadcastRecord replaceDeferredBroadcastLocked(ArrayList<Deferrals> list, in replaceDeferredBroadcastLocked() argument
332 final int numEntries = list.size(); in replaceDeferredBroadcastLocked()
334 final Deferrals d = list.get(i); in replaceDeferredBroadcastLocked()
343 private BroadcastRecord replaceBroadcastLocked(ArrayList<BroadcastRecord> list, in replaceBroadcastLocked() argument
349 for (int i = list.size() - 1; i >= 0; i--) { in replaceBroadcastLocked()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/
DGlobalActionsGridLayout.java83 ListGridLayout list = getListView(); in removeAllListViews() local
84 if (list != null) { in removeAllListViews()
85 list.removeAllItems(); in removeAllListViews()
91 ListGridLayout list = getListView(); in addToListView() local
92 if (list != null) { in addToListView()
93 list.addItem(v); in addToListView()
100 ListGridLayout list = getListView(); in removeAllItems() local
104 if (list != null) { in removeAllItems()
105 list.removeAllItems(); in removeAllItems()
/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/base/media/java/android/mtp/
DMtpPropertyGroup.java173 MtpStorageManager.MtpObject object, MtpPropertyList list) { in getPropertyList() argument
198 list.append(id, property.code, property.type, 0); in getPropertyList()
203 list.append(id, property.code, object.getName()); in getPropertyList()
208 list.append(id, property.code, in getPropertyList()
212 list.append(id, property.code, property.type, object.getStorageId()); in getPropertyList()
215 list.append(id, property.code, property.type, object.getFormat()); in getPropertyList()
218 list.append(id, property.code, property.type, object.getSize()); in getPropertyList()
221 list.append(id, property.code, property.type, in getPropertyList()
229 list.append(id, property.code, property.type, puid); in getPropertyList()
237 list.append(id, property.code, dateTime); in getPropertyList()
[all …]
/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/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DConfig.java71 List<String> list = new ArrayList<String>(10); in getResourceDirs() local
74 list.add(GINGERBREAD_DIR); in getResourceDirs()
78 list.add(JELLYBEAN_DIR); in getResourceDirs()
82 list.add(KITKAT_DIR); in getResourceDirs()
86 list.add(LOLLIPOP_DIR); in getResourceDirs()
89 list.addAll(sDefaultResourceDir); in getResourceDirs()
91 return Collections.unmodifiableList(list); in getResourceDirs()

12345678910>>...27