Loading api/current.xml +47 −1 Original line number Diff line number Diff line Loading @@ -26632,7 +26632,7 @@ <parameter name="mimeType" type="java.lang.String"> </parameter> </method> <method name="setShowRunningNotification" <method name="setNotificationVisibility" return="android.app.DownloadManager.Request" abstract="false" native="false" Loading @@ -26642,6 +26642,19 @@ deprecated="not deprecated" visibility="public" > <parameter name="visibility" type="int"> </parameter> </method> <method name="setShowRunningNotification" return="android.app.DownloadManager.Request" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="show" type="boolean"> </parameter> </method> Loading Loading @@ -26693,6 +26706,39 @@ visibility="public" > </field> <field name="VISIBILITY_HIDDEN" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="VISIBILITY_VISIBLE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="VISIBILITY_VISIBLE_NOTIFY_COMPLETED" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ExpandableListActivity" extends="android.app.Activity" core/java/android/app/DownloadManager.java +48 −7 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.net.ConnectivityManager; import android.net.Uri; import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.BaseColumns; import android.provider.Downloads; import android.util.Pair; Loading Loading @@ -337,12 +336,33 @@ public class DownloadManager { private List<Pair<String, String>> mRequestHeaders = new ArrayList<Pair<String, String>>(); private CharSequence mTitle; private CharSequence mDescription; private boolean mShowNotification = true; private String mMimeType; private boolean mRoamingAllowed = true; private int mAllowedNetworkTypes = ~0; // default to all network types allowed private boolean mIsVisibleInDownloadsUi = true; /** * This download is visible but only shows in the notifications * while it's in progress. */ public static final int VISIBILITY_VISIBLE = 0; /** * This download is visible and shows in the notifications while * in progress and after completion. */ public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = 1; /** * This download doesn't show in the UI or in the notifications. */ public static final int VISIBILITY_HIDDEN = 2; /** can take any of the following values: {@link #VISIBILITY_HIDDEN} * {@link #VISIBILITY_VISIBLE_NOTIFY_COMPLETED}, {@link #VISIBILITY_VISIBLE} */ private int mNotificationVisibility = VISIBILITY_VISIBLE; /** * @param uri the HTTP URI to download. */ Loading Loading @@ -475,9 +495,33 @@ public class DownloadManager { * * @param show whether the download manager should show a notification for this download. * @return this object * @deprecated use {@link #setNotificationVisibility(int)} */ @Deprecated public Request setShowRunningNotification(boolean show) { mShowNotification = show; return (show) ? setNotificationVisibility(VISIBILITY_VISIBLE) : setNotificationVisibility(VISIBILITY_HIDDEN); } /** * Control whether a system notification is posted by the download manager while this * download is running or when it is completed. * If enabled, the download manager posts notifications about downloads * through the system {@link android.app.NotificationManager}. * By default, a notification is shown only when the download is in progress. *<p> * It can take the following values: {@link #VISIBILITY_HIDDEN}, * {@link #VISIBILITY_VISIBLE}, * {@link #VISIBILITY_VISIBLE_NOTIFY_COMPLETED}. *<p> * If set to {@link #VISIBILITY_HIDDEN}, this requires the permission * android.permission.DOWNLOAD_WITHOUT_NOTIFICATION. * * @param visibility the visibility setting value * @return this object */ public Request setNotificationVisibility(int visibility) { mNotificationVisibility = visibility; return this; } Loading Loading @@ -540,10 +584,7 @@ public class DownloadManager { putIfNonNull(values, Downloads.Impl.COLUMN_DESCRIPTION, mDescription); putIfNonNull(values, Downloads.Impl.COLUMN_MIME_TYPE, mMimeType); values.put(Downloads.Impl.COLUMN_VISIBILITY, mShowNotification ? Downloads.Impl.VISIBILITY_VISIBLE : Downloads.Impl.VISIBILITY_HIDDEN); values.put(Downloads.Impl.COLUMN_VISIBILITY, mNotificationVisibility); 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); Loading core/java/android/provider/Downloads.java +5 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.provider; import android.app.DownloadManager; import android.net.Uri; /** Loading Loading @@ -621,18 +622,19 @@ public final class Downloads { * This download is visible but only shows in the notifications * while it's in progress. */ public static final int VISIBILITY_VISIBLE = 0; public static final int VISIBILITY_VISIBLE = DownloadManager.Request.VISIBILITY_VISIBLE; /** * This download is visible and shows in the notifications while * in progress and after completion. */ public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = 1; public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED; /** * This download doesn't show in the UI or in the notifications. */ public static final int VISIBILITY_HIDDEN = 2; public static final int VISIBILITY_HIDDEN = DownloadManager.Request.VISIBILITY_HIDDEN; /** * Constants related to HTTP request headers associated with each download. Loading Loading
api/current.xml +47 −1 Original line number Diff line number Diff line Loading @@ -26632,7 +26632,7 @@ <parameter name="mimeType" type="java.lang.String"> </parameter> </method> <method name="setShowRunningNotification" <method name="setNotificationVisibility" return="android.app.DownloadManager.Request" abstract="false" native="false" Loading @@ -26642,6 +26642,19 @@ deprecated="not deprecated" visibility="public" > <parameter name="visibility" type="int"> </parameter> </method> <method name="setShowRunningNotification" return="android.app.DownloadManager.Request" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > <parameter name="show" type="boolean"> </parameter> </method> Loading Loading @@ -26693,6 +26706,39 @@ visibility="public" > </field> <field name="VISIBILITY_HIDDEN" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="VISIBILITY_VISIBLE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="VISIBILITY_VISIBLE_NOTIFY_COMPLETED" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ExpandableListActivity" extends="android.app.Activity"
core/java/android/app/DownloadManager.java +48 −7 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ import android.net.ConnectivityManager; import android.net.Uri; import android.os.Environment; import android.os.ParcelFileDescriptor; import android.provider.BaseColumns; import android.provider.Downloads; import android.util.Pair; Loading Loading @@ -337,12 +336,33 @@ public class DownloadManager { private List<Pair<String, String>> mRequestHeaders = new ArrayList<Pair<String, String>>(); private CharSequence mTitle; private CharSequence mDescription; private boolean mShowNotification = true; private String mMimeType; private boolean mRoamingAllowed = true; private int mAllowedNetworkTypes = ~0; // default to all network types allowed private boolean mIsVisibleInDownloadsUi = true; /** * This download is visible but only shows in the notifications * while it's in progress. */ public static final int VISIBILITY_VISIBLE = 0; /** * This download is visible and shows in the notifications while * in progress and after completion. */ public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = 1; /** * This download doesn't show in the UI or in the notifications. */ public static final int VISIBILITY_HIDDEN = 2; /** can take any of the following values: {@link #VISIBILITY_HIDDEN} * {@link #VISIBILITY_VISIBLE_NOTIFY_COMPLETED}, {@link #VISIBILITY_VISIBLE} */ private int mNotificationVisibility = VISIBILITY_VISIBLE; /** * @param uri the HTTP URI to download. */ Loading Loading @@ -475,9 +495,33 @@ public class DownloadManager { * * @param show whether the download manager should show a notification for this download. * @return this object * @deprecated use {@link #setNotificationVisibility(int)} */ @Deprecated public Request setShowRunningNotification(boolean show) { mShowNotification = show; return (show) ? setNotificationVisibility(VISIBILITY_VISIBLE) : setNotificationVisibility(VISIBILITY_HIDDEN); } /** * Control whether a system notification is posted by the download manager while this * download is running or when it is completed. * If enabled, the download manager posts notifications about downloads * through the system {@link android.app.NotificationManager}. * By default, a notification is shown only when the download is in progress. *<p> * It can take the following values: {@link #VISIBILITY_HIDDEN}, * {@link #VISIBILITY_VISIBLE}, * {@link #VISIBILITY_VISIBLE_NOTIFY_COMPLETED}. *<p> * If set to {@link #VISIBILITY_HIDDEN}, this requires the permission * android.permission.DOWNLOAD_WITHOUT_NOTIFICATION. * * @param visibility the visibility setting value * @return this object */ public Request setNotificationVisibility(int visibility) { mNotificationVisibility = visibility; return this; } Loading Loading @@ -540,10 +584,7 @@ public class DownloadManager { putIfNonNull(values, Downloads.Impl.COLUMN_DESCRIPTION, mDescription); putIfNonNull(values, Downloads.Impl.COLUMN_MIME_TYPE, mMimeType); values.put(Downloads.Impl.COLUMN_VISIBILITY, mShowNotification ? Downloads.Impl.VISIBILITY_VISIBLE : Downloads.Impl.VISIBILITY_HIDDEN); values.put(Downloads.Impl.COLUMN_VISIBILITY, mNotificationVisibility); 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); Loading
core/java/android/provider/Downloads.java +5 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.provider; import android.app.DownloadManager; import android.net.Uri; /** Loading Loading @@ -621,18 +622,19 @@ public final class Downloads { * This download is visible but only shows in the notifications * while it's in progress. */ public static final int VISIBILITY_VISIBLE = 0; public static final int VISIBILITY_VISIBLE = DownloadManager.Request.VISIBILITY_VISIBLE; /** * This download is visible and shows in the notifications while * in progress and after completion. */ public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = 1; public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED = DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED; /** * This download doesn't show in the UI or in the notifications. */ public static final int VISIBILITY_HIDDEN = 2; public static final int VISIBILITY_HIDDEN = DownloadManager.Request.VISIBILITY_HIDDEN; /** * Constants related to HTTP request headers associated with each download. Loading