/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | ArrayUtils.java | 60 public static boolean isEmpty(@Nullable Collection<?> array) { in isEmpty() argument 61 return array == null || array.isEmpty(); in isEmpty() 67 public static <T> boolean isEmpty(@Nullable T[] array) { in isEmpty() argument 68 return array == null || array.length == 0; in isEmpty() 74 public static boolean isEmpty(@Nullable int[] array) { in isEmpty() argument 75 return array == null || array.length == 0; in isEmpty() 81 public static boolean isEmpty(@Nullable long[] array) { in isEmpty() argument 82 return array == null || array.length == 0; in isEmpty() 88 public static boolean isEmpty(@Nullable byte[] array) { in isEmpty() argument 89 return array == null || array.length == 0; in isEmpty() [all …]
|
/packages/modules/Wifi/framework/java/android/net/wifi/aware/ |
D | TlvBufferUtils.java | 109 public TlvConstructor wrap(@Nullable byte[] array) { in wrap() argument 110 mArray = array; in wrap() 111 mArrayLength = (array == null) ? 0 : array.length; in wrap() 197 public TlvConstructor putByteArray(int type, @Nullable byte[] array, int offset, in putByteArray() argument 202 System.arraycopy(array, offset, mArray, mPosition, length); in putByteArray() 218 public TlvConstructor putByteArray(int type, @Nullable byte[] array) { in putByteArray() argument 219 return putByteArray(type, array, 0, (array == null) ? 0 : array.length); in putByteArray() 229 public TlvConstructor putRawByteArray(@Nullable byte[] array) { in putRawByteArray() argument 230 if (array == null) return this; in putRawByteArray() 232 checkRawLength(array.length); in putRawByteArray() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
D | ResourceUtilsTests.java | 51 final String[] array = { in testFindConstantForKeyValuePairsSimple() local 61 assertEquals("0.3", ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 63 assertEquals("0.4", ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 65 assertEquals("0.2", ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 69 assertNull(ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 73 assertNull(ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 75 assertNull(ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsSimple() 77 assertNull(ResourceUtils.findConstantForKeyValuePairs(emptyKeyValue, array)); in testFindConstantForKeyValuePairsSimple() 85 final String[] array = { in testFindConstantForKeyValuePairsCombined() local 104 assertEquals("0.3", ResourceUtils.findConstantForKeyValuePairs(keyValues, array)); in testFindConstantForKeyValuePairsCombined() [all …]
|
D | CollectionUtilsTests.java | 51 final String[] array = { "0", "1" }; in testArrayAsListFailure() local 54 CollectionUtils.arrayAsList(array, -1, 1); in testArrayAsListFailure() 61 CollectionUtils.arrayAsList(array, 1, -1); in testArrayAsListFailure() 68 CollectionUtils.arrayAsList(array, 1, 3); in testArrayAsListFailure() 83 final String[] array = { "0", "1", "2", "3", "4" }; in testArrayAsList() local 84 assertEquals(empty, CollectionUtils.arrayAsList(array, 0, 0)); in testArrayAsList() 85 assertEquals(empty, CollectionUtils.arrayAsList(array, 1, 1)); in testArrayAsList() 86 assertEquals(empty, CollectionUtils.arrayAsList(array, array.length, array.length)); in testArrayAsList() 88 assertEquals(expected123, CollectionUtils.arrayAsList(array, 1, 4)); in testArrayAsList()
|
/packages/modules/Permission/service/java/com/android/permission/util/ |
D | ArrayUtils.java | 32 public static <T> boolean contains(@Nullable T[] array, T value) { in contains() argument 33 return indexOf(array, value) != -1; in contains() 43 public static <T> T firstOrNull(@Nullable T[] array) { in firstOrNull() argument 44 return !isEmpty(array) ? array[0] : null; in firstOrNull() 50 public static <T> int indexOf(@Nullable T[] array, T value) { in indexOf() argument 51 if (array == null) { in indexOf() 54 final int length = array.length; in indexOf() 56 final T element = array[i]; in indexOf() 67 public static <T> boolean isEmpty(@Nullable T[] array) { in isEmpty() argument 68 return array == null || array.length == 0; in isEmpty()
|
/packages/apps/DeskClock/src/com/android/deskclock/settings/ |
D | SimpleMenuPreference.kt | 111 array: Array<CharSequence>, in restoreOriginalOrder() 114 val item = array[0] in restoreOriginalOrder() 115 System.arraycopy(array, 1, array, 0, lastSelectedOriginalPosition) in restoreOriginalOrder() 116 array[lastSelectedOriginalPosition] = item in restoreOriginalOrder() 119 private fun swapSelectedToFront(array: Array<CharSequence>, position: Int) { in swapSelectedToFront() 120 val item = array[position] in swapSelectedToFront() 121 System.arraycopy(array, 0, array, 1, position) in swapSelectedToFront() 122 array[0] = item in swapSelectedToFront() 126 array: Array<CharSequence>, in setSelectedPosition() 130 val item = array[position] in setSelectedPosition() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/theme/base/impl/ |
D | AospThemeImpl.java | 53 TypedArray array = in AospThemeImpl() local 73 colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -1); in AospThemeImpl() 74 colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -1); in AospThemeImpl() 75 colorAccent = array.getColor(/* index= */ 2, /* defValue= */ -1); in AospThemeImpl() 76 textColorPrimary = array.getColor(/* index= */ 3, /* defValue= */ -1); in AospThemeImpl() 77 textColorSecondary = array.getColor(/* index= */ 4, /* defValue= */ -1); in AospThemeImpl() 78 textColorPrimaryInverse = array.getColor(/* index= */ 5, /* defValue= */ -1); in AospThemeImpl() 79 textColorHint = array.getColor(/* index= */ 6, /* defValue= */ -1); in AospThemeImpl() 80 colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1); in AospThemeImpl() 81 colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1); in AospThemeImpl() [all …]
|
/packages/apps/ThemePicker/src/com/android/customization/widget/ |
D | DynamicAdaptiveIconDrawable.java | 328 final ChildDrawable[] array = state.mChildren; in applyTheme() local 330 final ChildDrawable layer = array[i]; in applyTheme() 467 final ChildDrawable[] array = mLayerState.mChildren; in setHotspot() local 469 final Drawable dr = array[i].mDrawable; in setHotspot() 478 final ChildDrawable[] array = mLayerState.mChildren; in setHotspotBounds() local 480 final Drawable dr = array[i].mDrawable; in setHotspotBounds() 505 final ChildDrawable[] array = mLayerState.mChildren; in setVisible() local 508 final Drawable dr = array[i].mDrawable; in setVisible() 519 final ChildDrawable[] array = mLayerState.mChildren; in setDither() local 521 final Drawable dr = array[i].mDrawable; in setDither() [all …]
|
/packages/apps/Camera2/src/com/android/camera/settings/ |
D | Keys.java | 91 context.getResources().getIntArray(R.array.pref_countdown_duration)); in setDefaults() 95 context.getResources().getStringArray(R.array.camera_id_entryvalues)); in setDefaults() 99 context.getResources().getStringArray(R.array.pref_camera_scenemode_entryvalues)); in setDefaults() 103 context.getResources().getStringArray(R.array.pref_camera_flashmode_entryvalues)); in setDefaults() 107 context.getResources().getStringArray(R.array.pref_camera_hdr_supportmode_entryvalues)); in setDefaults() 116 context.getResources().getStringArray(R.array.pref_camera_focusmode_entryvalues)); in setDefaults() 130 context.getResources().getStringArray(R.array.pref_video_quality_entryvalues)); in setDefaults() 138 context.getResources().getStringArray(R.array.pref_video_quality_entryvalues)); in setDefaults() 147 R.array.pref_camera_jpeg_quality_entryvalues)); in setDefaults() 152 R.array.pref_camera_video_flashmode_entryvalues)); in setDefaults() [all …]
|
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/ |
D | ApfTest.java | 1184 assertPass(program, packet.array()); in testApfFilterIPv4() 1190 assertPass(program, packet.array()); in testApfFilterIPv4() 1194 assertDrop(program, packet.array()); in testApfFilterIPv4() 1196 assertDrop(program, packet.array()); in testApfFilterIPv4() 1200 assertDrop(program, packet.array()); in testApfFilterIPv4() 1202 assertDrop(program, packet.array()); in testApfFilterIPv4() 1204 assertDrop(program, packet.array()); in testApfFilterIPv4() 1206 assertDrop(program, packet.array()); in testApfFilterIPv4() 1208 assertDrop(program, packet.array()); in testApfFilterIPv4() 1210 assertDrop(program, packet.array()); in testApfFilterIPv4() [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | SparseArrayStream.java | 32 public static <E> IntStream keyStream(SparseArray<E> array) { in keyStream() argument 33 return IntStream.range(0, array.size()).map(array::keyAt); in keyStream() 36 public static <E> Stream<E> valueStream(SparseArray<E> array) { in valueStream() argument 37 return IntStream.range(0, array.size()).mapToObj(array::valueAt); in valueStream() 40 public static <E> Stream<Pair<Integer, E>> pairStream(SparseArray<E> array) { in pairStream() argument 41 return IntStream.range(0, array.size()).mapToObj( in pairStream() 42 i -> new Pair<>(array.keyAt(i), array.valueAt(i))); in pairStream()
|
D | CarServiceUtils.java | 158 final float[] array = new float[size]; in toFloatArray() local 160 array[i] = list.get(i); in toFloatArray() 162 return array; in toFloatArray() 167 final int[] array = new int[size]; in toIntArray() local 169 array[i] = list.get(i); in toIntArray() 171 return array; in toIntArray() 176 final byte[] array = new byte[size]; in toByteArray() 178 array[i] = list.get(i); in toByteArray() 180 return array; in toByteArray()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | SparseArrayStreamTest.java | 38 SparseArray<String> array = createSparseStringArray(); in testKeyStream() local 41 IntStream actual = SparseArrayStream.keyStream(array); in testKeyStream() 54 SparseArray<String> array = createSparseStringArray(); in testValueStream() local 57 Stream<String> actual = SparseArrayStream.valueStream(array); in testValueStream() 70 SparseArray<String> array = createSparseStringArray(); in testPairStream() local 74 Stream<Pair<Integer, String>> actual = SparseArrayStream.pairStream(array); in testPairStream() 86 SparseArray<String> array = new SparseArray<>(); in createSparseStringArray() local 87 array.put(5, "five"); in createSparseStringArray() 88 array.put(20, "twenty"); in createSparseStringArray() 89 array.put(1000, "thousand"); in createSparseStringArray() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/utils/ |
D | ArrayUtils.java | 35 public static <T> boolean isEmpty(@Nullable T[] array) { in isEmpty() argument 36 return array == null || array.length == 0; in isEmpty() 45 public static <T> boolean contains(T[] array, T value) { in contains() argument 46 return indexOf(array, value) != -1; in contains() 53 public static <T> int indexOf(T[] array, T value) { in indexOf() argument 54 if (array == null) return -1; in indexOf() 55 for (int i = 0; i < array.length; i++) { in indexOf() 56 if (Objects.equals(array[i], value)) return i; in indexOf()
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastChannelManager.java | 55 Arrays.asList(R.array.additional_cbs_channels_strings, 56 R.array.emergency_alerts_channels_range_strings, 57 R.array.cmas_presidential_alerts_channels_range_strings, 58 R.array.cmas_alert_extreme_channels_range_strings, 59 R.array.cmas_alerts_severe_range_strings, 60 R.array.cmas_amber_alerts_channels_range_strings, 61 R.array.required_monthly_test_range_strings, 62 R.array.exercise_alert_range_strings, 63 R.array.operator_defined_alert_range_strings, 64 R.array.etws_alerts_range_strings, [all …]
|
D | CellBroadcastConfigService.java | 246 R.array.cmas_presidential_alerts_channels_range_strings)); in enableCellBroadcastChannels() 251 R.array.cmas_alert_extreme_channels_range_strings)); in enableCellBroadcastChannels() 256 R.array.cmas_alerts_severe_range_strings)); in enableCellBroadcastChannels() 261 R.array.cmas_amber_alerts_channels_range_strings)); in enableCellBroadcastChannels() 266 R.array.required_monthly_test_range_strings)); in enableCellBroadcastChannels() 272 R.array.exercise_alert_range_strings)); in enableCellBroadcastChannels() 278 R.array.operator_defined_alert_range_strings)); in enableCellBroadcastChannels() 283 R.array.etws_alerts_range_strings)); in enableCellBroadcastChannels() 288 R.array.etws_test_alerts_range_strings)); in enableCellBroadcastChannels() 293 R.array.public_safety_messages_channels_range_strings)); in enableCellBroadcastChannels() [all …]
|
D | CellBroadcastResources.java | 317 R.array.cmas_presidential_alerts_channels_range_strings)) { in getSmsSenderAddressResource() 321 R.array.emergency_alerts_channels_range_strings)) { in getSmsSenderAddressResource() 325 R.array.public_safety_messages_channels_range_strings)) { in getSmsSenderAddressResource() 360 R.array.emergency_alerts_channels_range_strings)) { in getDialogTitleResource() 365 R.array.cmas_presidential_alerts_channels_range_strings)) { in getDialogTitleResource() 369 R.array.cmas_alert_extreme_channels_range_strings)) { in getDialogTitleResource() 383 R.array.cmas_alerts_severe_range_strings)) { in getDialogTitleResource() 387 R.array.cmas_amber_alerts_channels_range_strings)) { in getDialogTitleResource() 391 R.array.required_monthly_test_range_strings)) { in getDialogTitleResource() 395 R.array.exercise_alert_range_strings)) { in getDialogTitleResource() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/ |
D | ResizableIntArrayTests.java | 42 final int[] array = src.getPrimitiveArray(); in testNewInstance() local 44 assertNotNull("new instance array", array); in testNewInstance() 45 assertEquals("new instance array length", DEFAULT_CAPACITY, array.length); in testNewInstance() 51 final int[] array = src.getPrimitiveArray(); in testAdd() local 65 assertSame("array after add " + i, array, src.getPrimitiveArray()); in testAdd() 126 final int[] array = src.getPrimitiveArray(); in testReset() local 137 assertNotSame("array after reset", array, array2); in testReset() 158 final int[] array = src.getPrimitiveArray(); in testSetLength() local 169 assertNotSame("array after larger setLength", array, array2); in testSetLength() 216 final int[] array = dst.getPrimitiveArray(); in testCopy() local [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | jni_data_utils.h | 34 static void jintarrayToVector(JNIEnv *env, jintArray array, std::vector<int> *const outVector) { in jintarrayToVector() argument 35 if (!array) { in jintarrayToVector() 39 const jsize arrayLength = env->GetArrayLength(array); in jintarrayToVector() 41 env->GetIntArrayRegion(array, 0 /* start */, arrayLength, outVector->data()); in jintarrayToVector() 130 static void putBooleanToArray(JNIEnv *env, jbooleanArray array, const int index, in putBooleanToArray() argument 132 env->SetBooleanArrayRegion(array, index, 1 /* len */, &value); in putBooleanToArray() 135 static void putIntToArray(JNIEnv *env, jintArray array, const int index, const int value) { in putIntToArray() argument 136 env->SetIntArrayRegion(array, index, 1 /* len */, &value); in putIntToArray() 139 static void putFloatToArray(JNIEnv *env, jfloatArray array, const int index, in putFloatToArray() argument 141 env->SetFloatArrayRegion(array, index, 1 /* len */, &value); in putFloatToArray()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/ |
D | CropMath.java | 73 public static RectF trapToRect(float[] array) { in trapToRect() argument 76 for (int i = 1; i < array.length; i += 2) { in trapToRect() 77 float x = array[i - 1]; in trapToRect() 78 float y = array[i]; in trapToRect() 96 public static void getEdgePoints(RectF imageBound, float[] array) { in getEdgePoints() argument 97 if (array.length < 2) in getEdgePoints() 99 for (int x = 0; x < array.length; x += 2) { in getEdgePoints() 100 array[x] = GeometryMathUtils.clamp(array[x], imageBound.left, imageBound.right); in getEdgePoints() 101 array[x + 1] = GeometryMathUtils.clamp(array[x + 1], imageBound.top, imageBound.bottom); in getEdgePoints()
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | IntArray.java | 34 private IntArray(int[] array, int size) { in IntArray() argument 35 mValues = array; in IntArray() 61 public static IntArray wrap(int... array) { in wrap() argument 62 return new IntArray(array, array.length); in wrap() 254 int[] array = new int[tokenizer.countTokens()]; in fromConcatString() local 257 array[count] = Integer.parseInt(tokenizer.nextToken().trim()); in fromConcatString() 260 return new IntArray(array, array.length); in fromConcatString()
|
/packages/services/BuiltInPrintService/src/com/android/bips/render/ |
D | PdfRenderService.java | 249 byte[] array = mBuffer.array(); in writeRgb() 252 array[to] = array[from]; in writeRgb() 253 array[to + 1] = array[from + 1]; in writeRgb() 254 array[to + 2] = array[from + 2]; in writeRgb() 258 out.write(mBuffer.array(), 0, to); in writeRgb()
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | LongArray.java | 32 private LongArray(long[] array, int size) { in LongArray() argument 33 mValues = array; in LongArray() 34 mSize = checkArgumentInRange(size, 0, array.length, "size"); in LongArray() 59 public static LongArray wrap(long[] array) { in wrap() argument 60 return new LongArray(array, array.length); in wrap() 66 public static LongArray fromArray(long[] array, int size) { in fromArray() argument 67 return wrap(Arrays.copyOf(array, size)); in fromArray()
|
/packages/apps/Dialer/java/com/android/contacts/common/model/account/ |
D | AccountWithDataSet.java | 105 final String[] array = STRINGIFY_SEPARATOR_PAT.split(s, 3); in unstringify() local 106 if (array.length < 3) { in unstringify() 110 array[0], array[1], TextUtils.isEmpty(array[2]) ? null : array[2]); in unstringify() 138 final String[] array = ARRAY_STRINGIFY_SEPARATOR_PAT.split(s); in unstringifyList() local 140 for (int i = 0; i < array.length; i++) { in unstringifyList() 141 ret.add(unstringify(array[i])); in unstringifyList()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/notification/ |
D | NotificationVisibilityLogger.java | 129 private static void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) { in recycleAllVisibilityObjects() argument 130 for (int i = 0; i < array.size(); i++) { in recycleAllVisibilityObjects() 131 array.valueAt(i).recycle(); in recycleAllVisibilityObjects() 133 array.clear(); in recycleAllVisibilityObjects() 140 NotificationVisibility[] array = new NotificationVisibility[c.size()]; in cloneVisibilitiesAsArr() local 144 array[i] = nv.clone(); in cloneVisibilitiesAsArr() 148 return array; in cloneVisibilitiesAsArr()
|