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

Commit 99e8e047 authored by Vasu Nori's avatar Vasu Nori Committed by Android Git Automerger
Browse files

am 6bc710f7: Merge "bug:3414192 new API to designate a download to be OTA update" into honeycomb

* commit '6bc710f7':
  bug:3414192 new API to designate a download to be OTA update
parents 50b029d5 6bc710f7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -29418,6 +29418,17 @@
<parameter name="uri" type="android.net.Uri">
</parameter>
</method>
<method name="setDownloadToBeOtaUpdate"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="setMimeType"
 return="android.app.DownloadManager.Request"
 abstract="false"
+11 −0
Original line number Diff line number Diff line
@@ -29418,6 +29418,17 @@
<parameter name="uri" type="android.net.Uri">
</parameter>
</method>
<method name="setDownloadToBeOtaUpdate"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="setMimeType"
 return="android.app.DownloadManager.Request"
 abstract="false"
+9 −0
Original line number Diff line number Diff line
@@ -339,6 +339,7 @@ public class DownloadManager {
        private boolean mIsVisibleInDownloadsUi = true;
        private boolean mScannable = false;
        private boolean mUseSystemCache = false;
        private boolean mOtaUpdate = false;
        /** if a file is designated as a MediaScanner scannable file, the following value is
         * stored in the database column {@link Downloads.Impl#COLUMN_MEDIA_SCANNED}.
         */
@@ -604,6 +605,13 @@ public class DownloadManager {
            return this;
        }

        /**
         * Set whether the download request is OTA Update. By default, it is set to false.
         */
        public void setDownloadToBeOtaUpdate() {
            mOtaUpdate = true;
        }

        /**
         * Set whether this download should be displayed in the system's Downloads UI. True by
         * default.
@@ -650,6 +658,7 @@ public class DownloadManager {
            values.put(Downloads.Impl.COLUMN_ALLOWED_NETWORK_TYPES, mAllowedNetworkTypes);
            values.put(Downloads.Impl.COLUMN_ALLOW_ROAMING, mRoamingAllowed);
            values.put(Downloads.Impl.COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI, mIsVisibleInDownloadsUi);
            values.put(Downloads.Impl.COLUMN_IGNORE_SIZE_LIMITS, mOtaUpdate);

            return values;
        }
+6 −0
Original line number Diff line number Diff line
@@ -397,6 +397,12 @@ public final class Downloads {
         */
        public static final String COLUMN_LAST_UPDATESRC = "lastUpdateSrc";

        /** Set this column to true if the given download should ignore the mobile network
         * download limits.
         * <P>Type: Boolean</P>
         */
        public static final String COLUMN_IGNORE_SIZE_LIMITS = "otaupdate";

        /**
         * default value for {@link #COLUMN_LAST_UPDATESRC}.
         * This value is used when this column's value is not relevant.