summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Edelberg <per.edelberg.x@sonyericsson.com>2010-02-10 08:30:48 +0100
committerJohan Redestig <johan.redestig@sonyericsson.com>2010-02-10 08:30:48 +0100
commit6b9789795ced7bf05e2c592c8445722df500e279 (patch)
tree800f27e792665d1abd7bb37ed46f6a02a2cd816e
parentbb9dc6e1ac5e7ae0f12a8bb0aeb2a3b324328ec5 (diff)
downloadandroid_packages_providers_DownloadProvider-6b9789795ced7bf05e2c592c8445722df500e279.tar.gz
android_packages_providers_DownloadProvider-6b9789795ced7bf05e2c592c8445722df500e279.tar.bz2
android_packages_providers_DownloadProvider-6b9789795ced7bf05e2c592c8445722df500e279.zip
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.
-rw-r--r--src/com/android/providers/downloads/DownloadNotification.java3
1 files changed, 1 insertions, 2 deletions
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();