summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-08-18 21:12:27 -0700
committerJeff Sharkey <jsharkey@android.com>2013-08-18 21:12:27 -0700
commited08089f6dccae69eabfaa3383c5007f0dddc6a5 (patch)
tree0be67443089b6fbc1b8c84468cd7694e12d9d20d
parentd9dc4f2bffa9883194ded43a447b67f1974a0c44 (diff)
downloadandroid_packages_providers_DownloadProvider-ed08089f6dccae69eabfaa3383c5007f0dddc6a5.zip
android_packages_providers_DownloadProvider-ed08089f6dccae69eabfaa3383c5007f0dddc6a5.tar.gz
android_packages_providers_DownloadProvider-ed08089f6dccae69eabfaa3383c5007f0dddc6a5.tar.bz2
Clear identity when deleting downloads.
Bug: 10329983 Change-Id: Iff3db6e5210ae9f33ec13af91561475b269dcc40
-rw-r--r--src/com/android/providers/downloads/DownloadStorageProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/providers/downloads/DownloadStorageProvider.java b/src/com/android/providers/downloads/DownloadStorageProvider.java
index 9ce1199..f66f526 100644
--- a/src/com/android/providers/downloads/DownloadStorageProvider.java
+++ b/src/com/android/providers/downloads/DownloadStorageProvider.java
@@ -310,7 +310,12 @@ public class DownloadStorageProvider extends ContentProvider {
// Delegate to real provider
// TODO: only storage UI should be allowed to delete?
- mDm.remove(getDownloadFromDocument(docId));
+ final long token = Binder.clearCallingIdentity();
+ try {
+ return mDm.remove(getDownloadFromDocument(docId));
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
default: {
throw new UnsupportedOperationException("Unsupported Uri " + uri);