Revert "Enforce calling identity before clearing."
This reverts commit 0e6b4099a9720627e9301ffe5395887aee1411ff.
regression!
Change-Id: I915a1ed968fed0273026e1ad224f01a19d99733c
diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java
index 667a81d..d9acc78 100644
--- a/src/com/android/providers/downloads/DownloadProvider.java
+++ b/src/com/android/providers/downloads/DownloadProvider.java
@@ -1232,19 +1232,6 @@
logVerboseOpenFileInfo(uri, mode);
}
- // Perform normal query to enforce caller identity access before
- // clearing it to reach internal-only columns
- final Cursor probeCursor = query(uri, new String[] {
- Downloads.Impl._DATA }, null, null, null);
- try {
- if ((probeCursor == null) || (probeCursor.getCount() == 0)) {
- throw new FileNotFoundException(
- "No file found for " + uri + " as UID " + Binder.getCallingUid());
- }
- } finally {
- IoUtils.closeQuietly(probeCursor);
- }
-
final Cursor cursor = queryCleared(uri, new String[] {
Downloads.Impl._DATA, Downloads.Impl.COLUMN_STATUS,
Downloads.Impl.COLUMN_DESTINATION, Downloads.Impl.COLUMN_MEDIA_SCANNED }, null,