diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2018-09-04 20:26:33 -0600 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2018-09-04 20:26:33 -0600 |
commit | aced9e9d756389bd9c55fa1146b376c6bf271c9f (patch) | |
tree | f992c10dcf083f849e90cd236c8279db43aaa3dd | |
parent | 7a51050f9fef78e4cccf919b57242e8f03cfc934 (diff) | |
parent | acb664cb6749ca5e019ec7bd71dc6f18d006e5b7 (diff) | |
download | android_packages_providers_DownloadProvider-aced9e9d756389bd9c55fa1146b376c6bf271c9f.tar.gz android_packages_providers_DownloadProvider-aced9e9d756389bd9c55fa1146b376c6bf271c9f.tar.bz2 android_packages_providers_DownloadProvider-aced9e9d756389bd9c55fa1146b376c6bf271c9f.zip |
Merge tag 'android-8.1.0_r46' into staging/lineage-15.1_merge-android-8.1.0_r46
Android 8.1.0 Release 46 (OPM6.171019.030.K1)
* tag 'android-8.1.0_r46':
Remove "public" download feature.
DO NOT MERGE: Update DownloadProvider for correct meteredness
Change-Id: I92670aee03eca110df90a5f24477243d4cc38637
-rw-r--r-- | src/com/android/providers/downloads/DownloadProvider.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java index e177da17..db7db65a 100644 --- a/src/com/android/providers/downloads/DownloadProvider.java +++ b/src/com/android/providers/downloads/DownloadProvider.java @@ -105,11 +105,6 @@ public final class DownloadProvider extends ContentProvider { private static final int ALL_DOWNLOADS_ID = 4; /** URI matcher constant for the URI of a download's request headers */ private static final int REQUEST_HEADERS_URI = 5; - /** URI matcher constant for the public URI returned by - * {@link DownloadManager#getUriForDownloadedFile(long)} if the given downloaded file - * is publicly accessible. - */ - private static final int PUBLIC_DOWNLOAD_ID = 6; static { sURIMatcher.addURI("downloads", "my_downloads", MY_DOWNLOADS); sURIMatcher.addURI("downloads", "my_downloads/#", MY_DOWNLOADS_ID); @@ -127,9 +122,6 @@ public final class DownloadProvider extends ContentProvider { sURIMatcher.addURI("downloads", "download/#/" + Downloads.Impl.RequestHeaders.URI_SEGMENT, REQUEST_HEADERS_URI); - sURIMatcher.addURI("downloads", - Downloads.Impl.PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT + "/#", - PUBLIC_DOWNLOAD_ID); } /** Different base URIs that could be used to access an individual download */ @@ -526,8 +518,7 @@ public final class DownloadProvider extends ContentProvider { return DOWNLOAD_LIST_TYPE; } case MY_DOWNLOADS_ID: - case ALL_DOWNLOADS_ID: - case PUBLIC_DOWNLOAD_ID: { + case ALL_DOWNLOADS_ID: { // return the mimetype of this id from the database final String id = getDownloadIdFromUri(uri); final SQLiteDatabase db = mOpenHelper.getReadableDatabase(); @@ -1234,8 +1225,7 @@ public final class DownloadProvider extends ContentProvider { int uriMatch) { SqlSelection selection = new SqlSelection(); selection.appendClause(where, whereArgs); - if (uriMatch == MY_DOWNLOADS_ID || uriMatch == ALL_DOWNLOADS_ID || - uriMatch == PUBLIC_DOWNLOAD_ID) { + if (uriMatch == MY_DOWNLOADS_ID || uriMatch == ALL_DOWNLOADS_ID) { selection.appendClause(Downloads.Impl._ID + " = ?", getDownloadIdFromUri(uri)); } if ((uriMatch == MY_DOWNLOADS || uriMatch == MY_DOWNLOADS_ID) |