/frameworks/base/core/java/android/hardware/camera2/utils/ |
H A D | ListUtils.java | 22 * Various assortment of list utilities. 24 * <p>Using a {@code null} list is supported and will almost always return the default value 29 /** Return {@code} true if the {@code list} contains the {@code needle}. */ 30 public static <T> boolean listContains(List<T> list, T needle) { argument 31 if (list == null) { 34 return list.contains(needle); 39 * Return {@code true} if the {@code list} is only a single element equal to 42 public static <T> boolean listElementsEqualTo(List<T> list, T single) { argument 43 if (list == null) { 47 return (list 53 listToString(List<T> list) argument 87 listSelectFirstFrom(List<T> list, T[] choices) argument [all...] |
H A D | ArrayUtils.java | 71 * @param list Source list of strings 72 * @param convertFrom Conversion list of strings 73 * @param convertTo Conversion list of ints 75 * or {@code null} if {@code list} was {@code null} 78 List<String> list, String[] convertFrom, int[] convertTo) { 79 if (list == null) { 83 List<Integer> convertedList = convertStringListToIntList(list, convertFrom, convertTo); 101 * @param list Source list o 77 convertStringListToIntArray( List<String> list, String[] convertFrom, int[] convertTo) argument 107 convertStringListToIntList( List<String> list, String[] convertFrom, int[] convertTo) argument 144 toIntArray(List<Integer> list) argument [all...] |
/frameworks/compile/slang/ |
H A D | slang_pragma_list.h | 20 #include <list> 26 typedef std::list< std::pair<std::string, std::string> > PragmaList;
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
H A D | Events.java | 108 public static void writeEvent(Context context, int tag, Object... list) { argument 111 if (list != null && list.length > 0) { 117 (Boolean) list[1] ? 1 : 0); 118 sb.append(SHOW_REASONS[(Integer) list[0]]).append(" keyguard=").append(list[1]); 122 (Boolean) list[0]); 123 sb.append(list[0]); 127 sb.append(DISMISS_REASONS[(Integer) list[0]]); 131 (Integer) list[ 215 writeEvent(long time, int tag, Object[] list) argument [all...] |
/frameworks/base/core/java/com/google/android/collect/ |
H A D | Lists.java | 47 * <p>{@code List<Base> list = Lists.newArrayList(sub1, sub2);} 53 * <p>{@code List<Base> list = Lists.<Base>newArrayList(sub1, sub2);} 55 * @param elements the elements that the list should contain, in order 60 ArrayList<E> list = new ArrayList<E>(capacity); 61 Collections.addAll(list, elements); 62 return list;
|
/frameworks/base/media/java/android/media/ |
H A D | MediaInserter.java | 58 List<ContentValues> list = rowmap.get(tableUri); 59 if (list == null) { 60 list = new ArrayList<ContentValues>(); 61 rowmap.put(tableUri, list); 63 list.add(new ContentValues(values)); 64 if (list.size() >= mBufferSizePerUri) { 66 flush(tableUri, list); 73 List<ContentValues> list = mRowMap.get(tableUri); 74 flush(tableUri, list); 81 List<ContentValues> list 87 flush(Uri tableUri, List<ContentValues> list) argument [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/os/ |
H A D | HandlerThread_Delegate.java | 42 List<HandlerThread> list = sThreads.get(context); 43 if (list != null) { 44 for (HandlerThread thread : list) { 48 list.clear(); 59 List<HandlerThread> list = sThreads.get(context); 60 if (list == null) { 61 list = new ArrayList<HandlerThread>(); 62 sThreads.put(context, list); 65 list.add(theThread);
|
/frameworks/data-binding/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/ |
H A D | GenericAdapter.java | 30 public static <T> void setListText(TextView view, List<T> list) { argument 31 setText(view, list); 35 public static <T> void setCollectionText(TextView view, Collection<T> list) { argument 36 setText(view, list); 45 public static <T> void setListAndArray(TextView view, List<T> list, T[] values) { argument 46 setText(view, list); 49 @BindingAdapter("list") 54 @BindingAdapter({"list", "array"}) 55 public static <T> void setGenericListAndArray(GenericView<T> view, List<T> list, T[] values) { argument 56 view.setList(list); 60 setGenericList(TextView view, List<String> list) argument 65 setGenericIntegerList(TextView view, List<Integer> list) argument [all...] |
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
H A D | ListViewHeightTest.java | 56 ListView list = (ListView) mActivity.findViewById(R.id.inner_list); 57 assertEquals("Unexpected items in adapter", 0, list.getCount()); 58 assertEquals("Unexpected children in list view", 0, list.getChildCount()); 66 assertTrue("List not be visible after clicking button1", list.isShown()); 67 assertTrue("List incorrect height", list.getHeight() == 200); 75 assertTrue("List not be visible after clicking button2", list.isShown()); 83 assertFalse("List should not be visible clicking button3", list.isShown());
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
H A D | HistoryEvaluator.java | 54 private float weightedAverage(ArrayList<Data> list) { argument 57 int size = list.size(); 59 Data data = list.get(i); 83 private void decayValue(ArrayList<Data> list, float factor) { argument 84 int size = list.size(); 86 list.get(i).weight *= factor; 90 while (!list.isEmpty() && isZero(list.get(0).weight)) { 91 list.remove(0);
|
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/ |
H A D | MotionStatsAggregator.java | 27 String [] list = new String[1]; 28 list[0] = CURRENT_MOTION; 29 return list;
|
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/ |
H A D | OpReorderer.java | 37 // we push them to the end of the list so that they can be handled easily. 44 private void swapMoveOp(List<UpdateOp> list, int badMove, int next) { argument 45 final UpdateOp moveOp = list.get(badMove); 46 final UpdateOp nextOp = list.get(next); 49 swapMoveRemove(list, badMove, moveOp, next, nextOp); 52 swapMoveAdd(list, badMove, moveOp, next, nextOp); 55 swapMoveUpdate(list, badMove, moveOp, next, nextOp); 60 void swapMoveRemove(List<UpdateOp> list, int movePos, UpdateOp moveOp, argument 90 list.remove(removePos); 109 list 159 swapMoveAdd(List<UpdateOp> list, int move, UpdateOp moveOp, int add, UpdateOp addOp) argument 180 swapMoveUpdate(List<UpdateOp> list, int move, UpdateOp moveOp, int update, UpdateOp updateOp) argument 217 getLastMoveOutOfOrder(List<UpdateOp> list) argument [all...] |
/frameworks/base/services/core/jni/ |
H A D | com_android_server_HardwarePropertiesManagerService.cpp | 66 cooling_device_t *list = (cooling_device_t *) local 68 ssize_t size = gThermalModule->getCoolingDevices(gThermalModule, list, list_size); 75 values[i] = list[i].current_value; 80 free(list); 84 free(list); 97 temperature_t *list = (temperature_t *) malloc(list_size * sizeof(temperature_t)); local 98 ssize_t size = gThermalModule->getTemperatures(gThermalModule, list, list_size); 108 if (list[i].type == type) { 111 if (list[i].current_value == UNKNOWN_TEMPERATURE) { 114 values[length++] = list[ 158 cpu_usage_t *list = (cpu_usage_t *) malloc(size * sizeof(cpu_usage_t)); local [all...] |
H A D | com_android_server_am_BatteryStatsService.cpp | 180 power_state_platform_sleep_state_t *list; local 209 list = (power_state_platform_sleep_state_t *)calloc(num_modes, 211 if (!list) { 225 list[i].voters = (power_state_voter_t *)calloc(voter_list[i], 227 if (!list[i].voters) { 233 if (!gPowerModule->get_platform_low_power_stats(gPowerModule, list)) { 239 i + 1, list[i].name, list[i].residency_in_msec_since_boot, 240 list[i].total_transitions); 251 for (unsigned int j = 0; j < list[ [all...] |
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/ |
H A D | GenericAdapterTest.java | 36 List<String> list = Arrays.asList(arr); 37 getBinder().setList(list); 44 assertEquals(list, getBinder().view5.getList()); 45 assertEquals(list, getBinder().view6.getList());
|
/frameworks/data-binding/extensions/library/src/main/java/android/databinding/ |
H A D | ListChangeRegistry.java | 64 * Notify registered callbacks that there was an unknown or whole-list change. 66 * @param list The list that changed. 68 public void notifyChanged(ObservableList list) { argument 69 notifyCallbacks(list, ALL, null); 75 * @param list The list that changed. 79 public void notifyChanged(ObservableList list, int start, int count) { argument 81 notifyCallbacks(list, CHANGED, listChanges); 87 * @param list Th 91 notifyInserted(ObservableList list, int start, int count) argument 104 notifyMoved(ObservableList list, int from, int to, int count) argument 116 notifyRemoved(ObservableList list, int start, int count) argument [all...] |
/frameworks/compile/libbcc/include/bcc/Renderscript/ |
H A D | RSCompilerDriver.h | 25 #include <list> 154 const std::list<std::list<std::pair<int, int>>>& toFuse, 155 const std::list<std::string>& fused, 156 const std::list<std::list<std::pair<int, int>>>& invokes, 157 const std::list<std::string>& invokeBatchNames);
|
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/ |
H A D | Size.java | 33 * An helper method to build a list of this class from a list of 37 * @return The built list. 40 ArrayList<Size> list = new ArrayList<Size>(cameraSizes.size()); 42 list.add(new Size(cameraSize)); 44 return list; 48 * A helper method to build a list of this class from a list of {@link android.util.Size}. 51 * @return The built list. 54 ArrayList<Size> list [all...] |
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | TransparentListActivity.java | 87 ListView list = (ListView) findViewById(R.id.list); 88 list.setAdapter(adapter); 89 list.setCacheColorHint(0); 90 list.setVerticalFadingEdgeEnabled(true); 92 registerForContextMenu(list);
|
H A D | ViewLayersActivity3.java | 42 final ListView list = (ListView) findViewById(listId); 43 list.setAdapter(new SimpleListAdapter(this)); 44 list.setLayerType(View.LAYER_TYPE_HARDWARE, null); 45 ((View) list.getParent()).setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
/frameworks/base/tools/aapt2/util/ |
H A D | ImmutableMap.h | 47 std::initializer_list<std::pair<TKey, TValue>> list) { 48 return ImmutableMap(std::vector<std::pair<TKey, TValue>>(list.begin(), list.end())); 52 std::initializer_list<std::pair<TKey, TValue>> list) { 53 std::vector<std::pair<TKey, TValue>> data(list.begin(), list.end()); 46 createPreSorted( std::initializer_list<std::pair<TKey, TValue>> list) argument 51 createAndSort( std::initializer_list<std::pair<TKey, TValue>> list) argument
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
H A D | Config.java | 58 List<String> list = new ArrayList<String>(4); 61 list.add(GINGERBREAD_DIR); 65 list.add(JELLYBEAN_DIR); 69 list.add(KITKAT_DIR); 71 list.add(DEFAULT_RESOURCE_DIR); 73 return Collections.unmodifiableList(list);
|
/frameworks/base/core/tests/coretests/src/android/os/ |
H A D | AidlTest.java | 113 public TestParcelable listParcelableLonger(List<TestParcelable> list, int index) { argument 114 list.add(list.get(index)); 115 return list.get(index); 118 public int listParcelableShorter(List<TestParcelable> list, int index) { argument 119 list.remove(index); 120 return list.size(); 241 List<TestParcelable> list = Lists.newArrayList(); 242 list.add(new TestParcelable(33, "asdf")); 243 list [all...] |
/frameworks/compile/libbcc/lib/Renderscript/ |
H A D | RSIsThreadablePass.cpp | 81 bool isPresent(std::vector<std::string> &list, std::string name) { argument 82 auto lower = std::lower_bound(list.begin(), 83 list.end(), 86 if (lower != list.end() && name.compare(*lower) == 0)
|
H A D | RSScreenFunctionsPass.cpp | 39 bool isPresent(std::vector<std::string> &list, std::string name) { argument 40 auto lower = std::lower_bound(list.begin(), 41 list.end(), 44 if (lower != list.end() && name.compare(*lower) == 0)
|