Home
last modified time | relevance | path

Searched refs:ArrayUtils (Results 1 – 25 of 231) sorted by relevance

12345678910

/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DArrayUtilsTest.java19 import static com.android.internal.util.ArrayUtils.concatElements;
35 assertTrue(ArrayUtils.contains(new Object[] { A, B, C }, A)); in testContains()
36 assertTrue(ArrayUtils.contains(new Object[] { A, B, C }, B)); in testContains()
37 assertTrue(ArrayUtils.contains(new Object[] { A, B, C }, C)); in testContains()
38 assertTrue(ArrayUtils.contains(new Object[] { A, null, C }, null)); in testContains()
40 assertFalse(ArrayUtils.contains(new Object[] { A, B, C }, null)); in testContains()
41 assertFalse(ArrayUtils.contains(new Object[] { }, null)); in testContains()
42 assertFalse(ArrayUtils.contains(new Object[] { null }, A)); in testContains()
51 assertEquals(0, ArrayUtils.indexOf(new Object[] { A, B, C }, A)); in testIndexOf()
52 assertEquals(1, ArrayUtils.indexOf(new Object[] { A, B, C }, B)); in testIndexOf()
[all …]
/frameworks/base/core/java/android/database/
DTranslatingCursor.java27 import com.android.internal.util.ArrayUtils;
77 if (ArrayUtils.contains(config.translateColumns, columnName)) { in TranslatingCursor()
105 final boolean requestedAuxiliaryColumn = ArrayUtils.isEmpty(projectionIn) in query()
106 || ArrayUtils.contains(projectionIn, config.auxiliaryColumn); in query()
107 final boolean requestedTranslateColumns = ArrayUtils.isEmpty(projectionIn) in query()
108 || ArrayUtils.containsAny(projectionIn, config.translateColumns); in query()
119 projectionIn = ArrayUtils.appendElement(String.class, projectionIn, in query()
148 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getDouble()
157 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getFloat()
166 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getInt()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DArrayUtilsTest.java43 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
46 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
49 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
54 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
58 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
64 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
69 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
74 assertEquals(2, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
78 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
85 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
[all …]
/frameworks/base/keystore/java/android/security/keystore/
DKeyInfo.java118 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyInfo()
120 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyInfo()
121 mDigests = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(digests)); in KeyInfo()
122 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyInfo()
212 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
224 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
236 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
247 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
DKeyProtection.java263 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyProtection()
265 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyProtection()
266 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in KeyProtection()
267 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyProtection()
330 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
342 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
360 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
382 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
656 mEncryptionPaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setEncryptionPaddings()
672 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setSignaturePaddings()
[all …]
DKeyGenParameterSpec.java346 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in KeyGenParameterSpec()
348 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyGenParameterSpec()
349 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyGenParameterSpec()
350 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyGenParameterSpec()
491 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
515 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
527 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
539 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
1012 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in setDigests()
1036 mEncryptionPaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setEncryptionPaddings()
[all …]
DKeyStoreCryptoOperationChunkedStreamer.java120 int inputConsumed = ArrayUtils.copy(input, inputOffset, mChunk, mChunkLength, in update()
135 ArrayUtils.subarray(mChunk, 0, mChunkLength)); in update()
154 ArrayUtils.copy(mChunk, opResult.inputConsumed, mChunk, 0, mChunkLength); in update()
160 output = ArrayUtils.concat(output, opResult.output); in update()
170 byte[] finalChunk = ArrayUtils.subarray(mChunk, 0, mChunkLength); in doFinal()
183 output = ArrayUtils.concat(output, opResult.output); in doFinal()
DAndroidKeyStorePublicKey.java33 mEncoded = ArrayUtils.cloneIfNotEmpty(x509EncodedForm); in AndroidKeyStorePublicKey()
43 return ArrayUtils.cloneIfNotEmpty(mEncoded); in getEncoded()
/frameworks/base/core/java/android/content/pm/
DPackageSharedLibraryUpdater.java22 import com.android.internal.util.ArrayUtils;
42 pkg.usesLibraries = ArrayUtils.remove(pkg.usesLibraries, libraryName); in removeLibrary()
44 ArrayUtils.remove(pkg.usesOptionalLibraries, libraryName); in removeLibrary()
58 return ArrayUtils.contains(usesLibraries, apacheHttpLegacy) in isLibraryPresent()
59 || ArrayUtils.contains(usesOptionalLibraries, apacheHttpLegacy); in isLibraryPresent()
78 if (ArrayUtils.contains(usesLibraries, existingLibrary)) { in prefixImplicitDependency()
80 } else if (ArrayUtils.contains(usesOptionalLibraries, existingLibrary)) { in prefixImplicitDependency()
DPackageUserState.java39 import com.android.internal.util.ArrayUtils;
110 disabledComponents = ArrayUtils.cloneOrNull(o.disabledComponents); in PackageUserState()
111 enabledComponents = ArrayUtils.cloneOrNull(o.enabledComponents); in PackageUserState()
196 if (ArrayUtils.contains(this.enabledComponents, componentInfo.name)) { in isEnabled()
199 if (ArrayUtils.contains(this.disabledComponents, componentInfo.name)) { in isEnabled()
DLimitedLengthInputStream.java3 import libcore.util.ArrayUtils;
75 ArrayUtils.throwsIfOutOfBounds(arrayLength, offset, byteCount); in read()
/frameworks/base/core/java/com/android/internal/util/
DGrowingArrayUtils.java48 T[] newArray = ArrayUtils.newUnpaddedArray( in append()
65 int[] newArray = ArrayUtils.newUnpaddedIntArray(growSize(currentSize)); in append()
80 long[] newArray = ArrayUtils.newUnpaddedLongArray(growSize(currentSize)); in append()
95 boolean[] newArray = ArrayUtils.newUnpaddedBooleanArray(growSize(currentSize)); in append()
110 float[] newArray = ArrayUtils.newUnpaddedFloatArray(growSize(currentSize)); in append()
139 T[] newArray = ArrayUtils.newUnpaddedArray((Class<T>)array.getClass().getComponentType(), in insert()
159 int[] newArray = ArrayUtils.newUnpaddedIntArray(growSize(currentSize)); in insert()
178 long[] newArray = ArrayUtils.newUnpaddedLongArray(growSize(currentSize)); in insert()
197 boolean[] newArray = ArrayUtils.newUnpaddedBooleanArray(growSize(currentSize)); in insert()
/frameworks/base/core/java/android/util/
DIntArray.java19 import com.android.internal.util.ArrayUtils;
56 mValues = ArrayUtils.newUnpaddedIntArray(initialCapacity); in IntArray()
107 ArrayUtils.checkBounds(mSize, index); in add()
156 final int[] newValues = ArrayUtils.newUnpaddedIntArray(newCapacity); in ensureCapacity()
180 ArrayUtils.checkBounds(mSize, index); in get()
188 ArrayUtils.checkBounds(mSize, index); in set()
210 ArrayUtils.checkBounds(mSize, index); in remove()
DLongArray.java22 import com.android.internal.util.ArrayUtils;
60 mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongArray()
112 ArrayUtils.checkBounds(mSize, index); in add()
143 final long[] newValues = ArrayUtils.newUnpaddedLongArray(newCapacity); in ensureCapacity()
173 ArrayUtils.checkBounds(mSize, index); in get()
181 ArrayUtils.checkBounds(mSize, index); in set()
203 ArrayUtils.checkBounds(mSize, index); in remove()
DLongArrayQueue.java19 import com.android.internal.util.ArrayUtils;
49 mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongArrayQueue()
67 final long[] newArray = ArrayUtils.newUnpaddedLongArray(newSize); in grow()
/frameworks/base/core/java/android/text/
DAutoGrowArray.java22 import com.android.internal.util.ArrayUtils;
70 mValues = ArrayUtils.newUnpaddedByteArray(initialCapacity); in ByteArray()
101 final byte[] newValues = ArrayUtils.newUnpaddedByteArray(newCapacity); in ensureCapacity()
179 mValues = ArrayUtils.newUnpaddedIntArray(initialCapacity); in IntArray()
210 final int[] newValues = ArrayUtils.newUnpaddedIntArray(newCapacity); in ensureCapacity()
288 mValues = ArrayUtils.newUnpaddedFloatArray(initialCapacity); in FloatArray()
319 final float[] newValues = ArrayUtils.newUnpaddedFloatArray(newCapacity); in ensureCapacity()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageBuilder.java21 import com.android.internal.util.ArrayUtils;
51 mPkg.usesStaticLibraries = ArrayUtils.add(mPkg.usesStaticLibraries, name); in addUsesStaticLibrary()
53 ArrayUtils.appendLong(mPkg.usesStaticLibrariesVersions, version); in addUsesStaticLibrary()
85 ArrayUtils.appendElement(String.class, mPkg.splitCodePaths, splitCodePath); in addSplitCodePath()
95 mPkg.libraryNames = ArrayUtils.add(mPkg.libraryNames, libraryName); in addLibraryName()
DInstallerTest.java30 import com.android.internal.util.ArrayUtils;
102 if (ArrayUtils.contains(appIds, appId)) { in testGetAppSize()
105 appIds = ArrayUtils.appendInt(appIds, appId); in testGetAppSize()
179 if (!ArrayUtils.contains(appIds, appId)) { in getAppIds()
180 appIds = ArrayUtils.appendInt(appIds, appId); in getAppIds()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageKeySetData.java21 import com.android.internal.util.ArrayUtils;
40 mUpgradeKeySets = ArrayUtils.cloneOrNull(original.mUpgradeKeySets); in PackageKeySetData()
61 mUpgradeKeySets = ArrayUtils.appendLong(mUpgradeKeySets, ks); in addUpgradeKeySet()
74 mUpgradeKeySets = ArrayUtils.appendLong(mUpgradeKeySets, ks); in addUpgradeKeySetById()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothProfileManager.java43 import com.android.internal.util.ArrayUtils;
475 if ((ArrayUtils.contains(localUuids, BluetoothUuid.HSP_AG) in updateProfiles()
476 && ArrayUtils.contains(uuids, BluetoothUuid.HSP)) in updateProfiles()
477 || (ArrayUtils.contains(localUuids, BluetoothUuid.HFP_AG) in updateProfiles()
478 && ArrayUtils.contains(uuids, BluetoothUuid.HFP))) { in updateProfiles()
485 ArrayUtils.contains(uuids, BluetoothUuid.HFP_AG) in updateProfiles()
486 && ArrayUtils.contains(localUuids, BluetoothUuid.HFP)) { in updateProfiles()
502 if (ArrayUtils.contains(uuids, BluetoothUuid.OBEX_OBJECT_PUSH) && mOppProfile != null) { in updateProfiles()
507 if ((ArrayUtils.contains(uuids, BluetoothUuid.HID) in updateProfiles()
508 || ArrayUtils.contains(uuids, BluetoothUuid.HOGP)) && mHidProfile != null) { in updateProfiles()
[all …]
DBluetoothDeviceFilter.java25 import com.android.internal.util.ArrayUtils;
135 if (ArrayUtils.contains(uuids, BluetoothUuid.OBEX_OBJECT_PUSH)) { in matches()
149 if (ArrayUtils.contains(uuids, BluetoothUuid.PANU)) { in matches()
163 if (ArrayUtils.contains(uuids, BluetoothUuid.NAP)) { in matches()
/frameworks/base/graphics/java/android/graphics/
DTemporaryBuffer.java21 import com.android.internal.util.ArrayUtils;
37 buf = ArrayUtils.newUnpaddedCharArray(len); in obtain()
/frameworks/base/core/java/com/android/internal/os/
DProcTimeInStateReader.java22 import com.android.internal.util.ArrayUtils;
197 ArrayUtils.convertToIntArray(timeInStateFrequencyFormat), null, readLongs, null); in initializeTimeInStateFormat()
202 mTimeInStateTimeFormat = ArrayUtils.convertToIntArray(timeInStateTimeFormat); in initializeTimeInStateFormat()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageUtils.java25 import com.android.internal.util.ArrayUtils;
51 if (ArrayUtils.isEmpty(mergedSubscriberIds)) { in getMobileTemplate()
/frameworks/base/core/java/android/hardware/camera2/legacy/
DLegacyMetadataMapper.java34 import android.hardware.camera2.utils.ArrayUtils;
454 int[] aeAvail = ArrayUtils.convertStringListToIntArray( in mapControlAe()
526 List<Integer> afAvail = ArrayUtils.convertStringListToIntList( in mapControlAf()
536 m.set(CONTROL_AF_AVAILABLE_MODES, ArrayUtils.toIntArray(afAvail)); in mapControlAf()
576 List<Integer> awbAvail = ArrayUtils.convertStringListToIntList( in mapControlAwb()
586 m.set(CONTROL_AWB_AVAILABLE_MODES, ArrayUtils.toIntArray(awbAvail)); in mapControlAwb()
642 ArrayUtils.convertStringListToIntArray(effectModes, sLegacyEffectMode, in mapControlOther()
652 ArrayUtils.convertStringListToIntList(sceneModes, sLegacySceneModes, sSceneModes); in mapControlOther()
676 m.set(CONTROL_AVAILABLE_SCENE_MODES, ArrayUtils.toIntArray(supportedSceneModes)); in mapControlOther()
1083 int index = ArrayUtils.getArrayIndex(sLegacySceneModes, mode); in convertSceneModeFromLegacy()
[all …]

12345678910