merge in nyc-release history after reset to nyc-dev rel-24-uda-r1-partner rel-24-uda-r1.1-partner rel-24-uda-r1.2-partner rel-24-uda-r1.4-partner rel-24-uda-r2-partner
The Android Automerger [Wed, 29 Jun 2016 02:31:52 +0000 (19:31 -0700)]
src/com/android/providers/downloads/DownloadProvider.java

index 4b83cac..d30018f 100644 (file)
@@ -1229,8 +1229,13 @@ public final class DownloadProvider extends ContentProvider {
 
                         final String mediaUri = cursor.getString(2);
                         if (!TextUtils.isEmpty(mediaUri)) {
-                            getContext().getContentResolver().delete(Uri.parse(mediaUri), null,
-                                    null);
+                            final long token = Binder.clearCallingIdentity();
+                            try {
+                                getContext().getContentResolver().delete(Uri.parse(mediaUri), null,
+                                        null);
+                            } finally {
+                                Binder.restoreCallingIdentity(token);
+                            }
                         }
                     }
                 }