/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
D | GapWorkerTest.java | 84 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/ |
D | Events.java | 110 public static void writeEvent(Context context, int tag, Object... list) { in writeEvent() argument 113 if (list != null && list.length > 0) { in writeEvent() 119 (Boolean) list[1] ? 1 : 0); in writeEvent() 120 sb.append(SHOW_REASONS[(Integer) list[0]]).append(" keyguard=").append(list[1]); in writeEvent() 124 (Boolean) list[0]); in writeEvent() 125 sb.append(list[0]); in writeEvent() 129 sb.append(DISMISS_REASONS[(Integer) list[0]]); in writeEvent() 133 (Integer) list[0]); in writeEvent() 134 sb.append(AudioSystem.streamToString((Integer) list[0])); in writeEvent() 138 (Integer) list[1]); in writeEvent() [all …]
|
/frameworks/support/paging/common/src/test/java/android/arch/paging/ |
D | NullPaddedListTest.java | 36 NullPaddedList<String> list = new NullPaddedList<>( in simple() local 39 assertNull(list.get(0)); in simple() 40 assertNull(list.get(1)); in simple() 41 assertSame(data.get(2), list.get(2)); in simple() 42 assertSame(data.get(3), list.get(3)); in simple() 43 assertNull(list.get(4)); in simple() 44 assertNull(list.get(5)); in simple() 46 assertEquals(6, list.size()); in simple() 47 assertEquals(2, list.getLeadingNullCount()); in simple() 48 assertEquals(2, list.getTrailingNullCount()); in simple() [all …]
|
D | PageArrayListTest.java | 33 PageArrayList<String> list = new PageArrayList<>(2, data.size()); in simple() local 35 assertEquals(2, list.mPageSize); in simple() 36 assertEquals(data.size(), list.size()); in simple() 37 assertEquals(3, list.mMaxPageCount); in simple() 40 assertEquals(null, list.get(i)); in simple() 42 for (int i = 0; i < data.size(); i += list.mPageSize) { in simple() 43 list.mPages.add(data.subList(i, i + 2)); in simple() 46 assertEquals(data.get(i), list.get(i)); in simple()
|
/frameworks/base/core/java/android/hardware/camera2/utils/ |
D | ListUtils.java | 30 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 …]
|
D | ArrayUtils.java | 78 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/ |
D | MediaInserter.java | 58 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/services/core/jni/ |
D | com_android_server_HardwarePropertiesManagerService.cpp | 128 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/support/paging/common/src/main/java/android/arch/paging/ |
D | KeyedDataSource.java | 123 List<Value> list; in loadInitialInternal() local 126 list = loadInitial(initialLoadSize); in loadInitialInternal() 127 if (list == null) { in loadInitialInternal() 152 list = new ArrayList<>(); in loadInitialInternal() 153 list.addAll(before); in loadInitialInternal() 155 Collections.reverse(list); in loadInitialInternal() 156 list.addAll(after); in loadInitialInternal() 160 list = loadInitial(initialLoadSize); in loadInitialInternal() 161 if (list == null) { in loadInitialInternal() 167 if (list.isEmpty()) { in loadInitialInternal() [all …]
|
D | NullPaddedList.java | 61 NullPaddedList(int leadingNullCount, List<Type> list, int trailingNullCount) { in NullPaddedList() argument 65 if (list == null) { in NullPaddedList() 68 mList = list; in NullPaddedList() 73 NullPaddedList(int leadingNullCount, int totalCount, List<Type> list) { in NullPaddedList() argument 74 if (list == null) { in NullPaddedList() 78 int trailingNullCount = totalCount - (leadingNullCount) - list.size(); in NullPaddedList() 80 mList = list; in NullPaddedList() 85 NullPaddedList(int positionOffset, List<Type> list) { in NullPaddedList() argument 86 if (list == null) { in NullPaddedList() 90 mList = list; in NullPaddedList()
|
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/ |
D | OpReorderer.java | 45 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/java/com/android/internal/widget/ |
D | OpReorderer.java | 45 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/ |
D | AidlTest.java | 113 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/ |
D | GenericAdapter.java | 30 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/base/core/tests/coretests/src/android/content/pm/ |
D | ParceledListSliceTest.java | 16 List<SmallObject> list = new ArrayList<SmallObject>(); in testSmallList() local 18 list.add(new SmallObject(i * 2, (i * 2) + 1)); in testSmallList() 25 parcel.writeParcelable(new ParceledListSlice<SmallObject>(list), 0); in testSmallList() 61 List<LargeObject> list = new ArrayList<LargeObject>(); in testLargeList() local 63 list.add(new LargeObject( in testLargeList() 76 parcel.writeParcelable(new ParceledListSlice<LargeObject>(list), 0); in testLargeList() 96 private void sendParcelStringList(List<String> list) { in sendParcelStringList() argument 101 parcel.writeParcelable(new StringParceledListSlice(list), 0); in sendParcelStringList() 110 assertEquals(list, slice.getList()); in sendParcelStringList() 115 List<String> list = new ArrayList<String>(); in testStringList() local [all …]
|
/frameworks/av/media/libstagefright/codec2/include/ |
D | C2Work.h | 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>>> preChainInfoBlo… 146 std::list<std::unique_ptr<C2Worklet>> worklets; 155 std::list<node_id> chain;
|
/frameworks/native/opengl/tests/hwc/ |
D | hwcTestLib.cpp | 406 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/ |
D | HandlerThread_Delegate.java | 42 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/services/tests/servicestests/src/com/android/server/pm/ |
D | ShortcutManagerTest3.java | 19 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 …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
D | HistoryEvaluator.java | 56 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/data-binding/extensions/library/src/main/java/android/databinding/ |
D | ListChangeRegistry.java | 68 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()
|
D | ViewDataBinding.java | 814 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/support/room/integration-tests/testapp/src/androidTest/java/android/arch/persistence/room/integration/testapp/test/ |
D | QueryDataSourceTest.java | 136 List<User> list = new ArrayList<>(); in verifyUserDataSource() local 157 list.add(initial.get(i)); in verifyUserDataSource() 160 assertArrayEquals(Arrays.copyOfRange(expected, 15, 25), list.toArray()); in verifyUserDataSource() 161 List<User> p = dataSource.loadAfter(24, list.get(list.size() - 1), 10); in verifyUserDataSource() 163 list.addAll(p); in verifyUserDataSource() 165 assertArrayEquals(Arrays.copyOfRange(expected, 15, 35), list.toArray()); in verifyUserDataSource() 167 p = dataSource.loadBefore(15, list.get(0), 10); in verifyUserDataSource() 170 list.add(0, u); in verifyUserDataSource() 173 assertArrayEquals(Arrays.copyOfRange(expected, 5, 35), list.toArray()); in verifyUserDataSource() 175 p = dataSource.loadBefore(5, list.get(0), 10); in verifyUserDataSource() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListViewHeightTest.java | 56 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/ |
D | Size.java | 40 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()
|