diff --git a/app/build.gradle b/app/build.gradle index 09ddc0234..c213f75b6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.19.7' + implementation 'com.simplemobiletools:commons:3.19.8' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 7d299d026..09a0a976c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -275,7 +275,7 @@ class PhotoFragment : ViewPagerFragment() { } else { val options = RequestOptions() .diskCacheStrategy(DiskCacheStrategy.NONE) - .transform(GlideRotateTransformation(context!!, degrees)) + .transform(GlideRotateTransformation(degrees)) Glide.with(this) .asBitmap() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt index 326b6011c..5c0bd41b8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideDecoder.kt @@ -31,7 +31,7 @@ class GlideDecoder : ImageDecoder { val degrees = getRotationDegrees(orientation) if (degrees != 0) { - options.transform(GlideRotateTransformation(context, getRotationDegrees(orientation))) + options.transform(GlideRotateTransformation(getRotationDegrees(orientation))) } val drawable = Glide.with(context) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideRotateTransformation.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideRotateTransformation.kt index 84ee4c49f..5f34c6ced 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideRotateTransformation.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/GlideRotateTransformation.kt @@ -1,13 +1,12 @@ package com.simplemobiletools.gallery.helpers -import android.content.Context import android.graphics.Bitmap import android.graphics.Matrix import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool import com.bumptech.glide.load.resource.bitmap.BitmapTransformation import java.security.MessageDigest -class GlideRotateTransformation(context: Context, val rotateRotationAngle: Int) : BitmapTransformation(context) { +class GlideRotateTransformation(val rotateRotationAngle: Int) : BitmapTransformation() { override fun transform(pool: BitmapPool, bitmap: Bitmap, outWidth: Int, outHeight: Int): Bitmap { if (rotateRotationAngle % 360 == 0) return bitmap