From 6b9789795ced7bf05e2c592c8445722df500e279 Mon Sep 17 00:00:00 2001 From: Per Edelberg Date: Wed, 10 Feb 2010 08:30:48 +0100 Subject: Show correct date for downloads in the statusbar The date was not set properly in notifications when the text for expanded view was created. This fix sets the displayed time to the download time for each individual file. The DownloadProvider recreates the notifications several times but don't set the time before the expanded message is created. The expanded message will therefore display the time the notification was created and not the time a file was downloaded. The displayed time will in most case be the time when the last file was downloaded. This fix sets the displayed time to the downloaded time for each individual file. --- src/com/android/providers/downloads/DownloadNotification.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadNotification.java b/src/com/android/providers/downloads/DownloadNotification.java index 9f54190e..f7c10073 100644 --- a/src/com/android/providers/downloads/DownloadNotification.java +++ b/src/com/android/providers/downloads/DownloadNotification.java @@ -276,6 +276,7 @@ class DownloadNotification { intent.setClassName("com.android.providers.downloads", DownloadReceiver.class.getName()); intent.setData(contentUri); + n.when = c.getLong(lastModColumnId); n.setLatestEventInfo(mContext, title, caption, PendingIntent.getBroadcast(mContext, 0, intent, 0)); @@ -285,8 +286,6 @@ class DownloadNotification { intent.setData(contentUri); n.deleteIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0); - n.when = c.getLong(lastModColumnId); - mNotificationMgr.notify(c.getInt(idColumn), n); } c.close(); -- cgit v1.2.3