diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-18 20:10:54 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-18 20:10:54 -0700 |
commit | 1f8ea050e2ef9aa4a496955d003aaa204d6c46c8 (patch) | |
tree | d619830270b9cbfb6ba1514f40e7bc47c8b55c1d /src | |
parent | 94d2b27102f3c2ee548895f1113f865876d63e09 (diff) | |
parent | cce997c7726aa3881be7606d2ae3cc9a9b74beb8 (diff) | |
download | packages_apps_LegacyCamera-1f8ea050e2ef9aa4a496955d003aaa204d6c46c8.zip packages_apps_LegacyCamera-1f8ea050e2ef9aa4a496955d003aaa204d6c46c8.tar.gz packages_apps_LegacyCamera-1f8ea050e2ef9aa4a496955d003aaa204d6c46c8.tar.bz2 |
Merge change 21482 into eclair
* changes:
The DATE_TAKEN field is in milliseconds, but DATE_MODIFIED is in seconds.
Diffstat (limited to 'src')
-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); |