disable fancy new thumbnail preview

It was causing OOMEs on old devices.
// FREEBIE
This commit is contained in:
Jake McGinty 2015-03-13 11:23:01 -07:00 committed by Moxie Marlinspike
parent cc65fab226
commit 13227b6aa5
2 changed files with 1 additions and 12 deletions

View File

@ -458,11 +458,7 @@ public class ConversationItem extends LinearLayout {
if (!messageRecord.isOutgoing()) intent.putExtra(MediaPreviewActivity.RECIPIENT_EXTRA, messageRecord.getIndividualRecipient().getRecipientId()); if (!messageRecord.isOutgoing()) intent.putExtra(MediaPreviewActivity.RECIPIENT_EXTRA, messageRecord.getIndividualRecipient().getRecipientId());
intent.putExtra(MediaPreviewActivity.DATE_EXTRA, messageRecord.getDateReceived()); intent.putExtra(MediaPreviewActivity.DATE_EXTRA, messageRecord.getDateReceived());
if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) { context.startActivity(intent);
context.startActivity(intent, mediaThumbnail.getThumbnailTransition().toBundle());
} else {
context.startActivity(intent);
}
} else { } else {
AlertDialog.Builder builder = new AlertDialog.Builder(context); AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(R.string.ConversationItem_view_secure_media_question); builder.setTitle(R.string.ConversationItem_view_secure_media_question);

View File

@ -193,13 +193,6 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
} }
private void displayImage() { 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<Void,Void,Bitmap>() { new AsyncTask<Void,Void,Bitmap>() {
@Override @Override
protected Bitmap doInBackground(Void... params) { protected Bitmap doInBackground(Void... params) {