tq: add fake etag
parent
e8baff4273
commit
93ee281eee
|
@ -67,6 +67,7 @@ public class TimelineQuery {
|
||||||
MediaStore.Images.Media.HEIGHT,
|
MediaStore.Images.Media.HEIGHT,
|
||||||
MediaStore.Images.Media.WIDTH,
|
MediaStore.Images.Media.WIDTH,
|
||||||
MediaStore.Images.Media.SIZE,
|
MediaStore.Images.Media.SIZE,
|
||||||
|
MediaStore.Images.Media.DATE_MODIFIED,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Filter for given day
|
// Filter for given day
|
||||||
|
@ -89,6 +90,7 @@ public class TimelineQuery {
|
||||||
int heightColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.HEIGHT);
|
int heightColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.HEIGHT);
|
||||||
int widthColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.WIDTH);
|
int widthColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.WIDTH);
|
||||||
int sizeColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.SIZE);
|
int sizeColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.SIZE);
|
||||||
|
int dateModifiedColumn = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_MODIFIED);
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
long id = cursor.getLong(idColumn);
|
long id = cursor.getLong(idColumn);
|
||||||
|
@ -98,6 +100,7 @@ public class TimelineQuery {
|
||||||
long width = cursor.getLong(widthColumn);
|
long width = cursor.getLong(widthColumn);
|
||||||
long size = cursor.getLong(sizeColumn);
|
long size = cursor.getLong(sizeColumn);
|
||||||
long dateTaken = datesTaken.get(id);
|
long dateTaken = datesTaken.get(id);
|
||||||
|
Long dateModified = cursor.getLong(dateModifiedColumn);
|
||||||
|
|
||||||
// Remove from list of ids
|
// Remove from list of ids
|
||||||
imageIds.remove(id);
|
imageIds.remove(id);
|
||||||
|
@ -111,7 +114,8 @@ public class TimelineQuery {
|
||||||
.put("datetaken", dateTaken)
|
.put("datetaken", dateTaken)
|
||||||
.put("h", height)
|
.put("h", height)
|
||||||
.put("w", width)
|
.put("w", width)
|
||||||
.put("size", size);
|
.put("size", size)
|
||||||
|
.put("etag", dateModified.toString());
|
||||||
files.add(file);
|
files.add(file);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.e(TAG, "JSON error");
|
Log.e(TAG, "JSON error");
|
||||||
|
|
Loading…
Reference in New Issue