Home
last modified time | relevance | path

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

123456789

/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/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/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/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.java343 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in KeyGenParameterSpec()
345 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyGenParameterSpec()
346 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyGenParameterSpec()
347 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyGenParameterSpec()
487 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
511 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
523 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
535 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
990 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in setDigests()
1014 mEncryptionPaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setEncryptionPaddings()
[all …]
DKeyStoreCryptoOperationChunkedStreamer.java106 chunk = ArrayUtils.concat(mBuffered, mBufferedOffset, mBufferedLength, in update()
119 chunk = ArrayUtils.concat(mBuffered, mBufferedOffset, mBufferedLength, in update()
218 output = ArrayUtils.concat(output, flush()); in doFinal()
228 return ArrayUtils.concat(output, opResult.output); in doFinal()
240 byte[] chunk = ArrayUtils.subarray(mBuffered, mBufferedOffset, mBufferedLength); in flush()
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/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()
DSharedUserSetting.java26 import com.android.internal.util.ArrayUtils;
160 if (!ArrayUtils.contains(userIds, userId)) { in getNotInstalledUserIds()
161 excludedUserIds = ArrayUtils.removeInt(excludedUserIds, userId); in getNotInstalledUserIds()
/frameworks/base/graphics/java/android/graphics/
DTemporaryBuffer.java20 import com.android.internal.util.ArrayUtils;
36 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/services/tests/servicestests/src/com/android/server/pm/
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/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 …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
DPowerWhitelistBackend.java34 import com.android.internal.util.ArrayUtils;
117 if (ArrayUtils.isEmpty(pkgs)) { in isWhitelisted()
134 if (ArrayUtils.isEmpty(pkgs)) { in isSysWhitelistedExceptIdle()
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DCustomConfigLoader.java27 import com.android.internal.util.ArrayUtils;
108 if (!ArrayUtils.isEmpty(configs)) { in loadCarrierActionList()
164 if (!ArrayUtils.isEmpty(actions)) { in matchConfig()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DScanResultUtil.java23 import com.android.internal.util.ArrayUtils;
188 if (ArrayUtils.size(r.radioChainInfos) == 1) { in dumpScanResults()
191 } else if (ArrayUtils.size(r.radioChainInfos) == 2) { in dumpScanResults()

123456789