Home
last modified time | relevance | path

Searched refs:sparseArray (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DSparseArrayUtils.kt27 val sparseArray = when { in <lambda>() constant
32 sparseArray.put(i, v) in <lambda>()
34 return sparseArray in <lambda>()
47 val sparseArray = SparseArray<T>(size) in associateByToSparseArray() constant
49 sparseArray.put(keySelector(value), value) in associateByToSparseArray()
51 return sparseArray in associateByToSparseArray()
62 val sparseArray = when { in foldToSparseArray() constant
68 val acc = sparseArray.get(key) ?: initial in foldToSparseArray()
69 sparseArray.put(key, operation(acc, elem)) in foldToSparseArray()
71 return sparseArray in foldToSparseArray()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/backup/utils/
DSparseArrayUtilsTest.java40 SparseArray<HashSet<String>> sparseArray = new SparseArray<>(); in union_mergesSets() local
41 sparseArray.append(12, Sets.newHashSet("a", "b", "c")); in union_mergesSets()
42 sparseArray.append(45, Sets.newHashSet("d", "e")); in union_mergesSets()
43 sparseArray.append(46, Sets.newHashSet()); in union_mergesSets()
44 sparseArray.append(66, Sets.newHashSet("a", "e", "f")); in union_mergesSets()
46 assertThat(SparseArrayUtils.union(sparseArray)).isEqualTo( in union_mergesSets()
52 SparseArray<HashSet<String>> sparseArray = new SparseArray<>(); in union_returnsEmptySetForEmptyList() local
54 assertThat(SparseArrayUtils.union(sparseArray)).isEqualTo(Sets.newHashSet()); in union_returnsEmptySetForEmptyList()
/frameworks/base/core/tests/coretests/src/android/util/
DLongSparseArrayTest.java36 final LongSparseArray<Integer> sparseArray = new LongSparseArray(); in testRemoveIf() local
39 sparseArray.put(i, j); in testRemoveIf()
40 sparseArray.put(-i, j); in testRemoveIf()
41 sparseArray.put(j, -i); in testRemoveIf()
42 sparseArray.put(-j, -i); in testRemoveIf()
47 sparseArray.removeIf(predicate); in testRemoveIf()
49 for (int i = 0; i < sparseArray.size(); ++i) { in testRemoveIf()
50 assertThat(predicate.test(sparseArray.keyAt(i), sparseArray.valueAt(i))) in testRemoveIf()
/frameworks/base/tests/Codegen/src/com/android/codegentest/
DParcelAllTheThingsDataClass.java77 @NonNull SparseArray<SampleWithCustomBuilder> sparseArray, in ParcelAllTheThingsDataClass() argument
95 this.mSparseArray = sparseArray;
203 …SparseArray<SampleWithCustomBuilder> sparseArray = (SparseArray) in.readSparseArray(SampleWithCust… in ParcelAllTheThingsDataClass() local
222 this.mSparseArray = sparseArray; in ParcelAllTheThingsDataClass()
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiUtils.java403 SparseArray<T> sparseArray) { in dumpSparseArray() argument
406 int size = sparseArray.size(); in dumpSparseArray()
408 int key = sparseArray.keyAt(i); in dumpSparseArray()
409 T value = sparseArray.get(key); in dumpSparseArray()