Package org.robolectric.shadows
Class ShadowDownloadManager
- java.lang.Object
-
- org.robolectric.shadows.ShadowDownloadManager
-
@Implements(android.app.DownloadManager.class) public class ShadowDownloadManager extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShadowDownloadManager.CompletedDownload
Value class to represent a "completed download" sent toDownloadManager
using the addCompletedDownload APIs.static class
ShadowDownloadManager.ShadowQuery
static class
ShadowDownloadManager.ShadowRequest
-
Constructor Summary
Constructors Constructor Description ShadowDownloadManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
addCompletedDownload(String title, String description, boolean isMediaScannerScannable, String mimeType, String path, long length, boolean showNotification)
protected long
addCompletedDownload(String title, String description, boolean isMediaScannerScannable, String mimeType, String path, long length, boolean showNotification, Uri uri, Uri referrer)
protected long
enqueue(DownloadManager.Request request)
ShadowDownloadManager.CompletedDownload
getCompletedDownload(long id)
int
getCompletedDownloadsCount()
DownloadManager.Request
getRequest(long id)
int
getRequestCount()
protected Cursor
query(DownloadManager.Query query)
protected int
remove(long... ids)
-
-
-
Method Detail
-
enqueue
@Implementation protected long enqueue(DownloadManager.Request request)
-
remove
@Implementation protected int remove(long... ids)
-
query
@Implementation protected Cursor query(DownloadManager.Query query)
-
addCompletedDownload
@Implementation protected long addCompletedDownload(String title, String description, boolean isMediaScannerScannable, String mimeType, String path, long length, boolean showNotification)
-
addCompletedDownload
@Implementation(minSdk=24) protected long addCompletedDownload(String title, String description, boolean isMediaScannerScannable, String mimeType, String path, long length, boolean showNotification, Uri uri, Uri referrer)
-
getRequest
public DownloadManager.Request getRequest(long id)
-
getRequestCount
public int getRequestCount()
-
getCompletedDownload
public ShadowDownloadManager.CompletedDownload getCompletedDownload(long id)
-
getCompletedDownloadsCount
public int getCompletedDownloadsCount()
-
-