diff options
author | Jeff Sharkey <jsharkey@android.com> | 2016-10-14 15:31:37 -0600 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2016-10-14 15:31:39 -0600 |
commit | 16ee9158a395f3f67be12062d7f870f76e2677a5 (patch) | |
tree | af7c86c7cb5d3a4da4e5a4d6d5e9c2dde9de9a2f /src/com/android/providers/downloads/DownloadThread.java | |
parent | f170ae213f471bd16f423535c8373791f570c3d8 (diff) | |
download | android_packages_providers_DownloadProvider-16ee9158a395f3f67be12062d7f870f76e2677a5.tar.gz android_packages_providers_DownloadProvider-16ee9158a395f3f67be12062d7f870f76e2677a5.tar.bz2 android_packages_providers_DownloadProvider-16ee9158a395f3f67be12062d7f870f76e2677a5.zip |
Only send DOWNLOAD_COMPLETE broadcast once.
Apps might end up confused if we tell them a download was completed
multiple times, so only send the broadcast exactly once when we
transition it into a "completed" state, either during an update() or
a delete() operation.
Test: verified single broadcast with test app
Bug: 31619480
Change-Id: I0b9139ea0e37f6d212b84314048692cd0c4f9cdf
Diffstat (limited to 'src/com/android/providers/downloads/DownloadThread.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadThread.java | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index 5b5d9664..e101c74d 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -382,11 +382,6 @@ public class DownloadThread extends Thread { } if (Downloads.Impl.isStatusCompleted(mInfoDelta.mStatus)) { - // If download was canceled, we already sent requested intent when - // deleted in the provider - if (mInfoDelta.mStatus != STATUS_CANCELED) { - mInfo.sendIntentIfRequested(); - } if (mInfo.shouldScanFile(mInfoDelta.mStatus)) { DownloadScanner.requestScanBlocking(mContext, mInfo.mId, mInfoDelta.mFileName, mInfoDelta.mMimeType); |