summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-03-30 02:50:07 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-30 02:50:07 -0700
commit6ef1eedac77977a4979a293499767e17ed3a4e03 (patch)
tree302a1c009403819ba750566d45bedb1b83be3f82
parentb0b8df4a20990c0554ce40f63454e88f5c57dc1f (diff)
parent872e7b7073fad8295e6314c73b87d7cb3f85d39c (diff)
downloadframeworks_base-6ef1eedac77977a4979a293499767e17ed3a4e03.zip
frameworks_base-6ef1eedac77977a4979a293499767e17ed3a4e03.tar.gz
frameworks_base-6ef1eedac77977a4979a293499767e17ed3a4e03.tar.bz2
Merge "Fix b/5353417 Images downloaded from browser are showing incorrect details (Time is shown as dec 31 1969)"
-rw-r--r--media/java/android/media/MediaScanner.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index a8144a7..43df8a1 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -839,7 +839,7 @@ public class MediaScanner
// and EXIF local time is not less than 1 Day, otherwise MediaProvider
// will use file time as taken time.
time = exif.getDateTime();
- if (Math.abs(mLastModified * 1000 - time) >= 86400000) {
+ if (time != -1 && Math.abs(mLastModified * 1000 - time) >= 86400000) {
values.put(Images.Media.DATE_TAKEN, time);
}
}
@@ -1183,7 +1183,7 @@ public class MediaScanner
static class MediaBulkDeleter {
StringBuilder whereClause = new StringBuilder();
- ArrayList<String> whereArgs = new ArrayList<String>(100);
+ ArrayList<String> whereArgs = new ArrayList<String>(100);
IContentProvider mProvider;
Uri mBaseUri;