From 2be85cd23d2d56d1b0ea87f0f815ef80693b98c2 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 23 Aug 2016 14:01:11 -0600 Subject: DO NOT MERGE. Update notifications when deleting downloads. Otherwise we end up leaving stale notifications around after the underlying download was deleted. Change-Id: Ie262a9dd369034de6c06be28b0eedc4231ea2e75 Test: none Bug: 30697605 (cherry picked from commit 3b7e099588a2697305fd52c342f404a03ec9a9ab) --- src/com/android/providers/downloads/DownloadProvider.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java index d30018f7..95d90dc1 100644 --- a/src/com/android/providers/downloads/DownloadProvider.java +++ b/src/com/android/providers/downloads/DownloadProvider.java @@ -1248,6 +1248,12 @@ public final class DownloadProvider extends ContentProvider { throw new UnsupportedOperationException("Cannot delete URI: " + uri); } notifyContentChanged(uri, match); + final long token = Binder.clearCallingIdentity(); + try { + Helpers.getDownloadNotifier(getContext()).update(); + } finally { + Binder.restoreCallingIdentity(token); + } return count; } -- cgit v1.2.3