Home
last modified time | relevance | path

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

/aosp12/packages/apps/TV/tests/robotests/src/com/android/tv/util/
H A DMultiLongSparseArrayTest.java41 sparseArray.put(0, "foo"); in testOneElement()
48 sparseArray.put(0, "foo"); in testTwoElements()
49 sparseArray.put(0, "bar"); in testTwoElements()
56 sparseArray.clearEmptyCache(); in testClearEmptyCache()
58 sparseArray.put(0, "foo"); in testClearEmptyCache()
59 sparseArray.remove(0, "foo"); in testClearEmptyCache()
61 sparseArray.clearEmptyCache(); in testClearEmptyCache()
68 sparseArray.clearEmptyCache(); in testMaxEmptyCacheSize()
71 sparseArray.put(i, "foo"); in testMaxEmptyCacheSize()
78 sparseArray.clearEmptyCache(); in testMaxEmptyCacheSize()
[all …]
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DSparseArrayUtils.kt27 val sparseArray = when { regex
32 sparseArray.put(i, v)
34 return sparseArray
47 val sparseArray = SparseArray<T>(size) regex
51 return sparseArray
62 val sparseArray = when { regex
71 return sparseArray
81 private val sparseArray: SparseArray<T>
87 val size = sparseArray.size()
89 val key = sparseArray.keyAt(i)
[all …]
/aosp12/frameworks/base/core/tests/coretests/src/android/util/
H A 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()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
H A 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()
/aosp12/frameworks/base/core/tests/coretests/src/android/app/appsearch/external/util/
H A DBundleUtilTest.java269 SparseArray<Parcelable> sparseArray = new SparseArray<>(); in createThoroughBundle() local
270 sparseArray.put(24, toy1); in createThoroughBundle()
271 sparseArray.put(1025, toy2); in createThoroughBundle()
272 b.putSparseParcelableArray("sparceParcelableArray", sparseArray); in createThoroughBundle()
/aosp12/frameworks/base/tests/Codegen/src/com/android/codegentest/
H A 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()
/aosp12/frameworks/base/services/core/java/com/android/server/hdmi/
H A DHdmiUtils.java414 SparseArray<T> sparseArray) { in dumpSparseArray() argument
417 int size = sparseArray.size(); in dumpSparseArray()
419 int key = sparseArray.keyAt(i); in dumpSparseArray()
420 T value = sparseArray.get(key); in dumpSparseArray()
/aosp12/packages/apps/Launcher3/src/com/android/launcher3/allapps/
H A DAllAppsContainerView.java167 protected void dispatchRestoreInstanceState(SparseArray<Parcelable> sparseArray) { in dispatchRestoreInstanceState() argument
173 super.dispatchRestoreInstanceState(sparseArray); in dispatchRestoreInstanceState()
178 Bundle state = (Bundle) sparseArray.get(R.id.work_tab_state_id, null); in dispatchRestoreInstanceState()