/frameworks/base/services/core/java/com/android/server/display/mode/ |
D | VotesStorage.java | 23 import android.util.SparseArray; 49 private final SparseArray<SparseArray<Vote>> mVotesByDisplay = new SparseArray<>(); 63 SparseArray<Vote> getVotes(int displayId) { in getVotes() 64 SparseArray<Vote> votesLocal; in getVotes() 65 SparseArray<Vote> globalVotesLocal; in getVotes() 67 SparseArray<Vote> displayVotes = mVotesByDisplay.get(displayId); in getVotes() 68 votesLocal = displayVotes != null ? displayVotes.clone() : new SparseArray<>(); in getVotes() 69 SparseArray<Vote> globalVotes = mVotesByDisplay.get(GLOBAL_ID); in getVotes() 70 globalVotesLocal = globalVotes != null ? globalVotes.clone() : new SparseArray<>(); in getVotes() 100 SparseArray<Vote> votes; in updateVote() [all …]
|
D | SkinThermalStatusObserver.java | 25 import android.util.SparseArray; 51 private final SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> 52 mThermalThrottlingByDisplay = new SparseArray<>(); 70 SparseArray<SurfaceControl.RefreshRateRange> throttlingMap) { in findBestMatchingRefreshRateRange() 150 SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> localMap = new SparseArray<>( in populateInitialDisplayInfo() 170 SparseArray<SurfaceControl.RefreshRateRange> throttlingMap = in updateThermalRefreshRateThrottling() 186 SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> localMap; in updateVotes() 203 SparseArray<SurfaceControl.RefreshRateRange> localMap; in updateVoteForDisplay() 222 SparseArray<SurfaceControl.RefreshRateRange> throttlingMap) { in reportThrottlingIfNeeded() 260 SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> localMap; in dumpLocked()
|
/frameworks/base/services/permission/java/com/android/server/permission/access/collection/ |
D | SparseArrayExtensions.kt | 19 import android.util.SparseArray in <lambda>() 21 inline fun <T> SparseArray<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in <lambda>() 30 inline fun <T> SparseArray<T>.anyIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in anyIndexed() 39 inline fun <T> SparseArray<T>.forEachIndexed(action: (Int, Int, T) -> Unit) { in forEachIndexed() 45 inline fun <T> SparseArray<T>.forEachReversedIndexed(action: (Int, Int, T) -> Unit) { in forEachReversedIndexed() 51 inline fun <T> SparseArray<T>.getOrPut(key: Int, defaultValue: () -> T): T { in getOrPut() 60 inline val <T> SparseArray<T>.lastIndex: Int 64 inline operator fun <T> SparseArray<T>.minusAssign(key: Int) { in minusAssign() 68 inline fun <T> SparseArray<T>.noneIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in noneIndexed() 77 inline fun <T> SparseArray<T>.removeAllIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in removeAllIndexed() [all …]
|
/frameworks/base/core/java/android/view/translation/ |
D | TranslationResponse.java | 23 import android.util.SparseArray; 60 private final SparseArray<TranslationResponseValue> mTranslationResponseValues; 67 private final SparseArray<ViewTranslationResponse> mViewTranslationResponses; 102 builder.setTranslationResponseValues(new SparseArray<>()); in setTranslationResponseValue() 124 builder.setViewTranslationResponses(new SparseArray<>()); in setViewTranslationResponse() 131 private static SparseArray<TranslationResponseValue> defaultTranslationResponseValues() { in defaultTranslationResponseValues() 132 return new SparseArray<>(); in defaultTranslationResponseValues() 135 private static SparseArray<ViewTranslationResponse> defaultViewTranslationResponses() { in defaultViewTranslationResponses() 136 return new SparseArray<>(); in defaultViewTranslationResponses() 186 @NonNull SparseArray<TranslationResponseValue> translationResponseValues, in TranslationResponse() [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | ChangedPackagesTracker.java | 23 import android.util.SparseArray; 47 private final SparseArray<SparseArray<String>> mUserIdToSequenceToPackage = new SparseArray<>(); 54 private final SparseArray<Map<String, Integer>> mChangedPackagesSequenceNumbers = 55 new SparseArray<>(); 63 final SparseArray<String> changedPackages = mUserIdToSequenceToPackage.get(userId); in getChangedPackages() 84 void iterateAll(@NonNull BiConsumer<Integer, SparseArray<SparseArray<String>>> in iterateAll() 96 SparseArray<String> changedPackages = mUserIdToSequenceToPackage.get(userId); in updateSequenceNumber() 98 changedPackages = new SparseArray<>(); in updateSequenceNumber()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/alarm/ |
D | BackgroundRestrictedAlarmsTest.java | 24 import android.util.SparseArray; 40 private SparseArray<ArrayList<Alarm>> addPendingAlarm( in addPendingAlarm() 41 SparseArray<ArrayList<Alarm>> all, int uid, String name, boolean removeIt) { in addPendingAlarm() 52 private static String toString(SparseArray<ArrayList<Alarm>> pendingAlarms) { in toString() 83 SparseArray<ArrayList<Alarm>> pending, ArrayList<Alarm> alarmsToDeliver) { in runCheckAllPendingAlarms() 91 SparseArray<ArrayList<Alarm>> pending = new SparseArray<>(); in findAllUnrestrictedPendingBackgroundAlarmsLockedInner_empty() 103 SparseArray<ArrayList<Alarm>> pending = new SparseArray<>(); in findAllUnrestrictedPendingBackgroundAlarmsLockedInner_single_remove() 117 SparseArray<ArrayList<Alarm>> pending = new SparseArray<>(); in findAllUnrestrictedPendingBackgroundAlarmsLockedInner_single_nonremove() 131 SparseArray<ArrayList<Alarm>> pending = new SparseArray<>(); in findAllUnrestrictedPendingBackgroundAlarmsLockedInner_complex() 164 SparseArray<ArrayList<Alarm>> pending = new SparseArray<>(); in findAllUnrestrictedPendingBackgroundAlarmsLockedInner_complex_allRemove()
|
/frameworks/base/services/core/java/com/android/server/appop/ |
D | AppOpMigrationHelperImpl.java | 24 import android.util.SparseArray; 40 private SparseArray<Map<Integer, Map<String, Integer>>> mAppIdAppOpModes = null; 41 private SparseArray<Map<String, Map<String, Integer>>> mPackageAppOpModes = null; 75 final SparseArray<SparseIntArray> uidAppOpModes = new SparseArray<>(); in readLegacyAppOpState() 76 final SparseArray<ArrayMap<String, SparseIntArray>> packageAppOpModes = in readLegacyAppOpState() 77 new SparseArray<>(); in readLegacyAppOpState() 97 private SparseArray<Map<Integer, Map<String, Integer>>> getAppIdAppOpModes( in getAppIdAppOpModes() 98 SparseArray<SparseIntArray> uidAppOpModes) { in getAppIdAppOpModes() 99 SparseArray<Map<Integer, Map<String, Integer>>> userAppIdAppOpModes = new SparseArray<>(); in getAppIdAppOpModes() 117 private SparseArray<Map<String, Map<String, Integer>>> getPackageAppOpModes( in getPackageAppOpModes() [all …]
|
D | AudioRestrictionManager.java | 25 import android.util.SparseArray; 37 final SparseArray<SparseArray<Restriction>> mZenModeAudioRestrictions = new SparseArray<>(); 41 static final SparseArray<SparseBooleanArray> CAMERA_AUDIO_RESTRICTIONS; 59 CAMERA_AUDIO_RESTRICTIONS = new SparseArray<>(); 95 final SparseArray<Restriction> usageRestrictions = mZenModeAudioRestrictions.get(code); in checkZenModeRestrictionLocked() 108 SparseArray<Restriction> usageRestrictions = mZenModeAudioRestrictions.get(code); in setZenModeAudioRestriction() 110 usageRestrictions = new SparseArray<Restriction>(); in setZenModeAudioRestriction() 155 final SparseArray<Restriction> restrictions = mZenModeAudioRestrictions.valueAt(o); in dump()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | ProcessMap.java | 20 import android.util.SparseArray; 23 final ArrayMap<String, SparseArray<E>> mMap 24 = new ArrayMap<String, SparseArray<E>>(); 27 SparseArray<E> uids = mMap.get(name); in get() 33 SparseArray<E> uids = mMap.get(name); in put() 35 uids = new SparseArray<E>(2); in put() 43 SparseArray<E> uids = mMap.get(name); in remove() 54 public ArrayMap<String, SparseArray<E>> getMap() { in getMap()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuUidBpfMapReaderTest.java | 28 import android.util.SparseArray; 93 SparseArray<long[]> data = new SparseArray<>(); in testReadErrorsLimit() 114 final SparseArray<long[]> data = getTestSparseArray(800, 50); in testGetNextUid() 121 final SparseArray<long[]> data = getTestSparseArray(200, 50); in testConcurrent() 122 final SparseArray<long[]> data1 = getTestSparseArray(180, 70); in testConcurrent() 179 final SparseArray<long[]> data = getTestSparseArray(200, 50); in testRemoveUidsInRange() 182 SparseArray<long[]> changedData = new SparseArray<>(); in testRemoveUidsInRange() 192 final SparseArray<long[]> data = getTestSparseArray(200, 50); in testRemoveUidsInRange_firstAndLastAbsent() 197 SparseArray<long[]> changedData = new SparseArray<>(); in testRemoveUidsInRange_firstAndLastAbsent() 205 private void testOpenAndReadData(SparseArray<long[]> expectedData) { in testOpenAndReadData() [all …]
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | HdmiCecMessageCache.java | 20 import android.util.SparseArray; 39 private final SparseArray<SparseArray<HdmiCecMessage>> mCache = new SparseArray<>(); 54 SparseArray<HdmiCecMessage> messages = mCache.get(address); in getMessage() 91 SparseArray<HdmiCecMessage> messages = mCache.get(source); in cacheMessage() 93 messages = new SparseArray<>(); in cacheMessage()
|
/frameworks/base/services/permission/java/com/android/server/permission/access/immutable/ |
D | IntMap.kt | 19 import android.util.SparseArray 22 sealed class IntMap<T>(internal val array: SparseArray<T>) : Immutable<MutableIntMap<T>> { 44 class MutableIntMap<T>(array: SparseArray<T> = SparseArray()) : IntMap<T>(array) { in isEmpty() 60 internal fun <T> SparseArray<T>.putReturnOld(key: Int, value: T): T? { in putReturnOld() 74 internal fun <T> SparseArray<T>.removeReturnOld(key: Int): T? { in removeReturnOld() 85 internal fun <T> SparseArray<T>.setValueAtReturnOld(index: Int, value: T): T { in setValueAtReturnOld() 91 internal fun <T> SparseArray<T>.removeAtReturnOld(index: Int): T { in removeAtReturnOld() 97 internal fun <T> SparseArray<T>.gc() { in gc()
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | MessageUtilsTest.java | 25 import android.util.SparseArray; 59 private SparseArray<String> makeSparseArray(int[] keys, String[] values) throws Exception { in makeSparseArray() 61 SparseArray<String> out = new SparseArray<>(); in makeSparseArray() 69 SparseArray<String> a1, SparseArray<String> a2) throws Exception { in assertSparseArrayEquals() 81 SparseArray<String> expected = makeSparseArray( in basicOperation() 89 SparseArray<String> expected = makeSparseArray( in withPrefixes()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | SparseArrayUtils.kt | 19 import android.util.SparseArray in <lambda>() 26 fun <T> Sequence<Pair<Int, T>>.toSparseArray(size: Int = -1): SparseArray<T> { in <lambda>() 28 size < 0 -> SparseArray<T>() in <lambda>() 29 else -> SparseArray<T>(size) in <lambda>() 46 ): SparseArray<T> { in associateByToSparseArray() 47 val sparseArray = SparseArray<T>(size) in associateByToSparseArray() 61 ): SparseArray<R> { in foldToSparseArray() 63 size < 0 -> SparseArray<R>() in foldToSparseArray() 64 else -> SparseArray<R>(size) in foldToSparseArray() 78 fun <T> SparseArray<T>.asMap(): Map<Int, T> = SparseArrayMapWrapper(this) in asMap() [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/ |
D | SkinThermalStatusObserverTest.java | 29 import android.util.SparseArray; 104 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testNotifyWithDefaultVotesForCritical() 114 SparseArray<Vote> otherDisplayVotes = mStorage.getVotes(DISPLAY_ID_OTHER); in testNotifyWithDefaultVotesForCritical() 156 SparseArray<SurfaceControl.RefreshRateRange> displayConfig = new SparseArray<>(); in testNotifiesWithConfigVotes() 159 SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> config = new SparseArray<>(); in testNotifiesWithConfigVotes() 173 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID); in testNotifiesWithConfigVotes() 196 SparseArray<Vote> displayVotes = mStorage.getVotes(DISPLAY_ID_ADDED); in testDisplayAdded() 230 private final SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> mOverriddenConfig; 238 this(registerThermalListener, new SparseArray<>()); in RegisteringFakesInjector() 242 SparseArray<SparseArray<SurfaceControl.RefreshRateRange>> overriddenConfig) { in RegisteringFakesInjector() [all …]
|
/frameworks/base/services/core/java/com/android/server/wallpaper/ |
D | WallpaperData.java | 35 import android.util.SparseArray; 117 SparseArray<Float> mUidToDimAmount = new SparseArray<>(); 164 private final SparseArray<File> mWallpaperFiles = new SparseArray<>(); 165 private final SparseArray<File> mCropFiles = new SparseArray<>(); 172 SparseArray<Rect> mCropHints = new SparseArray<>(); 221 private File getFile(SparseArray<File> map, String fileName) { in getFile()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/cpu/ |
D | CpuInfoReaderTest.java | 30 import android.util.SparseArray; 95 SparseArray<CpuInfoReader.CpuInfo> actualCpuInfos = cpuInfoReader.readCpuInfos(); in testReadCpuInfoWithTimeInState() 96 SparseArray<CpuInfoReader.CpuInfo> expectedCpuInfos = new SparseArray<>(); in testReadCpuInfoWithTimeInState() 200 SparseArray<CpuInfoReader.CpuInfo> actualCpuInfos = cpuInfoReader.readCpuInfos(); in testReadCpuInfoWithoutTimeInState() 201 SparseArray<CpuInfoReader.CpuInfo> expectedCpuInfos = new SparseArray<>(); in testReadCpuInfoWithoutTimeInState() 307 SparseArray<CpuInfoReader.CpuInfo> actualCpuInfos = cpuInfoReader.readCpuInfos(); in testReadCpuInfoWithCorruptedCpuset() 308 SparseArray<CpuInfoReader.CpuInfo> expectedCpuInfos = new SparseArray<>(); in testReadCpuInfoWithCorruptedCpuset() 345 SparseArray<CpuInfoReader.CpuInfo> actualCpuInfos = cpuInfoReader.readCpuInfos(); in testReadCpuInfoWithCorruptedCpufreq() 346 SparseArray<CpuInfoReader.CpuInfo> expectedCpuInfos = new SparseArray<>(); in testReadCpuInfoWithCorruptedCpufreq() 357 SparseArray<CpuInfoReader.CpuInfo> actualCpuInfos = cpuInfoReader.readCpuInfos(); in testReadCpuInfoWithCorruptedProcStat() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
D | DumpUtilsTest.java | 32 import android.util.SparseArray; 195 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_empty() 206 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_oneElement() 220 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_oneNullElement() 234 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_multipleElements() 252 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_keyDumperOnly() 273 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_valueDumperOnly() 295 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArray_keyAndValueDumpers() 319 SparseArray<String> array = new SparseArray<>(); in testDumpSparseArrayValues()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/ |
D | MagnificationScaleProvider.java | 26 import android.util.SparseArray; 50 private final SparseArray<SparseArray<Float>> mUsersScales = new SparseArray(); 98 private SparseArray<Float> getScalesWithCurrentUser() { in getScalesWithCurrentUser() 99 SparseArray<Float> scales = mUsersScales.get(mCurrentUserId); in getScalesWithCurrentUser() 101 scales = new SparseArray<>(); in getScalesWithCurrentUser()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ |
D | NotifRemoteViewCacheImpl.java | 20 import android.util.SparseArray; 38 private final Map<NotificationEntry, SparseArray<RemoteViews>> mNotifCachedContentViews = 53 SparseArray<RemoteViews> contentViews = mNotifCachedContentViews.get(entry); in getCachedView() 70 SparseArray<RemoteViews> contentViews = mNotifCachedContentViews.get(entry); in putCachedView() 79 SparseArray<RemoteViews> contentViews = mNotifCachedContentViews.get(entry); in removeCachedView() 88 SparseArray<RemoteViews> contentViews = mNotifCachedContentViews.get(entry); in clearCache() 98 mNotifCachedContentViews.put(entry, new SparseArray<>());
|
/frameworks/layoutlib/bridge/src/android/content/res/ |
D | AssetManager_Delegate.java | 22 import android.util.SparseArray; 72 /*package*/ static SparseArray<String> getAssignedPackageIdentifiers(AssetManager manager) { in getAssignedPackageIdentifiers() 73 return new SparseArray<>(); in getAssignedPackageIdentifiers() 77 /*package*/ static SparseArray<String> getAssignedPackageIdentifiers(AssetManager manager, in getAssignedPackageIdentifiers() 79 return new SparseArray<>(); in getAssignedPackageIdentifiers()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/backup/utils/ |
D | SparseArrayUtilsTest.java | 22 import android.util.SparseArray; 40 SparseArray<HashSet<String>> sparseArray = new SparseArray<>(); in union_mergesSets() 52 SparseArray<HashSet<String>> sparseArray = new SparseArray<>(); in union_returnsEmptySetForEmptyList()
|
/frameworks/base/telephony/java/android/telephony/ims/compat/ |
D | ImsService.java | 30 import android.util.SparseArray; 85 private final SparseArray<SparseArray<ImsFeature>> mFeaturesBySlot = new SparseArray<>(); 146 public SparseArray<ImsFeature> getFeatures(int slotId) { in getFeatures() 190 SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId); in addImsFeature() 193 features = new SparseArray<>(); in addImsFeature() 204 SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId); in addImsFeatureStatusCallback() 221 SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId); in removeImsFeatureStatusCallback() 237 SparseArray<ImsFeature> features = mFeaturesBySlot.get(slotId); in removeImsFeature()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/storage/ |
D | BubblePersistentRepository.kt | 21 import android.util.SparseArray 31 fun persistsToDisk(bubbles: SparseArray<List<BubbleEntity>>): Boolean { in persistsToDisk() 51 fun readFromDisk(): SparseArray<List<BubbleEntity>> { in readFromDisk() 53 if (!bubbleFile.exists()) return SparseArray() in readFromDisk() 57 return SparseArray() in readFromDisk()
|
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | HapticFeedbackCustomizationTest.java | 37 import android.util.SparseArray; 91 /* expectedCustomizations= */ new SparseArray<>()); in testParseCustomizations_noCustomization_success() 116 SparseArray<VibrationEffect> expectedMapping = new SparseArray<>(); in testParseCustomizations_oneVibrationCustomization_success() 131 SparseArray<VibrationEffect> expectedMapping = new SparseArray<>(); in testParseCustomizations_oneVibrationSelectCustomization_success() 159 SparseArray<VibrationEffect> expectedMapping = new SparseArray<>(); in testParseCustomizations_multipleCustomizations_success() 193 assertParseCustomizationsSucceeds(xml, new SparseArray<>()); in testParseCustomizations_multipleCustomizations_noSupportedVibration_success() 227 SparseArray<VibrationEffect> expectedMapping = new SparseArray<>(); in testParseCustomizations_multipleCustomizations_someUnsupportedVibration_success() 404 String xml, SparseArray<VibrationEffect> expectedCustomizations) throws Exception { in assertParseCustomizationsSucceeds()
|