From b2063dfa00c12e8e0a0af56d906f3e80405081bb Mon Sep 17 00:00:00 2001 From: touge Date: Thu, 29 Sep 2022 11:09:47 +0800 Subject: [PATCH] Upgrade glide from 4.13.2 to 4.14.0 --- .../mixin/android/ui/imageeditor/UriGlideRenderer.java | 9 +++++---- build.gradle | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/one/mixin/android/ui/imageeditor/UriGlideRenderer.java b/app/src/main/java/one/mixin/android/ui/imageeditor/UriGlideRenderer.java index 0cf10596fe..a6b8dd532b 100644 --- a/app/src/main/java/one/mixin/android/ui/imageeditor/UriGlideRenderer.java +++ b/app/src/main/java/one/mixin/android/ui/imageeditor/UriGlideRenderer.java @@ -17,11 +17,12 @@ import android.renderscript.ScriptIntrinsicBlur; import androidx.annotation.NonNull; import androidx.annotation.Nullable; + +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestBuilder; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.request.target.CustomTarget; import com.bumptech.glide.request.transition.Transition; -import one.mixin.android.util.glide.GlideApp; -import one.mixin.android.util.glide.GlideRequest; import one.mixin.android.widget.imageeditor.Bounds; import one.mixin.android.widget.imageeditor.Renderer; import one.mixin.android.widget.imageeditor.RendererContext; @@ -167,7 +168,7 @@ private void renderBlurOverlay(RendererContext rendererContext) { } } - private GlideRequest getBitmapGlideRequest(@NonNull Context context, boolean preview) { + private RequestBuilder getBitmapGlideRequest(@NonNull Context context, boolean preview) { int width = this.maxWidth; int height = this.maxHeight; @@ -176,7 +177,7 @@ private GlideRequest getBitmapGlideRequest(@NonNull Context context, boo height = Math.min(height, PREVIEW_DIMENSION_LIMIT); } - return GlideApp.with(context) + return Glide.with(context) .asBitmap() .diskCacheStrategy(DiskCacheStrategy.NONE) .override(width, height) diff --git a/build.gradle b/build.gradle index 13ba5d5f04..03ef1d5786 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ buildscript { ext.coordinatorVersion = '1.2.0' ext.espressoVersion = '3.4.0' ext.cameraxVersion = '1.2.0-beta02' - ext.glideVersion = '4.13.2' + ext.glideVersion = '4.14.0' ext.timberVersion = '5.0.1' ext.okhttpVersion = '4.10.0' ext.rxJavaVersion = '2.2.21'