use PartDatabase to look up thumbnails async

// FREEBIE

Closes #2286
This commit is contained in:
Jake McGinty
2014-12-30 01:36:51 -08:00
committed by Moxie Marlinspike
parent 3e6e28e688
commit 12845da91a
15 changed files with 284 additions and 188 deletions

View File

@@ -17,6 +17,7 @@
package ws.com.google.android.mms.pdu;
import android.graphics.Bitmap;
import android.net.Uri;
import org.thoughtcrime.securesms.util.Util;
@@ -125,10 +126,11 @@ public class PduPart {
private static final String TAG = "PduPart";
private Uri thumbnailUri;
private long id = -1;
private boolean isEncrypted;
private boolean isPendingPush;
private long dataSize;
private Bitmap thumbnail;
/**
* Empty Constructor.
@@ -154,7 +156,7 @@ public class PduPart {
}
public void setPendingPush(boolean isPendingPush) {
public void setPendingPush(boolean isPendingPush) {
this.isPendingPush = isPendingPush;
}
@@ -162,14 +164,6 @@ public class PduPart {
return isPendingPush;
}
public void setThumbnailUri(Uri thumbnailUri) {
this.thumbnailUri = thumbnailUri;
}
public Uri getThumbnailUri() {
return this.thumbnailUri;
}
/**
* Set part data. The data are stored as byte array.
*
@@ -440,5 +434,21 @@ public class PduPart {
return new String(location);
}
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Bitmap getThumbnail() {
return thumbnail;
}
public void setThumbnail(Bitmap thumbnail) {
this.thumbnail = thumbnail;
}
}