Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 427) sorted by relevance

12345678910>>...18

/packages/apps/UnifiedEmail/src/org/apache/commons/io/
DFilenameUtils.java273 char[] array = new char[size + 2]; // +1 for possible extra slash, +2 for arraycopy in doNormalize() local
274 filename.getChars(0, filename.length(), array, 0); in doNormalize()
277 for (int i = 0; i < array.length; i++) { in doNormalize()
278 if (array[i] == OTHER_SEPARATOR) { in doNormalize()
279 array[i] = SYSTEM_SEPARATOR; in doNormalize()
285 if (array[size - 1] != SYSTEM_SEPARATOR) { in doNormalize()
286 array[size++] = SYSTEM_SEPARATOR; in doNormalize()
292 if (array[i] == SYSTEM_SEPARATOR && array[i - 1] == SYSTEM_SEPARATOR) { in doNormalize()
293 System.arraycopy(array, i, array, i - 1, size - i); in doNormalize()
301 if (array[i] == SYSTEM_SEPARATOR && array[i - 1] == '.' && in doNormalize()
[all …]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/
DResourceUtilsTests.java51 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 …]
DCollectionUtilsTests.java51 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/apps/Settings/src/com/android/settings/network/telephony/
DEnabledNetworkModePreferenceController.java143 R.array.enabled_networks_cdma_choices); in updatePreferenceEntries()
145 R.array.enabled_networks_cdma_values); in updatePreferenceEntries()
152 R.array.enabled_networks_cdma_no_lte_choices); in updatePreferenceEntries()
154 R.array.enabled_networks_cdma_no_lte_values); in updatePreferenceEntries()
161 R.array.enabled_networks_cdma_only_lte_choices); in updatePreferenceEntries()
163 R.array.enabled_networks_cdma_only_lte_values); in updatePreferenceEntries()
167 R.array.enabled_networks_cdma_choices); in updatePreferenceEntries()
169 R.array.enabled_networks_cdma_values); in updatePreferenceEntries()
177 R.array.enabled_networks_tdscdma_choices); in updatePreferenceEntries()
179 R.array.enabled_networks_tdscdma_values); in updatePreferenceEntries()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/
DEnabledNetworkModePreferenceController.java143 R.array.enabled_networks_cdma_choices); in updatePreferenceEntries()
145 R.array.enabled_networks_cdma_values); in updatePreferenceEntries()
152 R.array.enabled_networks_cdma_no_lte_choices); in updatePreferenceEntries()
154 R.array.enabled_networks_cdma_no_lte_values); in updatePreferenceEntries()
161 R.array.enabled_networks_cdma_only_lte_choices); in updatePreferenceEntries()
163 R.array.enabled_networks_cdma_only_lte_values); in updatePreferenceEntries()
167 R.array.enabled_networks_cdma_choices); in updatePreferenceEntries()
169 R.array.enabled_networks_cdma_values); in updatePreferenceEntries()
177 R.array.enabled_networks_tdscdma_choices); in updatePreferenceEntries()
179 R.array.enabled_networks_tdscdma_values); in updatePreferenceEntries()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/settings/
DSimpleMenuPreference.java62 private static void restoreOriginalOrder(CharSequence[] array, in restoreOriginalOrder() argument
64 final CharSequence item = array[0]; in restoreOriginalOrder()
65 System.arraycopy(array, 1, array, 0, lastSelectedOriginalPosition); in restoreOriginalOrder()
66 array[lastSelectedOriginalPosition] = item; in restoreOriginalOrder()
69 private static void swapSelectedToFront(CharSequence[] array, int position) { in swapSelectedToFront() argument
70 final CharSequence item = array[position]; in swapSelectedToFront()
71 System.arraycopy(array, 0, array, 1, position); in swapSelectedToFront()
72 array[0] = item; in swapSelectedToFront()
75 private static void setSelectedPosition(CharSequence[] array, int lastSelectedOriginalPosition, in setSelectedPosition() argument
77 final CharSequence item = array[position]; in setSelectedPosition()
[all …]
/packages/apps/ThemePicker/src/com/android/customization/widget/
DDynamicAdaptiveIconDrawable.java331 final ChildDrawable[] array = state.mChildren; in applyTheme() local
333 final ChildDrawable layer = array[i]; in applyTheme()
470 final ChildDrawable[] array = mLayerState.mChildren; in setHotspot() local
472 final Drawable dr = array[i].mDrawable; in setHotspot()
481 final ChildDrawable[] array = mLayerState.mChildren; in setHotspotBounds() local
483 final Drawable dr = array[i].mDrawable; in setHotspotBounds()
508 final ChildDrawable[] array = mLayerState.mChildren; in setVisible() local
511 final Drawable dr = array[i].mDrawable; in setVisible()
522 final ChildDrawable[] array = mLayerState.mChildren; in setDither() local
524 final Drawable dr = array[i].mDrawable; in setDither()
[all …]
/packages/apps/Dialer/java/com/android/dialer/theme/base/impl/
DAospThemeImpl.java53 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/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java1139 assertPass(program, packet.array()); in testApfFilterIPv4()
1145 assertPass(program, packet.array()); in testApfFilterIPv4()
1149 assertDrop(program, packet.array()); in testApfFilterIPv4()
1151 assertDrop(program, packet.array()); in testApfFilterIPv4()
1155 assertDrop(program, packet.array()); in testApfFilterIPv4()
1157 assertDrop(program, packet.array()); in testApfFilterIPv4()
1159 assertDrop(program, packet.array()); in testApfFilterIPv4()
1161 assertDrop(program, packet.array()); in testApfFilterIPv4()
1163 assertDrop(program, packet.array()); in testApfFilterIPv4()
1165 assertDrop(program, packet.array()); in testApfFilterIPv4()
[all …]
/packages/apps/Camera2/src/com/android/camera/settings/
DKeys.java91 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/services/Car/service/src/com/android/car/
DSparseArrayStream.java27 public static <E> IntStream keyStream(SparseArray<E> array) { in keyStream() argument
28 return IntStream.range(0, array.size()).map(array::keyAt); in keyStream()
31 public static <E> Stream<E> valueStream(SparseArray<E> array) { in valueStream() argument
32 return IntStream.range(0, array.size()).mapToObj(array::valueAt); in valueStream()
35 public static <E> Stream<Pair<Integer, E>> pairStream(SparseArray<E> array) { in pairStream() argument
36 return IntStream.range(0, array.size()).mapToObj( in pairStream()
37 i -> new Pair<>(array.keyAt(i), array.valueAt(i))); in pairStream()
DCarServiceUtils.java145 final float[] array = new float[size]; in toFloatArray() local
147 array[i] = list.get(i); in toFloatArray()
149 return array; in toFloatArray()
154 final int[] array = new int[size]; in toIntArray() local
156 array[i] = list.get(i); in toIntArray()
158 return array; in toIntArray()
163 final byte[] array = new byte[size]; in toByteArray()
165 array[i] = list.get(i); in toByteArray()
167 return array; in toByteArray()
/packages/modules/NetworkStack/src/android/net/util/
DNetworkStackUtils.java118 public static <T> boolean isEmpty(T[] array) { in isEmpty() argument
119 return array == null || array.length == 0; in isEmpty()
136 int[] array = new int[list.size()]; in convertToIntArray() local
138 array[i] = list.get(i); in convertToIntArray()
140 return array; in convertToIntArray()
147 long[] array = new long[list.size()]; in convertToLongArray() local
149 array[i] = list.get(i); in convertToLongArray()
151 return array; in convertToLongArray()
158 public static <T> boolean any(SparseArray<T> array, Predicate<T> predicate) { in any() argument
159 for (int i = 0; i < array.size(); ++i) { in any()
[all …]
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastConfigService.java187 R.array.cmas_presidential_alerts_channels_range_strings)); in setCellBroadcastOnSub()
192 R.array.cmas_alert_extreme_channels_range_strings)); in setCellBroadcastOnSub()
197 R.array.cmas_alerts_severe_range_strings)); in setCellBroadcastOnSub()
202 R.array.cmas_amber_alerts_channels_range_strings)); in setCellBroadcastOnSub()
207 R.array.required_monthly_test_range_strings)); in setCellBroadcastOnSub()
210 R.array.exercise_alert_range_strings)); in setCellBroadcastOnSub()
213 R.array.operator_defined_alert_range_strings)); in setCellBroadcastOnSub()
218 R.array.etws_alerts_range_strings)); in setCellBroadcastOnSub()
223 R.array.etws_test_alerts_range_strings)); in setCellBroadcastOnSub()
228 R.array.public_safety_messages_channels_range_strings)); in setCellBroadcastOnSub()
[all …]
DCellBroadcastChannelManager.java54 Arrays.asList(R.array.additional_cbs_channels_strings,
55 R.array.emergency_alerts_channels_range_strings,
56 R.array.cmas_presidential_alerts_channels_range_strings,
57 R.array.cmas_alert_extreme_channels_range_strings,
58 R.array.cmas_alerts_severe_range_strings,
59 R.array.cmas_amber_alerts_channels_range_strings,
60 R.array.required_monthly_test_range_strings,
61 R.array.exercise_alert_range_strings,
62 R.array.operator_defined_alert_range_strings,
63 R.array.etws_alerts_range_strings,
[all …]
DCellBroadcastResources.java271 R.array.emergency_alerts_channels_range_strings, context)) { in getDialogTitleResource()
277 R.array.cmas_presidential_alerts_channels_range_strings, context)) { in getDialogTitleResource()
282 R.array.cmas_alert_extreme_channels_range_strings, context)) { in getDialogTitleResource()
294 serviceCategory, R.array.cmas_alerts_severe_range_strings, context)) { in getDialogTitleResource()
299 R.array.cmas_amber_alerts_channels_range_strings, context)) { in getDialogTitleResource()
303 serviceCategory, R.array.required_monthly_test_range_strings, context)) { in getDialogTitleResource()
307 serviceCategory, R.array.exercise_alert_range_strings, context)) { in getDialogTitleResource()
311 serviceCategory, R.array.operator_defined_alert_range_strings, context)) { in getDialogTitleResource()
315 serviceCategory, R.array.public_safety_messages_channels_range_strings, context)) { in getDialogTitleResource()
319 serviceCategory, R.array.state_local_test_alert_range_strings, context)) { in getDialogTitleResource()
[all …]
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/utils/
DArrayUtils.java35 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/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/
DResizableIntArrayTests.java42 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/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
DCropMath.java73 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/inputmethods/LatinIME/native/jni/src/utils/
Djni_data_utils.h34 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/services/BuiltInPrintService/src/com/android/bips/render/
DPdfRenderService.java249 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/apps/TvSettings/QuickSettings/src/com/android/tv/quicksettings/
DSettingsDialog.java109 R.array.setting_preset_values); in onCreate()
154 String[] settingNames = getResources().getStringArray(R.array.setting_names); in getSettings()
155 String[] settingKeys = getResources().getStringArray(R.array.setting_keys); in getSettings()
156 int[] maxSettingValues = getResources().getIntArray(R.array.setting_max_values); in getSettings()
229 R.array.setting_preset_values); in setFocusedSettingToValue()
240 R.array.setting_preset_choices); in stringSettingHandleKeyCode()
241 String[] presetSettingValues = getResources().getStringArray(R.array.setting_preset_values); in stringSettingHandleKeyCode()
260 newSettingValues = getResources().getIntArray(R.array.standard_setting_values); in stringSettingHandleKeyCode()
262 newSettingValues = getResources().getIntArray(R.array.cinema_setting_values); in stringSettingHandleKeyCode()
264 newSettingValues = getResources().getIntArray(R.array.vivid_setting_values); in stringSettingHandleKeyCode()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/model/account/
DAccountWithDataSet.java105 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/Contacts/src/com/android/contacts/model/account/
DAccountWithDataSet.java214 final String[] array = STRINGIFY_SEPARATOR_PAT.split(s, 3); in unstringify() local
215 if (array.length < 3) { in unstringify()
218 return new AccountWithDataSet(array[0], array[1], in unstringify()
219 TextUtils.isEmpty(array[2]) ? null : array[2]); in unstringify()
249 final String[] array = ARRAY_STRINGIFY_SEPARATOR_PAT.split(s); in unstringifyList() local
251 for (int i = 0; i < array.length; i++) { in unstringifyList()
252 ret.add(unstringify(array[i])); in unstringifyList()
/packages/apps/Calendar/src/com/android/calendar/month/
DMonthWeekEventsView.java233 float[] array; field in MonthWeekEventsView.FloatRef
236 array = new float[size]; in FloatRef()
240 if (newSize >= array.length) { in ensureSize()
242 array = Arrays.copyOf(array, newSize + 16 * 7); in ensureSize()
781 lines.array[count++] = x; in addChipOutline()
782 lines.array[count++] = y; in addChipOutline()
783 lines.array[count++] = x + EVENT_SQUARE_WIDTH; in addChipOutline()
784 lines.array[count++] = y; in addChipOutline()
786 lines.array[count++] = x + EVENT_SQUARE_WIDTH; in addChipOutline()
787 lines.array[count++] = y; in addChipOutline()
[all …]

12345678910>>...18