Messaging: We don't need to check for verbose logging everywhere
We can just do this in the actual method Change-Id: I80e89b0ab97926749851628b1bd34e8cd9dc82f2
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2025 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,13 +69,11 @@ public class MediaCache<T extends RefCountedMediaResource> extends LruCache<Stri
|
||||
public synchronized T fetchResourceFromCache(final String key) {
|
||||
final T ret = get(key);
|
||||
if (ret != null) {
|
||||
if (LogUtil.isLoggable(TAG, LogUtil.VERBOSE)) {
|
||||
LogUtil.v(TAG, "cache hit in mediaCache @ " + getName() +
|
||||
", total cache hit = " + hitCount() +
|
||||
", total cache miss = " + missCount());
|
||||
}
|
||||
LogUtil.v(TAG, "cache hit in mediaCache @ " + getName() +
|
||||
", total cache hit = " + hitCount() +
|
||||
", total cache miss = " + missCount());
|
||||
ret.addRef();
|
||||
} else if (LogUtil.isLoggable(TAG, LogUtil.VERBOSE)) {
|
||||
} else {
|
||||
LogUtil.v(TAG, "cache miss in mediaCache @ " + getName() +
|
||||
", total cache hit = " + hitCount() +
|
||||
", total cache miss = " + missCount());
|
||||
@@ -110,4 +109,4 @@ public class MediaCache<T extends RefCountedMediaResource> extends LruCache<Stri
|
||||
// Never zero-count any resource, count as at least 1KB.
|
||||
return mediaSizeInKilobytes == 0 ? 1 : mediaSizeInKilobytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user