From 6b95a91a2b7c6934ee1558b68dfb57c4b2f68e73 Mon Sep 17 00:00:00 2001 From: Pawel Kozak Date: Tue, 28 May 2013 12:20:52 +0200 Subject: Remove download notification after preview Removes download notification from the notification bar after previewing it. There should be an additional check for download shown in the notifications after completion to prevent from situation when ContentObserver is unregistered and the onChange is never called. Change-Id: I0914a680f08eb96949b56e08719eb28d2e80ccc9 --- src/com/android/providers/downloads/DownloadInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java index bee5c4a9..a0a77b43 100644 --- a/src/com/android/providers/downloads/DownloadInfo.java +++ b/src/com/android/providers/downloads/DownloadInfo.java @@ -372,7 +372,8 @@ public class DownloadInfo { if (!Downloads.Impl.isStatusCompleted(mStatus)) { return false; } - if (mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) { + if (mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED || + mVisibility == DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION) { return true; } return false; -- cgit v1.2.3