From ff8461f3648dd162b5824108b9a7bfa71418ebb1 Mon Sep 17 00:00:00 2001 From: struggggle <718470281@qq.com> Date: Sat, 24 Jul 2021 23:34:48 +0800 Subject: [PATCH] Fix bug leading to cache miss in de.danoeh.antennapod.core.glide.FastBlurTransformation (#5289) Co-authored-by: mjblackhorse --- .../antennapod/core/glide/FastBlurTransformation.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java index 4de6a7315..29edfb478 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java @@ -12,6 +12,7 @@ import java.nio.charset.Charset; import java.security.MessageDigest; public class FastBlurTransformation extends BitmapTransformation { + private static final String ID = "de.danoeh.antennapod.core.glide.FastBlurTransformation"; private static final String TAG = FastBlurTransformation.class.getSimpleName(); @@ -42,6 +43,11 @@ public class FastBlurTransformation extends BitmapTransformation { return o instanceof FastBlurTransformation; } + @Override + public int hashCode() { + return ID.hashCode(); + } + @Override public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { messageDigest.update(TAG.getBytes(Charset.defaultCharset()));