Home
last modified time | relevance | path

Searched refs:collection (Results 1 – 25 of 181) sorted by relevance

12345678

/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DArrayUtilsTest.java42 ArrayList<Object> collection = null; in testUnstableRemoveIf() local
43 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
45 collection = new ArrayList<>(); in testUnstableRemoveIf()
46 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
48 collection = new ArrayList<>(Collections.singletonList(a)); in testUnstableRemoveIf()
49 assertEquals(0, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
50 assertEquals(1, collection.size()); in testUnstableRemoveIf()
51 assertTrue(collection.contains(a)); in testUnstableRemoveIf()
53 collection = new ArrayList<>(Collections.singletonList(null)); in testUnstableRemoveIf()
54 assertEquals(1, ArrayUtils.unstableRemoveIf(collection, isNull)); in testUnstableRemoveIf()
[all …]
/frameworks/minikin/tests/unittest/
DFontCollectionItemizeTest.cpp59 std::vector<FontCollection::Run> itemize(const std::shared_ptr<FontCollection>& collection, in itemize() argument
68 auto result = collection->itemize(U16StringPiece(buf, len), style, localeListId, in itemize()
73 auto resultWithRunMax = collection->itemize(U16StringPiece(buf, len), style, localeListId, in itemize()
86 std::vector<FontCollection::Run> itemize(const std::shared_ptr<FontCollection>& collection, in itemize() argument
88 return itemize(collection, str, FontStyle(), localeList); in itemize()
92 std::vector<FontCollection::Run> itemize(const std::shared_ptr<FontCollection>& collection, in itemize() argument
94 return itemize(collection, str, style, ""); in itemize()
98 std::vector<FontCollection::Run> itemize(const std::shared_ptr<FontCollection>& collection, in itemize() argument
100 return itemize(collection, str, FontStyle(), ""); in itemize()
116 auto collection = buildFontCollectionFromXml(kItemizeFontXml); in TEST() local
[all …]
DFontCollectionTest.cpp80 auto collection = buildFontCollectionFromXml(kEmojiXmlFile); in TEST() local
83 EXPECT_TRUE(collection->hasVariationSelector(0x2623, 0xFE0E)); in TEST()
84 EXPECT_TRUE(collection->hasVariationSelector(0x2623, 0xFE0F)); in TEST()
88 EXPECT_TRUE(collection->hasVariationSelector(0x2626, 0xFE0E)); in TEST()
89 EXPECT_FALSE(collection->hasVariationSelector(0x2626, 0xFE0F)); in TEST()
93 EXPECT_TRUE(collection->hasVariationSelector(0x262A, 0xFE0E)); in TEST()
94 EXPECT_TRUE(collection->hasVariationSelector(0x262A, 0xFE0F)); in TEST()
97 EXPECT_TRUE(collection->hasVariationSelector(0x262E, 0xFE0E)); in TEST()
98 EXPECT_FALSE(collection->hasVariationSelector(0x262E, 0xFE0F)); in TEST()
101 EXPECT_FALSE(collection->hasVariationSelector(0x1F3FD, 0xFE0E)); in TEST()
[all …]
DLayoutCacheTest.cpp135 auto collection = buildFontCollection("Ascii.ttf"); in TEST() local
136 MinikinPaint paint1(collection); in TEST()
140 MinikinPaint paint2(collection); in TEST()
148 auto collection = buildFontCollection("Ascii.ttf"); in TEST() local
149 MinikinPaint paint1(collection); in TEST()
153 MinikinPaint paint2(collection); in TEST()
161 auto collection = buildFontCollection("Ascii.ttf"); in TEST() local
162 MinikinPaint paint1(collection); in TEST()
166 MinikinPaint paint2(collection); in TEST()
174 auto collection = buildFontCollection("Ascii.ttf"); in TEST() local
[all …]
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsCollectionTest.java118 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS); in testReadLegacyNetwork() local
119 collection.readLegacyNetwork(testFile); in testReadLegacyNetwork()
122 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI), in testReadLegacyNetwork()
127 collection.write(new DataOutputStream(bos)); in testReadLegacyNetwork()
130 collection.reset(); in testReadLegacyNetwork()
131 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI), in testReadLegacyNetwork()
135 collection.read(new ByteArrayInputStream(bos.toByteArray())); in testReadLegacyNetwork()
136 assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI), in testReadLegacyNetwork()
146 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS); in testReadLegacyUid() local
147 collection.readLegacyUid(testFile, false); in testReadLegacyUid()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DStringUtilsTests.cpp25 auto collection = StringUtils::split("a b c"); in TEST() local
27 EXPECT_TRUE(collection.has("a")); in TEST()
28 EXPECT_TRUE(collection.has("b")); in TEST()
29 EXPECT_TRUE(collection.has("c")); in TEST()
30 EXPECT_FALSE(collection.has("d")); in TEST()
34 auto collection = StringUtils::split("GL_ext1 GL_ext2 GL_ext3"); in TEST() local
36 EXPECT_TRUE(collection.has("GL_ext1")); in TEST()
37 EXPECT_FALSE(collection.has("GL_ext")); // string present, but not in list in TEST()
/frameworks/base/core/java/android/util/
DMapCollections.java174 public boolean addAll(Collection<? extends Map.Entry<K, V>> collection) { in addAll() argument
176 for (Map.Entry<K, V> entry : collection) { in addAll()
201 public boolean containsAll(Collection<?> collection) { in containsAll() argument
202 Iterator<?> it = collection.iterator(); in containsAll()
227 public boolean removeAll(Collection<?> collection) { in removeAll() argument
232 public boolean retainAll(Collection<?> collection) { in retainAll() argument
277 public boolean addAll(Collection<? extends K> collection) { in addAll() argument
292 public boolean containsAll(Collection<?> collection) { in containsAll() argument
293 return containsAllHelper(colGetMap(), collection); in containsAll()
317 public boolean removeAll(Collection<?> collection) { in removeAll() argument
[all …]
DArraySet.java871 public boolean containsAll(Collection<?> collection) { in containsAll() argument
872 Iterator<?> it = collection.iterator(); in containsAll()
886 public boolean addAll(Collection<? extends E> collection) { in addAll() argument
887 ensureCapacity(mSize + collection.size()); in addAll()
889 for (E value : collection) { in addAll()
901 public boolean removeAll(Collection<?> collection) { in removeAll() argument
903 for (Object value : collection) { in removeAll()
916 public boolean retainAll(Collection<?> collection) { in retainAll() argument
919 if (!collection.contains(mArray[i])) { in retainAll()
/frameworks/base/media/mca/filterpacks/native/base/
Dutilities.h75 FindOrNull(const Collection& collection, in FindOrNull() argument
77 typename Collection::const_iterator it = collection.find(key); in FindOrNull()
78 if (it == collection.end()) { in FindOrNull()
129 FindPtrOrNull(const Collection& collection, in FindPtrOrNull() argument
131 typename Collection::const_iterator it = collection.find(key); in FindPtrOrNull()
132 if (it == collection.end()) { in FindPtrOrNull()
141 bool ContainsKey(const Collection& collection, const Key& key) { in ContainsKey() argument
142 return collection.find(key) != collection.end(); in ContainsKey()
150 bool InsertIfNotPresent(Collection * const collection, in InsertIfNotPresent() argument
153 collection->insert(typename Collection::value_type(key, value)); in InsertIfNotPresent()
/frameworks/base/media/mca/filterfw/native/base/
Dutilities.h63 FindOrNull(const Collection& collection, in FindOrNull() argument
65 typename Collection::const_iterator it = collection.find(key); in FindOrNull()
66 if (it == collection.end()) { in FindOrNull()
117 FindPtrOrNull(const Collection& collection, in FindPtrOrNull() argument
119 typename Collection::const_iterator it = collection.find(key); in FindPtrOrNull()
120 if (it == collection.end()) { in FindPtrOrNull()
129 bool ContainsKey(const Collection& collection, const Key& key) { in ContainsKey() argument
130 return collection.find(key) != collection.end(); in ContainsKey()
138 bool InsertIfNotPresent(Collection * const collection, in InsertIfNotPresent() argument
141 collection->insert(typename Collection::value_type(key, value)); in InsertIfNotPresent()
/frameworks/base/tools/aapt2/io/
DZipArchive.cpp80 ZipFileCollection* collection) in ZipFileCollectionIterator() argument
81 : current_(collection->files_.begin()), end_(collection->files_.end()) {} in ZipFileCollectionIterator()
100 std::unique_ptr<ZipFileCollection> collection = in Create() local
103 int32_t result = OpenArchive(path.data(), &collection->handle_); in Create()
109 return collection; in Create()
117 result = StartIteration(collection->handle_, &cookie); in Create()
134 std::unique_ptr<IFile> file = util::make_unique<ZipFile>(collection->handle_, zip_data, in Create()
136 collection->files_by_name_[zip_entry_path] = file.get(); in Create()
137 collection->files_.push_back(std::move(file)); in Create()
145 return collection; in Create()
DFileSystem.cpp58 FileCollectionIterator::FileCollectionIterator(FileCollection* collection) in FileCollectionIterator() argument
59 : current_(collection->files_.begin()), end_(collection->files_.end()) {} in FileCollectionIterator()
73 std::unique_ptr<FileCollection> collection = in Create() local
115 collection->InsertFile(full_path); in Create()
118 return collection; in Create()
/frameworks/minikin/tests/perftests/
DFontCollection.cpp46 auto collection = in BM_FontCollection_hasVariationSelector() local
57 collection->hasVariationSelector(baseCp, vsCp); in BM_FontCollection_hasVariationSelector()
83 auto collection = in BM_FontCollection_itemize() local
94 MinikinPaint paint(collection); in BM_FontCollection_itemize()
99 collection->itemize(U16StringPiece(buffer, utf16_length), paint.fontStyle, in BM_FontCollection_itemize()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/
DAbstractCollection.java60 public boolean containsAll(Collection<?> collection) { in containsAll() argument
65 public boolean addAll(Collection<? extends T> collection) { in addAll() argument
70 public boolean removeAll(Collection<?> collection) { in removeAll() argument
75 public boolean retainAll(Collection<?> collection) { in retainAll() argument
DTrackedCollections.java40 public synchronized void track(Collection<?> collection, String tag) { in track() argument
41 CollectionState collectionState = mCollections.get(collection); in track()
46 mCollections.put(collection, collectionState); in track()
52 collectionState.lastCount = collection.size(); in track()
DTrackedObjects.java51 public static boolean isTrackedObject(Collection<?> collection) { in isTrackedObject() argument
52 return collection instanceof TrackedClass; in isTrackedObject()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsRecorder.java357 public CombiningRewriter(NetworkStatsCollection collection) { in CombiningRewriter() argument
358 mCollection = Objects.requireNonNull(collection, "missing NetworkStatsCollection"); in CombiningRewriter()
425 final NetworkStatsCollection collection = new NetworkStatsCollection(mBucketDuration); in importLegacyNetworkLocked() local
426 collection.readLegacyNetwork(file); in importLegacyNetworkLocked()
428 final long startMillis = collection.getStartMillis(); in importLegacyNetworkLocked()
429 final long endMillis = collection.getEndMillis(); in importLegacyNetworkLocked()
431 if (!collection.isEmpty()) { in importLegacyNetworkLocked()
434 mRotator.rewriteActive(new CombiningRewriter(collection), startMillis); in importLegacyNetworkLocked()
445 final NetworkStatsCollection collection = new NetworkStatsCollection(mBucketDuration); in importLegacyUidLocked() local
446 collection.readLegacyUid(file, mOnlyTags); in importLegacyUidLocked()
[all …]
/frameworks/base/core/java/android/text/method/
DNumberKeyListener.java151 static boolean addDigits(@NonNull Collection<Character> collection, @Nullable Locale locale) { in addDigits() argument
160 collection.add(Character.valueOf(digits[i].charAt(0))); in addDigits()
172 @NonNull Collection<Character> collection, @Nullable Locale locale, in addFormatCharsFromSkeleton()
203 collection.add(Character.valueOf(ch)); in addFormatCharsFromSkeleton()
210 @NonNull Collection<Character> collection, @Nullable Locale locale, in addFormatCharsFromSkeletons()
214 collection, locale, skeletons[i], symbolsToIgnore); in addFormatCharsFromSkeletons()
224 static boolean addAmPmChars(@NonNull Collection<Character> collection, in addAmPmChars() argument
234 collection.add(Character.valueOf(ch)); in addAmPmChars()
/frameworks/base/core/java/android/view/autofill/
DHelper.java72 public static @NonNull AutofillId[] toArray(Collection<AutofillId> collection) { in toArray() argument
73 if (collection == null) { in toArray()
76 final AutofillId[] array = new AutofillId[collection.size()]; in toArray()
77 collection.toArray(array); in toArray()
/frameworks/av/media/libmediahelper/include/media/
DTypeConverter.h40 static void add(Collection &collection, Type value) in add()
42 collection.push_back(value); in add()
50 static void add(Collection &collection, Type value) in add()
52 collection.add(value); in add()
60 static void add(Collection &collection, Type value) in add()
62 collection.insert(value); in add()
86 static void collectionFromString(const std::string &str, typename Traits::Collection &collection,
93 Traits::add(collection, value);
108 typename Traits::Collection &collection,
156 typename Traits::Collection &collection, in collectionFromString() argument
[all …]
/frameworks/base/tools/aapt2/
DLoadedApk.cpp97 const Source& source, unique_ptr<io::IFileCollection> collection, IDiagnostics* diag) { in LoadProtoApkFromFileCollection() argument
100 io::IFile* table_file = collection->FindFile(kProtoResourceTablePath); in LoadProtoApkFromFileCollection()
117 if (!DeserializeTableFromPb(pb_table, collection.get(), table.get(), &error)) { in LoadProtoApkFromFileCollection()
124 io::IFile* manifest_file = collection->FindFile(kAndroidManifestPath); in LoadProtoApkFromFileCollection()
150 return util::make_unique<LoadedApk>(source, std::move(collection), std::move(table), in LoadProtoApkFromFileCollection()
155 const Source& source, unique_ptr<io::IFileCollection> collection, IDiagnostics* diag) { in LoadBinaryApkFromFileCollection() argument
158 io::IFile* table_file = collection->FindFile(kApkResourceTablePath); in LoadBinaryApkFromFileCollection()
167 collection.get()); in LoadBinaryApkFromFileCollection()
173 io::IFile* manifest_file = collection->FindFile(kAndroidManifestPath); in LoadBinaryApkFromFileCollection()
193 return util::make_unique<LoadedApk>(source, std::move(collection), std::move(table), in LoadBinaryApkFromFileCollection()
/frameworks/compile/slang/tests/P_reduce_general_result/
DScriptC_reduce_general_result.java.expect127 mOut = null; // make Java object eligible for garbage collection
133 mTempIns = null; // make Java objects eligible for garbage collection
163 mOut = null; // make Java object eligible for garbage collection
169 mTempIns = null; // make Java objects eligible for garbage collection
204 mOut = null; // make Java object eligible for garbage collection
210 mTempIns = null; // make Java objects eligible for garbage collection
245 mOut = null; // make Java object eligible for garbage collection
251 mTempIns = null; // make Java objects eligible for garbage collection
281 mOut = null; // make Java object eligible for garbage collection
287 mTempIns = null; // make Java objects eligible for garbage collection
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/
DBackgroundScanSchedulerTest.java479 KnownBandsChannelCollection collection = mChannelHelper.createChannelCollection(); in optimalScheduleFullyCollapsesDuplicateChannelsInBand() local
480 collection.addBand(WifiScanner.WIFI_BAND_24_GHZ); in optimalScheduleFullyCollapsesDuplicateChannelsInBand()
481 Set<Integer> expectedBucketChannelSet = collection.getAllChannels(); in optimalScheduleFullyCollapsesDuplicateChannelsInBand()
593 KnownBandsChannelCollection collection = mChannelHelper.createChannelCollection(); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets() local
594 collection.addBand(WifiScanner.WIFI_BAND_BOTH_WITH_DFS); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets()
595 expectedBucketChannelSet = collection.getAllChannels(); in optimalSchedulePartiallyCollapsesDuplicateChannelsAcrossMultipleBuckets()
642 KnownBandsChannelCollection collection = mChannelHelper.createChannelCollection(); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets() local
643 collection.addBand(WifiScanner.WIFI_BAND_BOTH_WITH_DFS); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets()
644 expectedBucketChannelSet = collection.getAllChannels(); in optimalSchedulePartiallyCollapsesDuplicateChannelsWithSplitBuckets()
655 KnownBandsChannelCollection collection = mChannelHelper.createChannelCollection(); in getAllChannels() local
[all …]
/frameworks/base/identity/java/android/security/identity/
DUtil.java34 static int[] integerCollectionToArray(Collection<Integer> collection) { in integerCollectionToArray() argument
35 int[] result = new int[collection.size()]; in integerCollectionToArray()
37 for (int item : collection) { in integerCollectionToArray()
/frameworks/base/core/java/com/android/internal/util/
DArrayUtils.java198 public static int size(@Nullable Collection<?> collection) { in size() argument
199 return collection == null ? 0 : collection.size(); in size()
624 public static <T> int unstableRemoveIf(@Nullable ArrayList<T> collection, in unstableRemoveIf() argument
626 if (collection == null) { in unstableRemoveIf()
630 final int size = collection.size(); in unstableRemoveIf()
635 while (leftIdx < size && !predicate.test(collection.get(leftIdx))) { in unstableRemoveIf()
640 while (rightIdx > leftIdx && predicate.test(collection.get(rightIdx))) { in unstableRemoveIf()
649 Collections.swap(collection, leftIdx, rightIdx); in unstableRemoveIf()
656 collection.remove(i); in unstableRemoveIf()

12345678