/frameworks/base/core/java/com/android/internal/util/ |
H A D | GrowingArrayUtils.java | 21 * arrays. Common array operations are implemented for efficient use in dynamic containers. 23 * All methods in this class assume that the length of an array is equivalent to its capacity and 24 * NOT the number of elements in the array. The current size of the array is always passed in as a 32 * Appends an element to the end of the array, growing the array if there is no more room. 33 * @param array The array to which to append the element. This must NOT be null. 34 * @param currentSize The number of elements in the array. Must be less than or equal to 35 * array 40 append(T[] array, int currentSize, T element) argument 57 append(int[] array, int currentSize, int element) argument 72 append(long[] array, int currentSize, long element) argument 87 append(boolean[] array, int currentSize, boolean element) argument 110 insert(T[] array, int currentSize, int index, T element) argument 131 insert(int[] array, int currentSize, int index, int element) argument 150 insert(long[] array, int currentSize, int index, long element) argument 169 insert(boolean[] array, int currentSize, int index, boolean element) argument [all...] |
H A D | HexDump.java | 23 public static String dumpHexString(byte[] array) argument 25 return dumpHexString(array, 0, array.length); 28 public static String dumpHexString(byte[] array, int offset, int length) argument 61 byte b = array[i]; 99 public static String toHexString(byte[] array) argument 101 return toHexString(array, 0, array.length); 104 public static String toHexString(byte[] array, int offset, int length) argument 111 byte b = array[ [all...] |
H A D | ArrayUtils.java | 75 * @param array1 the first byte array 76 * @param array2 the second byte array 100 * Returns an empty array of the specified type. The intent is that 101 * it will return the same empty array every time to avoid reallocation, 124 * Checks if given array is null or has zero elements. 126 public static <T> boolean isEmpty(T[] array) { argument 127 return array == null || array.length == 0; 131 * Checks if given array is null or has zero elements. 133 public static boolean isEmpty(int[] array) { argument 140 isEmpty(long[] array) argument 150 contains(T[] array, T value) argument 158 indexOf(T[] array, T value) argument 173 containsAll(T[] array, T[] check) argument 183 contains(int[] array, int value) argument 193 contains(long[] array, long value) argument 203 total(long[] array) argument 219 appendElement(Class<T> kind, T[] array, T element) argument 245 removeElement(Class<T> kind, T[] array, T element) argument 351 cloneOrNull(long[] array) argument [all...] |
/frameworks/base/core/java/android/animation/ |
H A D | FloatArrayEvaluator.java | 21 * Each index into the array is treated as a separate value to interpolate. For example, 45 * @param reuseArray The array to modify and return from <code>evaluate</code>. 65 float[] array = mArray; 66 if (array == null) { 67 array = new float[startValue.length]; 70 for (int i = 0; i < array.length; i++) { 73 array[i] = start + (fraction * (end - start)); 75 return array;
|
H A D | IntArrayEvaluator.java | 21 * Each index into the array is treated as a separate value to interpolate. For example, 45 * @param reuseArray The array to modify and return from <code>evaluate</code>. 64 int[] array = mArray; 65 if (array == null) { 66 array = new int[startValue.length]; 68 for (int i = 0; i < array.length; i++) { 71 array[i] = (int) (start + (fraction * (end - start))); 73 return array;
|
/frameworks/rs/cpu_ref/linkloader/utils/ |
H A D | serialize.h | 36 inline void swap_byte_order(unsigned char (&array)[1]) { argument 40 inline void swap_byte_order(unsigned char (&array)[2]) { argument 41 std::swap(array[0], array[1]); 44 inline void swap_byte_order(unsigned char (&array)[4]) { argument 45 std::swap(array[0], array[3]); 46 std::swap(array[1], array[2]); 49 inline void swap_byte_order(unsigned char (&array)[ argument 94 readBytes(void *array, size_t size) argument 103 operator &(char (&array)[size]) argument 109 operator &(unsigned char (&array)[size]) argument [all...] |
/frameworks/support/v4/jellybean/android/support/v4/app/ |
H A D | BundleUtil.java | 13 * Get an array of Bundle objects from a parcelable array field in a bundle. 14 * Update the bundle to have a typed array so fetches in the future don't need 15 * to do an array copy. 18 Parcelable[] array = bundle.getParcelableArray(key); 19 if (array instanceof Bundle[] || array == null) { 20 return (Bundle[]) array; 22 Bundle[] typedArray = Arrays.copyOf(array, array [all...] |
/frameworks/base/graphics/java/android/graphics/ |
H A D | ColorMatrixColorFilter.java | 43 * @param array Array of floats used to transform colors, treated as a 4x5 44 * matrix. The first 20 entries of the array are copied into 47 public ColorMatrixColorFilter(float[] array) { argument 48 if (array.length < 20) { 51 mMatrix.set(array); 95 * @param array Array of floats used to transform colors, treated as a 4x5 96 * matrix. The first 20 entries of the array are copied into 103 * @throws ArrayIndexOutOfBoundsException if the specified array's 108 public void setColorMatrix(float[] array) { argument 109 if (array 127 nativeColorMatrixFilter(float[] array) argument [all...] |
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
H A D | ByteArrayHelpers.java | 32 * Convert an array of byte primitives to a {@code byte[]} using native endian order. 37 * @param array array of primitives 38 * @return array 40 public static byte[] toByteArray(byte[] array) { argument 41 return array; 45 * Convert an array of shorts to a {@code byte[]} using native endian order. 47 * @param array array of shorts 48 * @return array converte 50 toByteArray(short[] array) argument 60 toByteArray(char[] array) argument 69 toByteArray(int[] array) argument 78 toByteArray(long[] array) argument 87 toByteArray(float[] array) argument 96 toByteArray(double[] array) argument 111 toByteArray(T array) argument 213 toByteArray(T array, int sizeOfTBits) argument [all...] |
/frameworks/base/core/tests/coretests/src/android/util/ |
H A D | LongSparseLongArrayTest.java | 33 final LongSparseLongArray array = new LongSparseLongArray(5); 36 array.put(value, value); 40 assertEquals(value, array.get(value, -1)); 41 assertEquals(-1, array.get(-value, -1)); 46 final LongSparseLongArray array = new LongSparseLongArray(5); 49 array.put(value, value); 53 assertEquals(value, array.get(value, -1)); 54 assertEquals(-1, array.get(-value, -1)); 59 final LongSparseLongArray array = new LongSparseLongArray(5); 62 array [all...] |
/frameworks/base/core/java/android/text/ |
H A D | TextDirectionHeuristic.java | 24 * Guess if a chars array is in the RTL direction or not. 26 * @param array the char array. 29 * {@code array.length - start}. 33 boolean isRtl(char[] array, int start, int count); argument
|
/frameworks/base/core/java/android/util/ |
H A D | ContainerHelpers.java | 22 static int binarySearch(int[] array, int size, int value) { argument 28 final int midVal = array[mid]; 41 static int binarySearch(long[] array, int size, long value) { argument 47 final long midVal = array[mid];
|
H A D | ArraySet.java | 31 * separate from ArrayMap, however, so the Object array contains only one item for each 37 * and deleting entries in the array. For containers holding up to hundreds of items, 41 * standard Java containers it will shrink its array as items are removed from it. Currently 59 * Maximum number of entries to have in array caches. 64 * Caches of small array objects to avoid spamming garbage. The cache 65 * Object[] variable is a pointer to a linked list of array objects. 66 * The first entry in the array is a pointer to the next array in the 67 * list; the second entry is a pointer to the int[] hash code array for it. 112 // hash chain to reduce the number of array entrie 190 freeArrays(final int[] hashes, final Object[] array, final int size) argument 392 addAll(ArraySet<? extends E> array) argument 493 toArray(T[] array) argument [all...] |
/frameworks/support/v4/java/android/support/v4/text/ |
H A D | TextDirectionHeuristicCompat.java | 24 * Guess if a chars array is in the RTL direction or not. 26 * @param array the char array. 29 * {@code array.length - start}. 33 boolean isRtl(char[] array, int start, int count); argument
|
/frameworks/base/core/java/android/hardware/camera2/utils/ |
H A D | ArrayUtils.java | 26 * Various assortment of array utilities. 33 /** Return the index of {@code needle} in the {@code array}, or else {@code -1} */ 34 public static <T> int getArrayIndex(T[] array, T needle) { argument 35 if (array == null) { 40 for (T elem : array) { 50 /** Return the index of {@code needle} in the {@code array}, or else {@code -1} */ 51 public static int getArrayIndex(int[] array, int needle) { argument 52 if (array == null) { 55 for (int i = 0; i < array.length; ++i) { 56 if (array[ 166 contains(int[] array, int elem) argument 177 contains(T[] array, T elem) argument [all...] |
H A D | HashCodeHelpers.java | 29 * @param array a non-{@code null} array of integers 33 public static int hashCode(int[] array) { argument 34 if (array == null) { 46 for (int x : array) { 59 * @param array a non-{@code null} array of floats 63 public static int hashCode(float[] array) { argument 64 if (array == null) { 69 for (float f : array) { 86 hashCode(T[] array) argument [all...] |
/frameworks/av/drm/mediadrm/plugins/clearkey/ |
H A D | Utils.cpp | 27 return memcmp((void *)lhs.array(), (void *)rhs.array(), rhs.size()) < 0;
|
/frameworks/base/core/java/android/bluetooth/le/ |
H A D | BluetoothLeUtils.java | 38 static String toString(SparseArray<byte[]> array) { argument 39 if (array == null) { 42 if (array.size() == 0) { 47 for (int i = 0; i < array.size(); ++i) { 48 buffer.append(array.keyAt(i)).append("=").append(Arrays.toString(array.valueAt(i))); 82 static boolean equals(SparseArray<byte[]> array, SparseArray<byte[]> otherArray) { argument 83 if (array == otherArray) { 86 if (array == null || otherArray == null) { 89 if (array [all...] |
/frameworks/support/v4/java/android/support/v4/util/ |
H A D | SimpleArrayMap.java | 42 * Maximum number of entries to have in array caches. 47 * Caches of small array objects to avoid spamming garbage. The cache 48 * Object[] variable is a pointer to a linked list of array objects. 49 * The first entry in the array is a pointer to the next array in the 50 * list; the second entry is a pointer to the int[] hash code array for it. 94 // hash chain to reduce the number of array entries that will 132 // hash chain to reduce the number of array entries that will 141 final Object[] array = mTwiceBaseCache; 142 mArray = array; 172 freeArrays(final int[] hashes, final Object[] array, final int size) argument 428 putAll(SimpleArrayMap<? extends K, ? extends V> array) argument [all...] |
/frameworks/base/core/java/android/hardware/camera2/dispatch/ |
H A D | ArgumentReplacingDispatcher.java | 77 private static Object[] arrayCopy(Object[] array) { argument 78 int length = array.length; 81 newArray[i] = array[i];
|
/frameworks/base/core/tests/inputmethodtests/src/android/os/ |
H A D | InputMethodSubtypeArrayTest.java | 35 final InputMethodSubtypeArray array = new InputMethodSubtypeArray(subtypes); 36 assertEquals(subtypes.size(), array.getCount()); 37 assertEquals(subtypes.get(0), array.get(0)); 38 assertEquals(subtypes.get(1), array.get(1)); 39 assertEquals(subtypes.get(2), array.get(2)); 41 final InputMethodSubtypeArray clonedArray = cloneViaParcel(array);
|
/frameworks/base/core/jni/ |
H A D | android_nio_utils.h | 28 * (and releasePointer if array is returned non-null) must be done in the 33 * @param array REQUIRED. Output. If on return it is set to non-null, then 34 * nio_releasePointer must be called with the array 40 void* nio_getPointer(JNIEnv *env, jobject buffer, jarray *array); 43 * Call this if android_nio_getPointer returned non-null in its array parameter. 44 * Pass that array and the returned pointer when you are done accessing the 45 * pointer. If called (i.e. array is non-null), it must be called in the same 49 * @param buffer The array returned from android_nio_getPointer (!= null) 54 void nio_releasePointer(JNIEnv *env, jarray array, void *pointer,
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
H A D | UnmodifiableSparseIntArray.java | 29 public UnmodifiableSparseIntArray(SparseIntArray array) { argument 30 mArray = array;
|
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/ |
H A D | ArrayMapTests.java | 121 private static boolean compareMaps(HashMap map, ArrayMap array) { argument 122 if (map.size() != array.size()) { 123 Log.e("test", "Bad size: expected " + map.size() + ", got " + array.size()); 130 Object gotValue = array.get(entry.getKey()); 138 for (int i=0; i<array.size(); i++) { 139 Object gotValue = array.valueAt(i); 140 Object key = array.keyAt(i); 149 if (map.entrySet().hashCode() != array.entrySet().hashCode()) { 151 + Integer.toHexString(map.entrySet().hashCode()) + " array=0x" 152 + Integer.toHexString(array 211 compareSets(HashSet set, ArraySet array) argument 246 validateArrayMap(ArrayMap array) argument 300 dump(Map map, ArrayMap array) argument 312 dump(Set set, ArraySet array) argument [all...] |
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
H A D | ColorMatrixColorFilter_Delegate.java | 53 /*package*/ static long nativeColorMatrixFilter(float[] array) { argument
|