mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
disable fancy new thumbnail preview
It was causing OOMEs on old devices. // FREEBIE
This commit is contained in:
parent
cc65fab226
commit
13227b6aa5
@ -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);
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user