Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1527221 authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

[res] Remove noisy assets deletion logging

Turns out we often delete ApkAssets objects that are still
referenced by asset managers, and the logging is too noisy to
be of any use

Test: build
Flag: EXEPMT cleanup
Change-Id: I20c551e411a9a7f21a2f178e3ba26b9f8c6e8e6d
parent 4f541860
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ using ::android::base::unique_fd;

namespace android {

static constexpr bool kLogWeakReachableDeletedAssets = false;

static struct overlayableinfo_offsets_t {
  jclass classObject;
  jmethodID constructor;
@@ -97,7 +99,7 @@ static void DeleteGuardedApkAssets(Guarded<AssetManager2::ApkAssetsPtr>& apk_ass
      if (useCount > 1) {
        ALOGW("ApkAssets: Deleting an object '%s' with %d > 1 strong and %d weak references",
              (*assets)->GetDebugName().c_str(), int(useCount), int(weakCount));
      } else if (weakCount > 0) {
      } else if constexpr (kLogWeakReachableDeletedAssets) if (weakCount > 0) {
        ALOGW("ApkAssets: Deleting an ApkAssets object '%s' with %d weak references",
              (*assets)->GetDebugName().c_str(), int(weakCount));
      }