From 13227b6aa52c3eeb1a79998f6d6daa7bf54e765c Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 13 Mar 2015 11:23:01 -0700 Subject: [PATCH] disable fancy new thumbnail preview It was causing OOMEs on old devices. // FREEBIE --- src/org/thoughtcrime/securesms/ConversationItem.java | 6 +----- src/org/thoughtcrime/securesms/MediaPreviewActivity.java | 7 ------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index 12766eed3b..f8b9a56313 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -458,11 +458,7 @@ public class ConversationItem extends LinearLayout { if (!messageRecord.isOutgoing()) intent.putExtra(MediaPreviewActivity.RECIPIENT_EXTRA, messageRecord.getIndividualRecipient().getRecipientId()); intent.putExtra(MediaPreviewActivity.DATE_EXTRA, messageRecord.getDateReceived()); - if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) { - context.startActivity(intent, mediaThumbnail.getThumbnailTransition().toBundle()); - } else { - context.startActivity(intent); - } + context.startActivity(intent); } else { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(R.string.ConversationItem_view_secure_media_question); diff --git a/src/org/thoughtcrime/securesms/MediaPreviewActivity.java b/src/org/thoughtcrime/securesms/MediaPreviewActivity.java index 11ed698a62..5fc4006bcf 100644 --- a/src/org/thoughtcrime/securesms/MediaPreviewActivity.java +++ b/src/org/thoughtcrime/securesms/MediaPreviewActivity.java @@ -193,13 +193,6 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im } private void displayImage() { - try { - image.setImageBitmap(BitmapFactory.decodeStream(PartAuthority.getThumbnail(this, masterSecret, mediaUri))); - image.setVisibility(View.VISIBLE); - } catch (IOException fnfe) { - Log.w(TAG, "tried to render thumbnail, but it wasn't found. carrying on."); - } - new AsyncTask() { @Override protected Bitmap doInBackground(Void... params) {