OSDN Git Service

Fix Download application notification timestamp not correct issue
authorLixin Yue <L.X.YUE@motorola.com>
Mon, 2 Nov 2009 07:22:42 +0000 (15:22 +0800)
committerJaikumar Ganesh <jaikumar@google.com>
Wed, 25 Nov 2009 21:05:22 +0000 (13:05 -0800)
commit18c3040260907472a9e471e5707a5b2f8320d074
tree78c1333294a0fd96bdcbe9be9b0599f11b4a13c4
parent89f9c9b4ccc22bc1f37edf5effa518970d342808
Fix Download application notification timestamp not correct issue

Should set the value of Notification.when before calling
setLatestEventInfo(). On downloading an image without
exif information, the received file's timestamp is correct for main database field
but incorrect for temporary display field.

Root cause is that if Notification.when not set before calling setLatestEventInfo(),
the timestamp value in milliseconds unit will be directly set to a field as second
unit. Thus database will record the time as 1000 times forward as 2067, etc.
However from UI the file's time will be just shown like "10/10/67", misleading
people to think time is set backwards before system time 0(1969).
src/com/android/providers/downloads/DownloadNotification.java