Home
last modified time | relevance | path

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

12345678910>>...15

/aosp12/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
H A DArrayUtilsTest.java19 import static com.android.internal.util.ArrayUtils.concatElements;
92 assertFalse(ArrayUtils.contains(new int[] { }, 2)); in testContainsInt()
97 ArrayUtils.appendInt(null, 1)); in testAppendInt()
99 ArrayUtils.appendInt(new int[] { }, 1)); in testAppendInt()
101 ArrayUtils.appendInt(new int[] { 1 }, 2)); in testAppendInt()
107 assertNull(ArrayUtils.removeInt(null, 1)); in testRemoveInt()
109 ArrayUtils.removeInt(new int[] { }, 1)); in testRemoveInt()
134 ArrayUtils.appendLong(null, 1)); in testAppendLong()
136 ArrayUtils.appendLong(new long[] { }, 1)); in testAppendLong()
144 assertNull(ArrayUtils.removeLong(null, 1)); in testRemoveLong()
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DArrayUtilsTest.java43 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
124 ArrayUtils.throwsIfOutOfBounds(10, 2, 6); in testThrowsIfOutOfBounds_passesWhenRangeInsideArray()
129 ArrayUtils.throwsIfOutOfBounds(10, 0, 10); in testThrowsIfOutOfBounds_passesWhenRangeIsWholeArray()
134 ArrayUtils.throwsIfOutOfBounds(10, 0, 0); in testThrowsIfOutOfBounds_passesWhenEmptyRangeAtStart()
139 ArrayUtils.throwsIfOutOfBounds(10, 10, 0); in testThrowsIfOutOfBounds_passesWhenEmptyRangeAtEnd()
144 ArrayUtils.throwsIfOutOfBounds(0, 0, 0); in testThrowsIfOutOfBounds_passesWhenEmptyArray()
150 ArrayUtils.throwsIfOutOfBounds(10, -1, 5); in testThrowsIfOutOfBounds_failsWhenRangeStartNegative()
160 ArrayUtils.throwsIfOutOfBounds(10, 5, -1); in testThrowsIfOutOfBounds_failsWhenCountNegative()
170 ArrayUtils.throwsIfOutOfBounds(10, 11, 0); in testThrowsIfOutOfBounds_failsWhenRangeStartTooHigh()
180 ArrayUtils.throwsIfOutOfBounds(10, 5, 6); in testThrowsIfOutOfBounds_failsWhenRangeEndTooHigh()
[all …]
/aosp12/frameworks/base/core/java/android/database/
H A DTranslatingCursor.java27 import com.android.internal.util.ArrayUtils;
148 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getDouble()
157 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getFloat()
166 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getInt()
175 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getLong()
184 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getShort()
193 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getString()
203 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in copyStringToBuffer()
212 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getBlob()
221 if (ArrayUtils.contains(mTranslateColumnIndices, columnIndex)) { in getType()
[all …]
/aosp12/frameworks/base/keystore/java/android/security/keystore/
H A DKeyInfo.java124 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyInfo()
126 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyInfo()
127 mDigests = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(digests)); in KeyInfo()
128 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyInfo()
224 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
236 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
248 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
259 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
H A DKeyProtection.java268 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyProtection()
270 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyProtection()
271 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in KeyProtection()
272 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyProtection()
337 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
349 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
367 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
389 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
698 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setSignaturePaddings()
722 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in setDigests()
[all …]
H A DKeyGenParameterSpec.java403 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in KeyGenParameterSpec()
405 ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings)); in KeyGenParameterSpec()
406 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings)); in KeyGenParameterSpec()
407 mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes)); in KeyGenParameterSpec()
578 return ArrayUtils.cloneIfNotEmpty(mDigests); in getDigests()
602 return ArrayUtils.cloneIfNotEmpty(mEncryptionPaddings); in getEncryptionPaddings()
614 return ArrayUtils.cloneIfNotEmpty(mSignaturePaddings); in getSignaturePaddings()
626 return ArrayUtils.cloneIfNotEmpty(mBlockModes); in getBlockModes()
1212 mDigests = ArrayUtils.cloneIfNotEmpty(digests); in setDigests()
1252 mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(paddings); in setSignaturePaddings()
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/android/app/usage/
H A DUsageStatsPersistenceTest.java25 import com.android.internal.util.ArrayUtils;
60 if (!(ArrayUtils.contains(USAGESTATS_PERSISTED_FIELDS, field.getName()) in testUsageStatsFields()
61 || ArrayUtils.contains(USAGESTATS_IGNORED_FIELDS, field.getName()))) { in testUsageStatsFields()
98 if (!(ArrayUtils.contains(USAGEEVENTS_PERSISTED_FIELDS, name) in testUsageEventsFields()
99 || ArrayUtils.contains(USAGEEVENTS_IGNORED_FIELDS, name) in testUsageEventsFields()
100 || ArrayUtils.contains(EVENT_TYPES, name))) { in testUsageEventsFields()
/aosp12/frameworks/base/keystore/java/android/security/keystore2/
H A DKeyStoreCryptoOperationChunkedStreamer.java23 import android.security.keystore.ArrayUtils;
139 int inputConsumed = ArrayUtils.copy(input, inputOffset, mChunk, mChunkLength, in update()
147 output = ArrayUtils.concat(output, o); in update()
156 byte[] o = mKeyStoreStream.update(ArrayUtils.subarray(input, inputOffset, in update()
162 output = ArrayUtils.concat(output, o); in update()
169 mChunkLength = ArrayUtils.copy(input, inputOffset, mChunk, 0, inputLength); in update()
180 byte[] finalChunk = ArrayUtils.subarray(mChunk, 0, mChunkLength); in doFinal()
188 output = ArrayUtils.concat(output, o); in doFinal()
/aosp12/frameworks/base/core/java/com/android/internal/util/
H A DGrowingArrayUtils.java49 T[] newArray = ArrayUtils.newUnpaddedArray( in append()
66 int[] newArray = ArrayUtils.newUnpaddedIntArray(growSize(currentSize)); in append()
81 long[] newArray = ArrayUtils.newUnpaddedLongArray(growSize(currentSize)); in append()
96 boolean[] newArray = ArrayUtils.newUnpaddedBooleanArray(growSize(currentSize)); in append()
111 float[] newArray = ArrayUtils.newUnpaddedFloatArray(growSize(currentSize)); in append()
140 T[] newArray = ArrayUtils.newUnpaddedArray((Class<T>)array.getClass().getComponentType(), in insert()
160 int[] newArray = ArrayUtils.newUnpaddedIntArray(growSize(currentSize)); in insert()
179 long[] newArray = ArrayUtils.newUnpaddedLongArray(growSize(currentSize)); in insert()
198 boolean[] newArray = ArrayUtils.newUnpaddedBooleanArray(growSize(currentSize)); in insert()
/aosp12/frameworks/base/core/java/android/util/
H A DIntArray.java19 import com.android.internal.util.ArrayUtils;
56 mValues = ArrayUtils.newUnpaddedIntArray(initialCapacity); in IntArray()
107 ArrayUtils.checkBounds(mSize, index); in add()
167 final int[] newValues = ArrayUtils.newUnpaddedIntArray(newCapacity); in ensureCapacity()
191 ArrayUtils.checkBounds(mSize, index); in get()
199 ArrayUtils.checkBounds(mSize, index); in set()
221 ArrayUtils.checkBounds(mSize, index); in remove()
H A DLongArray.java23 import com.android.internal.util.ArrayUtils;
61 mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongArray()
113 ArrayUtils.checkBounds(mSize, index); in add()
144 final long[] newValues = ArrayUtils.newUnpaddedLongArray(newCapacity); in ensureCapacity()
174 ArrayUtils.checkBounds(mSize, index); in get()
182 ArrayUtils.checkBounds(mSize, index); in set()
204 ArrayUtils.checkBounds(mSize, index); in remove()
H A DLongArrayQueue.java19 import com.android.internal.util.ArrayUtils;
49 mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity); in LongArrayQueue()
67 final long[] newArray = ArrayUtils.newUnpaddedLongArray(newSize); in grow()
/aosp12/frameworks/base/core/java/android/text/
H A 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()
/aosp12/frameworks/base/services/core/java/com/android/server/pm/parsing/library/
H A DPackageSharedLibraryUpdater.java22 import com.android.internal.util.ArrayUtils;
59 return ArrayUtils.contains(usesLibraries, apacheHttpLegacy) in isLibraryPresent()
60 || ArrayUtils.contains(usesOptionalLibraries, apacheHttpLegacy); in isLibraryPresent()
79 if (ArrayUtils.contains(usesLibraries, existingLibrary)) { in prefixImplicitDependency()
81 } else if (ArrayUtils.contains(usesOptionalLibraries, existingLibrary)) { in prefixImplicitDependency()
/aosp12/frameworks/base/services/core/java/com/android/server/pm/
H A DPackageKeySetData.java21 import com.android.internal.util.ArrayUtils;
42 mUpgradeKeySets = ArrayUtils.cloneOrNull(original.mUpgradeKeySets); in PackageKeySetData()
63 mUpgradeKeySets = ArrayUtils.appendLong(mUpgradeKeySets, ks); in addUpgradeKeySet()
76 mUpgradeKeySets = ArrayUtils.appendLong(mUpgradeKeySets, ks); in addUpgradeKeySetById()
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
H A DLocalBluetoothProfileManager.java43 import com.android.internal.util.ArrayUtils;
484 if ((ArrayUtils.contains(localUuids, BluetoothUuid.HSP_AG) in updateProfiles()
485 && ArrayUtils.contains(uuids, BluetoothUuid.HSP)) in updateProfiles()
486 || (ArrayUtils.contains(localUuids, BluetoothUuid.HFP_AG) in updateProfiles()
487 && ArrayUtils.contains(uuids, BluetoothUuid.HFP))) { in updateProfiles()
494 ArrayUtils.contains(uuids, BluetoothUuid.HFP_AG) in updateProfiles()
495 && ArrayUtils.contains(localUuids, BluetoothUuid.HFP)) { in updateProfiles()
516 if ((ArrayUtils.contains(uuids, BluetoothUuid.HID) in updateProfiles()
517 || ArrayUtils.contains(uuids, BluetoothUuid.HOGP)) && mHidProfile != null) { in updateProfiles()
530 if ((ArrayUtils.contains(uuids, BluetoothUuid.NAP) && mPanProfile != null) in updateProfiles()
[all …]
H A 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()
/aosp12/frameworks/base/services/core/java/com/android/server/audio/
H A DFadeOutManager.java26 import com.android.internal.util.ArrayUtils;
113 if (ArrayUtils.contains(UNFADEABLE_PLAYER_TYPES, apc.getPlayerType())) { in canBeFadedOut()
117 if (ArrayUtils.contains(UNFADEABLE_CONTENT_TYPES, in canBeFadedOut()
125 if (!ArrayUtils.contains(FADEABLE_USAGES, apc.getAudioAttributes().getUsage())) { in canBeFadedOut()
135 if (ArrayUtils.contains(UNFADEABLE_CONTENT_TYPES, aa.getContentType())) { in getFadeOutDurationOnFocusLossMillis()
138 if (!ArrayUtils.contains(FADEABLE_USAGES, aa.getUsage())) { in getFadeOutDurationOnFocusLossMillis()
/aosp12/frameworks/base/services/core/java/com/android/server/utils/
H A DWatchedSparseBooleanMatrix.java25 import com.android.internal.util.ArrayUtils;
160 mInUse = ArrayUtils.newUnpaddedBooleanArray(mOrder); in WatchedSparseBooleanMatrix()
161 mKeys = ArrayUtils.newUnpaddedIntArray(mOrder); in WatchedSparseBooleanMatrix()
162 mMap = ArrayUtils.newUnpaddedIntArray(mOrder); in WatchedSparseBooleanMatrix()
163 mValues = ArrayUtils.newUnpaddedIntArray(mOrder * mOrder / PACKING); in WatchedSparseBooleanMatrix()
428 boolean[] newInUse = ArrayUtils.newUnpaddedBooleanArray(newOrder); in resizeMatrix()
430 int[] newMap = ArrayUtils.newUnpaddedIntArray(newOrder); in resizeMatrix()
432 int[] newKeys = ArrayUtils.newUnpaddedIntArray(newOrder); in resizeMatrix()
435 int[] newValues = ArrayUtils.newUnpaddedIntArray(newOrder * newOrder / PACKING); in resizeMatrix()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
H A DPackageParserTest.java63 import com.android.internal.util.ArrayUtils;
591 assertEquals(ArrayUtils.size(a.getPermissions()), ArrayUtils.size(b.getPermissions())); in assertPackagesEqual()
596 assertEquals(ArrayUtils.size(a.getPermissionGroups()), in assertPackagesEqual()
597 ArrayUtils.size(b.getPermissionGroups())); in assertPackagesEqual()
603 assertEquals(ArrayUtils.size(a.getActivities()), ArrayUtils.size(b.getActivities())); in assertPackagesEqual()
608 assertEquals(ArrayUtils.size(a.getReceivers()), ArrayUtils.size(b.getReceivers())); in assertPackagesEqual()
613 assertEquals(ArrayUtils.size(a.getProviders()), ArrayUtils.size(b.getProviders())); in assertPackagesEqual()
618 assertEquals(ArrayUtils.size(a.getServices()), ArrayUtils.size(b.getServices())); in assertPackagesEqual()
619 for (int i = 0; i < ArrayUtils.size(a.getServices()); ++i) { in assertPackagesEqual()
623 assertEquals(ArrayUtils.size(a.getInstrumentations()), in assertPackagesEqual()
[all …]
H A 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()
/aosp12/frameworks/base/services/core/java/com/android/server/om/
H A DOverlayActorEnforcer.java29 import com.android.internal.util.ArrayUtils;
67 if (ArrayUtils.isEmpty(namespace)) { in getPackageNameForActor()
126 if (ArrayUtils.isEmpty(callingPackageNames)) { in isAllowedActor()
131 if (ArrayUtils.contains(callingPackageNames, targetPackageName)) { in isAllowedActor()
202 if (ArrayUtils.contains(callingPackageNames, actorPackageName)) { in isAllowedActor()
/aosp12/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/
H A DFakeUserInfoHelper.java23 import com.android.internal.util.ArrayUtils;
76 Preconditions.checkArgument(ArrayUtils.contains(currentProfileUserIds, parentUser)); in setCurrentUserIds()
99 return ArrayUtils.contains(getProfileIds(mCurrentUserId), userId); in isCurrentUserId()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
H A DPhonePolicy.java49 import com.android.internal.util.ArrayUtils;
284 if ((hidService != null) && (ArrayUtils.contains(uuids, BluetoothUuid.HID) in processInitProfilePriorities()
285 || ArrayUtils.contains(uuids, BluetoothUuid.HOGP)) && ( in processInitProfilePriorities()
293 if ((headsetService != null) && ((ArrayUtils.contains(uuids, BluetoothUuid.HSP) in processInitProfilePriorities()
294 || ArrayUtils.contains(uuids, BluetoothUuid.HFP)) && ( in processInitProfilePriorities()
301 if ((a2dpService != null) && (ArrayUtils.contains(uuids, BluetoothUuid.A2DP_SINK) in processInitProfilePriorities()
302 || ArrayUtils.contains(uuids, BluetoothUuid.ADV_AUDIO_DIST)) && ( in processInitProfilePriorities()
309 if ((panService != null) && (ArrayUtils.contains(uuids, BluetoothUuid.PANU) && ( in processInitProfilePriorities()
318 if ((hearingAidService != null) && ArrayUtils.contains(uuids, in processInitProfilePriorities()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/
H A DShadowRestrictedLockUtilsInternal.java22 import com.android.internal.util.ArrayUtils;
56 if (ArrayUtils.contains(sRestrictedPkgs, packageName)) { in checkIfMeteredDataRestricted()
72 if (ArrayUtils.contains(sDisabledTypes, accountType)) { in checkIfAccountManagementDisabled()

12345678910>>...15