Fix bug leading to cache miss in de.danoeh.antennapod.core.glide.FastBlurTransformation (#5289)

Co-authored-by: mjblackhorse <majunster@gmail.com>
This commit is contained in:
struggggle 2021-07-24 23:34:48 +08:00 committed by GitHub
parent 959b7fcebb
commit ff8461f364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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()));