Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 464762e5 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Deprecate DownloadManager.allowScanningByMediaScanner/setVisibleInDownloadsUi" into qt-dev

parents a87fd739 5b2e695c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4680,7 +4680,7 @@ package android.app {
  public static class DownloadManager.Request {
    ctor public DownloadManager.Request(android.net.Uri);
    method public android.app.DownloadManager.Request addRequestHeader(String, String);
    method public void allowScanningByMediaScanner();
    method @Deprecated public void allowScanningByMediaScanner();
    method public android.app.DownloadManager.Request setAllowedNetworkTypes(int);
    method public android.app.DownloadManager.Request setAllowedOverMetered(boolean);
    method public android.app.DownloadManager.Request setAllowedOverRoaming(boolean);
@@ -4694,7 +4694,7 @@ package android.app {
    method public android.app.DownloadManager.Request setRequiresDeviceIdle(boolean);
    method @Deprecated public android.app.DownloadManager.Request setShowRunningNotification(boolean);
    method public android.app.DownloadManager.Request setTitle(CharSequence);
    method public android.app.DownloadManager.Request setVisibleInDownloadsUi(boolean);
    method @Deprecated public android.app.DownloadManager.Request setVisibleInDownloadsUi(boolean);
    field public static final int NETWORK_MOBILE = 1; // 0x1
    field public static final int NETWORK_WIFI = 2; // 0x2
    field public static final int VISIBILITY_HIDDEN = 2; // 0x2
+16 −0
Original line number Diff line number Diff line
@@ -592,7 +592,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;
        }
@@ -774,7 +782,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;