diff options
| author | Sudheer Shanka <sudheersai@google.com> | 2019-04-28 16:00:53 +0000 |
|---|---|---|
| committer | Sudheer Shanka <sudheersai@google.com> | 2019-04-28 10:15:26 -0700 |
| commit | 5b2e695cd0d0d162ed375863bfd9baf9adfd7dea (patch) | |
| tree | feb7bad7c2b1eb17ec549c3acbf8e9e977a22928 /core/java/android | |
| parent | eb8b30d226a24f4c852b02b26fb256efc01f1915 (diff) | |
Deprecate DownloadManager.allowScanningByMediaScanner/setVisibleInDownloadsUi
Bug: 131483165
Test: n/a
Change-Id: I8e7f9c29d9bb323a7c0849e9ae4a87d0e74b16ab
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/DownloadManager.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java index 49ba65f7c348..f9981fbaea58 100644 --- a/core/java/android/app/DownloadManager.java +++ b/core/java/android/app/DownloadManager.java @@ -591,7 +591,15 @@ public class DownloadManager { /** * If the file to be downloaded is to be scanned by MediaScanner, this method * should be called before {@link DownloadManager#enqueue(Request)} is called. + * + * @deprecated Starting in Q, this value is ignored. Files downloaded to + * public Downloads directory (as returned by + * {@link Environment#getExternalStoragePublicDirectory(String)} with + * {@link Environment#DIRECTORY_DOWNLOADS}) will be scanned by MediaScanner + * and files downloaded to directories owned by applications + * (e.g. {@link Context#getExternalFilesDir(String)}) will not be scanned. */ + @Deprecated public void allowScanningByMediaScanner() { mScannable = true; } @@ -773,7 +781,15 @@ public class DownloadManager { * default. * @param isVisible whether to display this download in the Downloads UI * @return this object + * + * @deprecated Starting in Q, this value is ignored. Files downloaded to + * public Downloads directory (as returned by + * {@link Environment#getExternalStoragePublicDirectory(String)} with + * {@link Environment#DIRECTORY_DOWNLOADS}) will be visible in system's Downloads UI + * and files downloaded to directories owned by applications + * (e.g. {@link Context#getExternalFilesDir(String)}) will not be visible. */ + @Deprecated public Request setVisibleInDownloadsUi(boolean isVisible) { mIsVisibleInDownloadsUi = isVisible; return this; |
