diff options
author | Pawel Kozak <pawel.kozak@sonymobile.com> | 2013-05-28 12:20:52 +0200 |
---|---|---|
committer | Michael Bestas <mikeioannina@cyanogenmod.org> | 2016-01-24 03:25:47 +0200 |
commit | 6b95a91a2b7c6934ee1558b68dfb57c4b2f68e73 (patch) | |
tree | 7348aa36be4780a1a634607786382fc426fb8d0b /src | |
parent | da878690dee9a496530e14cc4e4700f9bcbf2e2b (diff) | |
download | android_packages_providers_DownloadProvider-6b95a91a2b7c6934ee1558b68dfb57c4b2f68e73.tar.gz android_packages_providers_DownloadProvider-6b95a91a2b7c6934ee1558b68dfb57c4b2f68e73.tar.bz2 android_packages_providers_DownloadProvider-6b95a91a2b7c6934ee1558b68dfb57c4b2f68e73.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/providers/downloads/DownloadInfo.java | 3 |
1 files changed, 2 insertions, 1 deletions
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; |