/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/ |
H A D | TrackedGarbage.java | 23 import java.lang.ref.Reference; 24 import java.lang.ref.ReferenceQueue; 25 import java.lang.ref.WeakReference; 55 Reference<?> ref; in cleanUp() local 56 while ((ref = mRefQueue.poll()) != null) { in cleanUp() 57 mGarbage.remove(ref); in cleanUp() 91 for (LeakReference ref : mGarbage) { in dump() 92 acc.put(ref.clazz, acc.getOrDefault(ref.clazz, 0) + 1); in dump() 93 if (isOld(ref.createdUptimeMillis, now)) { in dump() 94 accOld.put(ref.clazz, accOld.getOrDefault(ref.clazz, 0) + 1); in dump() [all …]
|
H A D | WeakIdentityHashMap.java | 19 import java.lang.ref.Reference; 20 import java.lang.ref.ReferenceQueue; 21 import java.lang.ref.WeakReference; 36 Reference<?> ref; in cleanUp() local 37 while ((ref = mRefQueue.poll()) != null) { in cleanUp() 38 mMap.remove(ref); in cleanUp()
|
/aosp14/frameworks/base/tools/aapt2/ |
H A D | ResourceUtils_test.cpp | 122 EXPECT_TRUE(ref->is_dynamic); in TEST() 158 std::optional<Reference> ref = in TEST() local 160 ASSERT_TRUE(ref); in TEST() 164 ASSERT_TRUE(ref); in TEST() 168 ASSERT_TRUE(ref); in TEST() 172 ASSERT_TRUE(ref); in TEST() 176 ASSERT_TRUE(ref); in TEST() 180 ASSERT_TRUE(ref); in TEST() 184 ASSERT_TRUE(ref); in TEST() 188 ASSERT_TRUE(ref); in TEST() [all …]
|
H A D | ValueVisitor_test.cpp | 32 void Visit(Reference* ref) override { visited = ref; } in Visit() 41 void Visit(Reference* ref) override { visited_refs.push_back(ref); } in Visit() 50 Reference ref(ResourceName{"android", ResourceType::kAttr, "foo"}); in TEST() local 52 ref.Accept(&visitor); in TEST() 54 EXPECT_EQ(visitor.visited, &ref); in TEST() 75 std::unique_ptr<Reference> ref = test::BuildReference("android:color/white"); in TEST() local 76 EXPECT_NE(ValueCast<Reference>(ref.get()), nullptr); in TEST()
|
/aosp14/frameworks/base/core/java/android/view/accessibility/ |
H A D | WeakSparseArray.java | 21 import java.lang.ref.Reference; 22 import java.lang.ref.ReferenceQueue; 23 import java.lang.ref.WeakReference; 43 WeakReferenceWithId<E> ref = mSparseArray.get(key); in get() local 44 return ref != null ? ref.get() : null; in get() 48 for (Reference ref = mRefQueue.poll(); ref != null; ref = mRefQueue.poll()) { in removeUnreachableValues() 49 mSparseArray.remove(((WeakReferenceWithId) ref).mId); in removeUnreachableValues()
|
/aosp14/system/core/libutils/ |
H A D | RefBase.cpp | 350 int32_t ref; member 362 ref->ref = mRef; in addRef() 363 ref->id = id; in addRef() 368 *refs = ref; in addRef() 386 ref = *refs; in removeRef() 393 ref = head; in removeRef() 394 while (ref) { in removeRef() 395 char inc = ref->ref >= 0 ? '+' : '-'; in removeRef() 396 ALOGD("\t%c ID %p (ref %d):", inc, ref->id, ref->ref); in removeRef() 397 ref = ref->next; in removeRef() [all …]
|
H A D | RefBase_fuzz.cpp | 62 RefBaseSubclass* ref; variable 70 ref->decStrong(nullptr); in __anon12db35870102() 86 [](RefThreadState*) -> void { ref->getStrongCount(); }, in __anon12db35870302() 88 [](RefThreadState*) -> void { ref->printRefs(); }, in __anon12db35870502() 92 ref->incStrong(nullptr); in __anon12db35870602() 97 ref->forceIncStrong(nullptr); in __anon12db35870702() 102 ref->createWeak(nullptr); in __anon12db35870802() 166 ref->decStrong(nullptr); in loop() 190 ref = new RefBaseSubclass(&gRefDeleted, gRefDeletedLock); in LLVMFuzzerTestOneInput() 191 weakRefs = ref->getWeakRefs(); in LLVMFuzzerTestOneInput() [all …]
|
/aosp14/frameworks/base/core/java/android/security/net/config/ |
H A D | NetworkSecurityConfig.java | 83 for (CertificatesEntryRef ref : mCertificatesEntryRefs) { in getTrustAnchors() 84 Set<TrustAnchor> anchors = ref.getTrustAnchors(); in getTrustAnchors() 122 for (CertificatesEntryRef ref : mCertificatesEntryRefs) { in findTrustAnchorBySubjectAndPublicKey() 123 TrustAnchor anchor = ref.findBySubjectAndPublicKey(cert); in findTrustAnchorBySubjectAndPublicKey() 133 for (CertificatesEntryRef ref : mCertificatesEntryRefs) { in findTrustAnchorByIssuerAndSignature() 134 TrustAnchor anchor = ref.findByIssuerAndSignature(cert); in findTrustAnchorByIssuerAndSignature() 145 for (CertificatesEntryRef ref : mCertificatesEntryRefs) { in findAllCertificatesByIssuerAndSignature() 154 for (CertificatesEntryRef ref : mCertificatesEntryRefs) { in handleTrustStorageUpdate() 155 ref.handleTrustStorageUpdate(); in handleTrustStorageUpdate() 282 public Builder addCertificatesEntryRef(CertificatesEntryRef ref) { [all …]
|
/aosp14/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/color/ |
H A D | AppSaturationControllerTest.java | 41 import java.lang.ref.WeakReference; 73 final WeakReference<ColorTransformController> ref = new WeakReference<>( in addColorTransformController_appliesExistingSaturation() local 79 .addColorTransformController(TEST_AFFECTED_PACKAGE_NAME, mUserId, ref); in addColorTransformController_appliesExistingSaturation() 86 final WeakReference<ColorTransformController> ref = new WeakReference<>( in setSaturationLevel_resetToDefault() local 89 .addColorTransformController(TEST_AFFECTED_PACKAGE_NAME, mUserId, ref); in setSaturationLevel_resetToDefault() 108 final WeakReference<ColorTransformController> ref = new WeakReference<>( in setSaturationLevel_updateLevel() local 111 .addColorTransformController(TEST_AFFECTED_PACKAGE_NAME, mUserId, ref); in setSaturationLevel_updateLevel() 135 final WeakReference<ColorTransformController> ref = new WeakReference<>( in setSaturationLevel_multipleCallers_appliesStrongest() local 138 .addColorTransformController(TEST_AFFECTED_PACKAGE_NAME, mUserId, ref); in setSaturationLevel_multipleCallers_appliesStrongest() 157 final WeakReference<ColorTransformController> ref = new WeakReference<>( in setSaturationLevel_multipleCallers_removingOneDoesNotAffectTheOther() local [all …]
|
/aosp14/frameworks/base/services/core/jni/BroadcastRadio/ |
H A D | JavaRef.h | 32 JavaRef<T> make_javaref(JNIEnv *env, T ref) { in make_javaref() argument 33 return JavaRef<T>(ref, [env](T ref) { in make_javaref() 34 if (env && ref) { in make_javaref() 35 env->DeleteLocalRef(ref); in make_javaref()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/leak/ |
H A D | ReferenceTestUtils.java | 21 import java.lang.ref.Reference; 22 import java.lang.ref.ReferenceQueue; 23 import java.lang.ref.WeakReference; 33 Reference<?> ref = new WeakReference<>(o, q); in createCollectionWaiter() local 40 if (q.remove(5_000) == ref) { in createCollectionWaiter()
|
/aosp14/frameworks/base/tools/aapt2/link/ |
H A D | ReferenceLinker.cpp | 44 : ref_(ref), callsite_(callsite), decls_(decls) { in LoggingResourceName() 82 return std::unique_ptr<Reference>(ref); in TransformDerived() 228 if (symbol.is_public || ref.private_reference) { in IsSymbolVisible() 232 if (ref.name) { in IsSymbolVisible() 233 const ResourceName& name = ref.name.value(); in IsSymbolVisible() 244 if (ref.id && symbol.id) { in IsSymbolVisible() 346 if (!ref.name) { in WriteAttributeName() 347 *out_msg << ref.id.value(); in WriteAttributeName() 351 const ResourceName& ref_name = ref.name.value(); in WriteAttributeName() 359 Reference fully_qualified = ref; in WriteAttributeName() [all …]
|
H A D | ReferenceLinker_test.cpp | 59 ASSERT_THAT(ref, NotNull()); in TEST() 60 ASSERT_TRUE(ref->id); in TEST() 61 EXPECT_EQ(ResourceId(0x7f020001), ref->id.value()); in TEST() 63 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/bar"); in TEST() 64 ASSERT_THAT(ref, NotNull()); in TEST() 65 ASSERT_TRUE(ref->id); in TEST() 66 EXPECT_EQ(ResourceId(0x7f020002), ref->id.value()); in TEST() 68 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/baz"); in TEST() 69 ASSERT_THAT(ref, NotNull()); in TEST() 70 ASSERT_TRUE(ref->id); in TEST() [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/view/menu/ |
H A D | MenuBuilder.java | 44 import java.lang.ref.WeakReference; 257 final MenuPresenter item = ref.get(); in removeMenuPresenter() 259 mPresenters.remove(ref); in removeMenuPresenter() 271 mPresenters.remove(ref); in dispatchPresenterUpdate() 293 mPresenters.remove(ref); in dispatchSubMenuSelected() 309 mPresenters.remove(ref); in dispatchSaveInstanceState() 332 mPresenters.remove(ref); in dispatchRestoreInstanceState() 981 mPresenters.remove(ref); in close() 1116 mPresenters.remove(ref); in flagActionItems() 1312 mPresenters.remove(ref); in expandItemActionView() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/Spa/gradle/ |
H A D | libs.versions.toml | 24 dexmaker-mockito = { module = "com.linkedin.dexmaker:dexmaker-mockito", version.ref = "dexmaker-moc… 25 truth = { module = "com.google.truth:truth", version.ref = "truth" } 28 android-application = { id = "com.android.application", version.ref = "agp" } 29 android-library = { id = "com.android.library", version.ref = "agp" } 30 kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
/aosp14/frameworks/base/tools/aapt2/process/ |
H A D | SymbolTable.h | 101 const Symbol* FindByReference(const Reference& ref); 161 const Reference& ref) { in FindByReference() argument 162 if (ref.name) { in FindByReference() 163 return FindByName(ref.name.value()); in FindByReference() 164 } else if (ref.id) { in FindByReference() 165 return FindById(ref.id.value()); in FindByReference() 203 const Reference& ref) override;
|
H A D | SymbolTable.cpp | 143 const SymbolTable::Symbol* SymbolTable::FindByReference(const Reference& ref) { in FindByReference() argument 152 if (ref.id) { in FindByReference() 153 symbol = FindById(ref.id.value()); in FindByReference() 156 if (ref.name && !symbol) { in FindByReference() 157 symbol = FindByName(ref.name.value()); in FindByReference() 428 const Reference& ref) { in FindByReference() argument 430 if (ref.id) { in FindByReference() 431 return FindById(ref.id.value()); in FindByReference() 432 } else if (ref.name) { in FindByReference() 433 return FindByName(ref.name.value()); in FindByReference()
|
/aosp14/frameworks/base/tools/aapt2/format/proto/ |
H A D | ProtoSerialize.cpp | 454 if (ref.name) { in SerializeReferenceToPb() 455 pb_ref->set_name(ref.name.value().to_string()); in SerializeReferenceToPb() 458 pb_ref->set_private_(ref.private_reference); in SerializeReferenceToPb() 460 if (ref.is_dynamic) { in SerializeReferenceToPb() 463 if (ref.type_flags) { in SerializeReferenceToPb() 464 pb_ref->set_type_flags(*ref.type_flags); in SerializeReferenceToPb() 466 pb_ref->set_allow_raw(ref.allow_raw); in SerializeReferenceToPb() 470 pb_macro->set_raw_string(ref.raw_value); in SerializeMacroToPb() 473 pb_style_str->set_str(ref.style_string.str); in SerializeMacroToPb() 474 for (const auto& span : ref.style_string.spans) { in SerializeMacroToPb() [all …]
|
/aosp14/frameworks/base/tools/aapt2/java/ |
H A D | ClassDefinition.h | 191 explicit FieldReference(std::string reference) : ref(std::move(reference)) { in FieldReference() 193 std::string ref; member 197 static std::string ToString(const std::variant<ResourceId, FieldReference>& ref) { in ToString() 198 if (auto id = std::get_if<ResourceId>(&ref)) { in ToString() 201 return std::get<FieldReference>(ref).ref; in ToString()
|
/aosp14/frameworks/base/services/core/java/com/android/server/am/ |
H A D | PendingIntentController.java | 60 import java.lang.ref.WeakReference; 152 WeakReference<PendingIntentRecord> ref; in getIntentSender() local 153 ref = mIntentSenderRecords.get(key); in getIntentSender() 154 PendingIntentRecord rec = ref != null ? ref.get() : null; in getIntentSender() 181 mIntentSenderRecords.put(key, rec.ref); in getIntentSender() 243 pir.key.activity, pir.ref); in removePendingIntentsForPackage() 283 rec.key.activity, rec.ref); in cancelIntentSender() 386 WeakReference<PendingIntentRecord> ref = it.next(); in dumpPendingIntents() local 387 PendingIntentRecord rec = ref != null ? ref.get() : null; in dumpPendingIntents() 389 weakRefs.add(ref); in dumpPendingIntents()
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/libcore/ |
H A D | ReferenceGetPerfTest.java | 30 import java.lang.ref.Reference; 31 import java.lang.ref.SoftReference; 32 import java.lang.ref.WeakReference;
|
/aosp14/frameworks/base/tools/aapt2/format/binary/ |
H A D | ResEntryWriter.h | 62 const std::reference_wrapper<const T> ref; member 65 explicit ResEntryValueRef(const T& rev) : ref(rev) { in ResEntryValueRef() 72 std::size_t operator()(const R& ref) const { in operator() 73 return android::JenkinsHashMixBytes(0, ref.ptr, sizeof(typename R::T)); in operator()
|
/aosp14/frameworks/base/core/jni/ |
H A D | core_jni_helpers.cpp | 27 jobject GetReferent(JNIEnv* env, jobject ref) { in GetReferent() argument 32 return env->CallObjectMethod(ref, gGetReferent); in GetReferent()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/ref/ |
H A D | GcWeakReference.java | 17 package com.android.systemui.util.ref; 21 import java.lang.ref.WeakReference;
|
/aosp14/frameworks/base/core/java/android/content/res/ |
H A D | ThemedResourceCache.java | 28 import java.lang.ref.WeakReference; 242 final WeakReference<T> ref = entries.valueAt(i); in pruneEntriesLocked() local 243 if (ref == null || pruneEntryLocked(ref.get(), configChanges)) { in pruneEntriesLocked()
|