Fix profile crash

Fixes #7192
This commit is contained in:
Moxie Marlinspike 2017-11-14 10:22:54 -08:00
parent 534dec282f
commit 21ddc1dbba
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package org.thoughtcrime.securesms;
import android.animation.Animator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
@ -66,6 +67,7 @@ import javax.inject.Inject;
import static android.provider.MediaStore.EXTRA_OUTPUT;
@SuppressLint("StaticFieldLeak")
public class CreateProfileActivity extends BaseActionBarActivity implements InjectableType {
private static final String TAG = CreateProfileActivity.class.getSimpleName();

View File

@ -16,6 +16,7 @@ import android.util.Log;
import android.util.Pair;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy;
import org.thoughtcrime.securesms.mms.GlideApp;
@ -55,6 +56,8 @@ public class BitmapUtil {
Bitmap scaledBitmap = GlideApp.with(context.getApplicationContext())
.asBitmap()
.load(model)
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.downsample(DownsampleStrategy.AT_MOST)
.submit(constraints.getImageMaxWidth(context),
constraints.getImageMaxWidth(context))