diff options
-rw-r--r-- | src/com/android/camera/gallery/BaseImageList.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/gallery/ImageList.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/gallery/VideoList.java | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/camera/gallery/BaseImageList.java b/src/com/android/camera/gallery/BaseImageList.java index 7e30527..ac0cafb 100644 --- a/src/com/android/camera/gallery/BaseImageList.java +++ b/src/com/android/camera/gallery/BaseImageList.java @@ -503,9 +503,10 @@ public abstract class BaseImageList implements IImageList { : " DESC"; // Use DATE_TAKEN if it's non-null, otherwise use DATE_MODIFIED. + // DATE_TAKEN is in milliseconds, but DATE_MODIFIED is in seconds. String dateExpr = "case ifnull(datetaken,0)" + - " when 0 then date_modified" + + " when 0 then date_modified*1000" + " else datetaken" + " end"; diff --git a/src/com/android/camera/gallery/ImageList.java b/src/com/android/camera/gallery/ImageList.java index 921813b..33b8d01 100644 --- a/src/com/android/camera/gallery/ImageList.java +++ b/src/com/android/camera/gallery/ImageList.java @@ -147,7 +147,7 @@ public class ImageList extends BaseImageList implements IImageList { String dataPath = cursor.getString(INDEX_DATA_PATH); long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); if (dateTaken == 0) { - dateTaken = cursor.getLong(INDEX_DATE_MODIFIED); + dateTaken = cursor.getLong(INDEX_DATE_MODIFIED) * 1000; } long miniThumbMagic = cursor.getLong(INDEX_MINI_THUMB_MAGIC); int orientation = cursor.getInt(INDEX_ORIENTATION); diff --git a/src/com/android/camera/gallery/VideoList.java b/src/com/android/camera/gallery/VideoList.java index b445104..965146d 100644 --- a/src/com/android/camera/gallery/VideoList.java +++ b/src/com/android/camera/gallery/VideoList.java @@ -64,7 +64,7 @@ public class VideoList extends BaseImageList { String dataPath = cursor.getString(INDEX_DATA_PATH); long dateTaken = cursor.getLong(INDEX_DATE_TAKEN); if (dateTaken == 0) { - dateTaken = cursor.getLong(INDEX_DATE_MODIFIED); + dateTaken = cursor.getLong(INDEX_DATE_MODIFIED) * 1000; } String title = cursor.getString(INDEX_TITLE); String displayName = cursor.getString(INDEX_DISPLAY_NAME); |