Home
last modified time | relevance | path

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

12345678

/frameworks/base/tests/CoreTests/android/core/
DArrayListTest.java32 ArrayList array = new ArrayList(); in testArrayList() local
33 assertEquals(0, array.size()); in testArrayList()
34 assertTrue(array.isEmpty()); in testArrayList()
36 array.add(new Integer(0)); in testArrayList()
37 array.add(0, new Integer(1)); in testArrayList()
38 array.add(1, new Integer(2)); in testArrayList()
39 array.add(new Integer(3)); in testArrayList()
40 array.add(new Integer(1)); in testArrayList()
42 assertEquals(5, array.size()); in testArrayList()
43 assertFalse(array.isEmpty()); in testArrayList()
[all …]
DReflectArrayTest.java33 int[] array = (int[]) intArray; in testSingleInt() local
34 array[0] = 5; in testSingleInt()
38 assertEquals(6, array[1]); in testSingleInt()
41 array[2] = 27; in testSingleInt()
47 assertEquals(2, array.length); in testSingleInt()
48 assertEquals(Array.getLength(intArray), array.length); in testSingleInt()
65 String[] array = (String[]) strArray; in testSingle() local
66 array[0] = "entry zero"; in testSingle()
72 assertEquals("entry one", array[1]); in testSingle()
74 assertEquals(2, array.length); in testSingle()
[all …]
DLinkedListTest.java81 Object array; in testLinkedListToArray() local
84 array = list.toArray(); in testLinkedListToArray()
85 array = list.toArray(); in testLinkedListToArray()
86 array = list.toArray(); in testLinkedListToArray()
87 array = list.toArray(); in testLinkedListToArray()
88 array = list.toArray(); in testLinkedListToArray()
89 array = list.toArray(); in testLinkedListToArray()
90 array = list.toArray(); in testLinkedListToArray()
91 array = list.toArray(); in testLinkedListToArray()
92 array = list.toArray(); in testLinkedListToArray()
[all …]
DVectorTest.java86 Object array; in testVectorToArray() local
89 array = vector.toArray(); in testVectorToArray()
90 array = vector.toArray(); in testVectorToArray()
91 array = vector.toArray(); in testVectorToArray()
92 array = vector.toArray(); in testVectorToArray()
93 array = vector.toArray(); in testVectorToArray()
94 array = vector.toArray(); in testVectorToArray()
95 array = vector.toArray(); in testVectorToArray()
96 array = vector.toArray(); in testVectorToArray()
97 array = vector.toArray(); in testVectorToArray()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DHexDump.java23 public static String dumpHexString(byte[] array) in dumpHexString() argument
25 return dumpHexString(array, 0, array.length); in dumpHexString()
28 public static String dumpHexString(byte[] array, int offset, int length) in dumpHexString() argument
61 byte b = array[i]; in dumpHexString()
99 public static String toHexString(byte[] array) in toHexString() argument
101 return toHexString(array, 0, array.length); in toHexString()
104 public static String toHexString(byte[] array, int offset, int length) in toHexString() argument
111 byte b = array[i]; in toHexString()
126 byte[] array = new byte[1]; in toByteArray()
127 array[0] = b; in toByteArray()
[all …]
/frameworks/base/core/jni/
Dandroid_pim_EventRecurrence.cpp27 jfieldID array; member
53 jintArray array = (jintArray) env->GetObjectField(This, fields.array); in set_array() local
54 if (array == NULL || env->GetArrayLength(array) < inCount) { in set_array()
57 array = env->NewIntArray(inCount+4); in set_array()
58 env->SetObjectField(This, fields.array, array); in set_array()
60 if (array == NULL) { in set_array()
63 env->SetIntArrayRegion(array, 0, inCount, inArray); in set_array()
173 bysecond_fields.array = env->GetFieldID(clazz, "bysecond", "[I"); in register_android_pim_EventRecurrence()
175 byminute_fields.array = env->GetFieldID(clazz, "byminute", "[I"); in register_android_pim_EventRecurrence()
177 byhour_fields.array = env->GetFieldID(clazz, "byhour", "[I"); in register_android_pim_EventRecurrence()
[all …]
Dandroid_nio_utils.cpp29 void* android::nio_getPointer(JNIEnv *_env, jobject buffer, jarray *array) { in nio_getPointer() argument
30 assert(array); in nio_getPointer()
39 *array = NULL; in nio_getPointer()
43 *array = (jarray) _env->CallStaticObjectMethod(gNioJNI.nioAccessClass, in nio_getPointer()
47 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); in nio_getPointer()
53 void android::nio_releasePointer(JNIEnv *_env, jarray array, void *data, in nio_releasePointer() argument
55 _env->ReleasePrimitiveArrayCritical(array, data, in nio_releasePointer()
Dandroid_security_Md5MessageDigest.cpp76 jbyteArray array; in native_digest() local
82 array = env->NewByteArray(MD5_DIGEST_LENGTH); in native_digest()
83 LOG_ASSERT(array, "Native could not create new byte[]"); in native_digest()
85 env->SetByteArrayRegion(array, 0, MD5_DIGEST_LENGTH, md); in native_digest()
89 return array; in native_digest()
Dandroid_message_digest_sha1.cpp100 jbyteArray array; in native_digest() local
106 array = env->NewByteArray(SHA_DIGEST_LENGTH); in native_digest()
107 LOG_ASSERT(array, "Native could not create new byte[]"); in native_digest()
109 env->SetByteArrayRegion(array, 0, SHA_DIGEST_LENGTH, md); in native_digest()
113 return array; in native_digest()
Dandroid_ddm_DdmHandleNativeHeap.cpp100 jbyteArray array = env->NewByteArray(sizeof(Header) + header.mapSize + header.allocSize); in getLeakInfo() local
101 if (array == NULL) { in getLeakInfo()
105 bytes = env->GetByteArrayElements(array, NULL); in getLeakInfo()
120 env->ReleaseByteArrayElements(array, bytes, 0); in getLeakInfo()
129 return array; in getLeakInfo()
/frameworks/base/media/libstagefright/omx/
DOMXPVCodecsPlugin.cpp74 OMX_U8 **array = new OMX_U8 *[numRoles]; in getRolesOfComponent() local
76 array[i] = new OMX_U8[OMX_MAX_STRINGNAME_SIZE]; in getRolesOfComponent()
81 const_cast<char *>(name), &numRoles2, array); in getRolesOfComponent()
87 String8 s((const char *)array[i]); in getRolesOfComponent()
90 delete[] array[i]; in getRolesOfComponent()
91 array[i] = NULL; in getRolesOfComponent()
94 delete[] array; in getRolesOfComponent()
95 array = NULL; in getRolesOfComponent()
/frameworks/base/libs/utils/
DVectorImpl.cpp119 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) in insertArrayAt() argument
125 _do_copy(where, array, length); in insertArrayAt()
130 ssize_t VectorImpl::appendArray(const void* array, size_t length) in appendArray() argument
132 return insertArrayAt(array, size(), length); in appendArray()
172 void* array = const_cast<void*>(arrayImpl()); in sort() local
176 void* item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
177 void* curr = reinterpret_cast<char*>(array) + mItemSize*(i-1); in sort()
182 array = editArrayImpl(); in sort()
183 if (!array) return NO_MEMORY; in sort()
186 item = reinterpret_cast<char*>(array) + mItemSize*(i); in sort()
[all …]
/frameworks/base/core/java/android/os/
DLatencyTimer.java65 long[] array = getArray(tag); in sample() local
68 final int index = (int) array[mSampleSize]++; in sample()
69 array[index] = delta; in sample()
70 if (array[mSampleSize] == mSampleSize) { in sample()
72 for (long d : array) { in sample()
75 array[mSampleSize] = 0; in sample()
/frameworks/base/media/libstagefright/codecs/amrwb/src/
Dlagconceal.cpp101 void insertion_sort(int16 array[], int16 n);
102 void insert(int16 array[], int16 num, int16 x);
333 void insertion_sort(int16 array[], int16 n) in insertion_sort() argument
339 insert(array, i, array[i]); in insertion_sort()
347 void insert(int16 array[], int16 n, int16 x) in insert() argument
354 if (x < array[i]) in insert()
356 array[i + 1] = array[i]; in insert()
363 array[i + 1] = x; in insert()
/frameworks/base/graphics/java/android/graphics/
DColorMatrixColorFilter.java38 public ColorMatrixColorFilter(float[] array) { in ColorMatrixColorFilter() argument
39 if (array.length < 20) { in ColorMatrixColorFilter()
42 native_instance = nativeColorMatrixFilter(array); in ColorMatrixColorFilter()
45 private static native int nativeColorMatrixFilter(float[] array); in nativeColorMatrixFilter() argument
/frameworks/base/core/jni/android/graphics/
DColorFilter.cpp52 SkFixed array[20]; in CreateColorMatrixFilter() local
54 array[i] = SkFloatToScalar(src[i]); in CreateColorMatrixFilter()
56 return new SkColorMatrixFilter(array); in CreateColorMatrixFilter()
83 #define REG(env, name, array) \ argument
84 result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
85 SK_ARRAY_COUNT(array)); \
/frameworks/base/core/java/android/net/
DNetworkUtils.java134 String[] array = str.split("\\."); in v4StringToInt() local
135 if (array.length != 4) return 0; in v4StringToInt()
137 result = Integer.parseInt(array[3]); in v4StringToInt()
138 result = (result << 8) + Integer.parseInt(array[2]); in v4StringToInt()
139 result = (result << 8) + Integer.parseInt(array[1]); in v4StringToInt()
140 result = (result << 8) + Integer.parseInt(array[0]); in v4StringToInt()
/frameworks/base/graphics/java/android/graphics/drawable/
DLayerDrawable.java318 final ChildDrawable[] array = mLayerState.mChildren; in draw() local
321 array[i].mDrawable.draw(canvas); in draw()
341 final ChildDrawable[] array = mLayerState.mChildren; in getPadding() local
344 reapplyPadding(i, array[i]); in getPadding()
356 final ChildDrawable[] array = mLayerState.mChildren; in setVisible() local
359 array[i].mDrawable.setVisible(visible, restart); in setVisible()
366 final ChildDrawable[] array = mLayerState.mChildren; in setDither() local
369 array[i].mDrawable.setDither(dither); in setDither()
375 final ChildDrawable[] array = mLayerState.mChildren; in setAlpha() local
378 array[i].mDrawable.setAlpha(alpha); in setAlpha()
[all …]
/frameworks/base/services/java/com/android/server/
DIntentResolver.java360 ArrayList<F> array = mTypeToFilter.get(name); in register_mime_types() local
361 if (array == null) { in register_mime_types()
363 array = new ArrayList<F>(); in register_mime_types()
364 mTypeToFilter.put(name, array); in register_mime_types()
366 array.add(filter); in register_mime_types()
369 array = mBaseTypeToFilter.get(baseName); in register_mime_types()
370 if (array == null) { in register_mime_types()
372 array = new ArrayList<F>(); in register_mime_types()
373 mBaseTypeToFilter.put(baseName, array); in register_mime_types()
375 array.add(filter); in register_mime_types()
[all …]
/frameworks/base/core/java/com/android/internal/os/
DPowerProfile.java163 ArrayList<Double> array = new ArrayList<Double>(); in readPowerValuesFromXml() local
177 sPowerMap.put(arrayName, array.toArray(new Double[array.size()])); in readPowerValuesFromXml()
182 array.clear(); in readPowerValuesFromXml()
197 array.add(value); in readPowerValuesFromXml()
203 sPowerMap.put(arrayName, array.toArray(new Double[array.size()])); in readPowerValuesFromXml()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DNinePatch_Delegate.java90 byte[] array = baos.toByteArray(); in serialize()
91 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk)); in serialize()
92 return array; in serialize()
104 public static NinePatchChunk getChunk(byte[] array) { in getChunk() argument
105 SoftReference<NinePatchChunk> chunkRef = sChunkCache.get(array); in getChunk()
108 ByteArrayInputStream bais = new ByteArrayInputStream(array); in getChunk()
116 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk)); in getChunk()
/frameworks/base/docs/html/guide/topics/resources/
Dmore-resources.jd21 <dd>XML resource that provides an array of integers.</dd>
24 for an array of drawables).</dd>
521 <p>An array of integers defined in XML.</p>
523 <p class="note"><strong>Note:</strong> An integer array is a simple resource that is referenced
525 such, you can combine integer array resources with other simple resources in the one XML file,
533 The filename is arbitrary. The {@code &lt;integer-array>} element's {@code name} will be used as the
537 <dd>Resource pointer to an array of integers.</dd>
541 In Java: <code>R.array.<em>string_array_name</em></code><br/>
542 In XML: <code>@[<em>package</em>:]array.<em>integer_array_name</em></code>
549 &lt;<a href="#integer-array-resources-element">resources</a>>
[all …]
/frameworks/base/opengl/tools/glgen/stubs/jsr239/
DGLCHeader.cpp138 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
154 *array = NULL;
158 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
160 if (*array == NULL) {
165 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
171 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
173 _env->ReleasePrimitiveArrayCritical(array, data,
203 jarray array = 0;
205 buf = getPointer(_env, buffer, &array, &remaining);
206 if (array) {
[all …]
/frameworks/base/opengl/tools/glgen/stubs/gles11/
DGLES10ExtcHeader.cpp87 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining) in getPointer() argument
103 *array = NULL; in getPointer()
107 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, in getPointer()
111 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0); in getPointer()
118 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) in releasePointer() argument
120 _env->ReleasePrimitiveArrayCritical(array, data, in releasePointer()
/frameworks/base/core/java/android/gesture/
DGestureUtils.java353 float[][] array = new float[2][2]; in computeCoVariance() local
354 array[0][0] = 0; in computeCoVariance()
355 array[0][1] = 0; in computeCoVariance()
356 array[1][0] = 0; in computeCoVariance()
357 array[1][1] = 0; in computeCoVariance()
363 array[0][0] += x * x; in computeCoVariance()
364 array[0][1] += x * y; in computeCoVariance()
365 array[1][0] = array[0][1]; in computeCoVariance()
366 array[1][1] += y * y; in computeCoVariance()
368 array[0][0] /= (count / 2); in computeCoVariance()
[all …]

12345678