minor change in android model
This commit is contained in:
parent
39ec0f8d09
commit
1474d4fcb9
2 changed files with 3 additions and 8 deletions
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
|||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentUris;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
|
@ -103,7 +104,7 @@ public class ImageDecodeTask extends AsyncTask<ImageDecodeTask.Params, Void, Ima
|
|||
|
||||
private Bitmap getThumbnailBytesByMediaStore(Params params) {
|
||||
ImageEntry entry = params.entry;
|
||||
long contentId = entry.getContentId();
|
||||
long contentId = ContentUris.parseId(entry.getUri());
|
||||
|
||||
ContentResolver resolver = activity.getContentResolver();
|
||||
try {
|
||||
|
|
|
@ -12,8 +12,7 @@ import deckers.thibault.aves.utils.Constants;
|
|||
public class ImageEntry {
|
||||
// from source
|
||||
private String path; // best effort to get local path from content providers
|
||||
private long contentId; // should be defined for mediastore, use full URI otherwise
|
||||
private Uri uri; // should be defined for external content, use ID for mediastore
|
||||
private Uri uri; // content URI
|
||||
private String mimeType;
|
||||
private int width, height, orientationDegrees;
|
||||
private long sizeBytes;
|
||||
|
@ -27,7 +26,6 @@ public class ImageEntry {
|
|||
public ImageEntry(Map map) {
|
||||
this.uri = Uri.parse((String) map.get("uri"));
|
||||
this.path = (String) map.get("path");
|
||||
this.contentId = toLong(map.get("contentId"));
|
||||
this.mimeType = (String) map.get("mimeType");
|
||||
this.width = (int) map.get("width");
|
||||
this.height = (int) map.get("height");
|
||||
|
@ -44,10 +42,6 @@ public class ImageEntry {
|
|||
return uri;
|
||||
}
|
||||
|
||||
public long getContentId() {
|
||||
return contentId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getPath() {
|
||||
return path;
|
||||
|
|
Loading…
Reference in a new issue