Home
last modified time | relevance | path

Searched full:download (Results 1 – 25 of 3404) sorted by relevance

12345678910>>...137

/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/offline/
DDefaultDownloadIndexTest.java60 Download download = new DownloadBuilder(id).build(); in addAndGetDownload_nonExistingId_returnsTheSameDownload() local
62 downloadIndex.putDownload(download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
63 Download readDownload = downloadIndex.getDownload(id); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
65 assertEqual(readDownload, download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
74 Download download = in addAndGetDownload_existingId_returnsUpdatedDownload() local
79 .setState(Download.STATE_FAILED) in addAndGetDownload_existingId_returnsUpdatedDownload()
83 .setFailureReason(Download.FAILURE_REASON_UNKNOWN) in addAndGetDownload_existingId_returnsUpdatedDownload()
92 downloadIndex.putDownload(download); in addAndGetDownload_existingId_returnsUpdatedDownload()
93 Download readDownload = downloadIndex.getDownload(id); in addAndGetDownload_existingId_returnsUpdatedDownload()
96 assertEqual(readDownload, download); in addAndGetDownload_existingId_returnsUpdatedDownload()
[all …]
DDownloadManagerTest.java25 import com.google.android.exoplayer2.offline.Download.State;
112 // Two download requests on first task in multipleRequestsForTheSameContent_executedOnTheSameTask()
114 // One download, one remove requests on second task in multipleRequestsForTheSameContent_executedOnTheSameTask()
250 // Finish one download and keep one running. in removeAllDownloads_removesAllDownloads()
380 List<Download> downloads = downloadManager.getCurrentDownloads(); in getCurrentDownloads_returnsCurrentDownloads()
410 // When a new remove request is added, it cancels stopped download requests with the same media. in pauseAndResume()
415 // New download requests can be added but they don't start. in pauseAndResume()
437 runOnMainThread(() -> downloadManager.setStopReason(task.taskId, Download.STOP_REASON_NONE)); in setAndClearSingleDownloadStopReason()
478 // New download requests can be added and they start. in setSingleDownloadStopReason_doesNotAffectOtherDownloads()
488 new DownloadBuilder(downloadRequest).setState(Download.STATE_REMOVING); in mergeRequest_removing_becomesRestarting()
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/core/src/main/java/com/google/android/exoplayer2/offline/
DDownloadManager.java18 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_NONE;
19 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_UNKNOWN;
20 import static com.google.android.exoplayer2.offline.Download.STATE_COMPLETED;
21 import static com.google.android.exoplayer2.offline.Download.STATE_DOWNLOADING;
22 import static com.google.android.exoplayer2.offline.Download.STATE_FAILED;
23 import static com.google.android.exoplayer2.offline.Download.STATE_QUEUED;
24 import static com.google.android.exoplayer2.offline.Download.STATE_REMOVING;
25 import static com.google.android.exoplayer2.offline.Download.STATE_RESTARTING;
26 import static com.google.android.exoplayer2.offline.Download.STATE_STOPPED;
27 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
[all …]
DDefaultDownloadIndex.java33 import com.google.android.exoplayer2.offline.Download.FailureReason;
34 import com.google.android.exoplayer2.offline.Download.State;
41 /** A {@link DownloadIndex} that uses SQLite to persist {@link Download Downloads}. */
82 COLUMN_STATE + " = " + Download.STATE_DOWNLOADING;
84 getStateQuery(Download.STATE_COMPLETED, Download.STATE_FAILED);
149 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
155 * <p>Applications that only have one download index may use this constructor. Applications that
156 * have multiple download indices should call {@link #DefaultDownloadIndex(DatabaseProvider,
166 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
182 public Download getDownload(String id) throws DatabaseIOException { in getDownload()
[all …]
DWritableDownloadIndex.java21 /** A writable index of {@link Download Downloads}. */
26 * Adds or replaces a {@link Download}.
30 * @param download The {@link Download} to be added.
33 void putDownload(Download download) throws IOException; in putDownload() argument
36 * Removes the download with the given ID. Does nothing if a download with the given ID does not
41 * @param id The ID of the download to remove.
47 * Sets all {@link Download#STATE_DOWNLOADING} states to {@link Download#STATE_QUEUED}.
56 * Sets all states to {@link Download#STATE_REMOVING}.
65 * Sets the stop reason of the downloads in a terminal state ({@link Download#STATE_COMPLETED},
66 * {@link Download#STATE_FAILED}).
[all …]
DDownload.java32 /** Represents state of a download. */
33 public final class Download { class
36 * Download states. One of {@link #STATE_QUEUED}, {@link #STATE_STOPPED}, {@link
57 * The download is waiting to be started. A download may be queued because the {@code
68 /** The download is stopped for a specified {@link #stopReason}. */
70 /** The download is currently started. */
72 /** The download completed. */
74 /** The download failed. */
76 /** The download is being removed. */
78 /** The download will restart after all downloaded data is removed. */
[all …]
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/core/src/main/java/com/google/android/exoplayer2/offline/
DDownloadManager.java18 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_NONE;
19 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_UNKNOWN;
20 import static com.google.android.exoplayer2.offline.Download.STATE_COMPLETED;
21 import static com.google.android.exoplayer2.offline.Download.STATE_DOWNLOADING;
22 import static com.google.android.exoplayer2.offline.Download.STATE_FAILED;
23 import static com.google.android.exoplayer2.offline.Download.STATE_QUEUED;
24 import static com.google.android.exoplayer2.offline.Download.STATE_REMOVING;
25 import static com.google.android.exoplayer2.offline.Download.STATE_RESTARTING;
26 import static com.google.android.exoplayer2.offline.Download.STATE_STOPPED;
27 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
[all …]
DDefaultDownloadIndex.java33 import com.google.android.exoplayer2.offline.Download.FailureReason;
34 import com.google.android.exoplayer2.offline.Download.State;
41 /** A {@link DownloadIndex} that uses SQLite to persist {@link Download Downloads}. */
82 COLUMN_STATE + " = " + Download.STATE_DOWNLOADING;
84 getStateQuery(Download.STATE_COMPLETED, Download.STATE_FAILED);
149 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
155 * <p>Applications that only have one download index may use this constructor. Applications that
156 * have multiple download indices should call {@link #DefaultDownloadIndex(DatabaseProvider,
166 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
182 public Download getDownload(String id) throws DatabaseIOException { in getDownload()
[all …]
DWritableDownloadIndex.java21 /** A writable index of {@link Download Downloads}. */
26 * Adds or replaces a {@link Download}.
30 * @param download The {@link Download} to be added.
33 void putDownload(Download download) throws IOException; in putDownload() argument
36 * Removes the download with the given ID. Does nothing if a download with the given ID does not
41 * @param id The ID of the download to remove.
47 * Sets all {@link Download#STATE_DOWNLOADING} states to {@link Download#STATE_QUEUED}.
56 * Sets all states to {@link Download#STATE_REMOVING}.
65 * Sets the stop reason of the downloads in a terminal state ({@link Download#STATE_COMPLETED},
66 * {@link Download#STATE_FAILED}).
[all …]
DDownload.java25 /** Represents state of a download. */
26 public final class Download { class
29 * Download states. One of {@link #STATE_QUEUED}, {@link #STATE_STOPPED}, {@link
47 * The download is waiting to be started. A download may be queued because the {@code
58 /** The download is stopped for a specified {@link #stopReason}. */
60 /** The download is currently started. */
62 /** The download completed. */
64 /** The download failed. */
66 /** The download is being removed. */
68 /** The download will restart after all downloaded data is removed. */
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/core/src/test/java/com/google/android/exoplayer2/offline/
DDefaultDownloadIndexTest.java18 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_NONE;
19 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_UNKNOWN;
20 import static com.google.android.exoplayer2.offline.Download.STATE_DOWNLOADING;
21 import static com.google.android.exoplayer2.offline.Download.STATE_STOPPED;
22 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
76 Download download = new DownloadBuilder(id).build(); in addAndGetDownload_nonExistingId_returnsTheSameDownload() local
78 downloadIndex.putDownload(download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
79 Download readDownload = downloadIndex.getDownload(id); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
81 assertEqual(readDownload, download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
90 Download download = in addAndGetDownload_existingId_returnsUpdatedDownload() local
[all …]
DDownloadManagerTest.java55 /** The minimum number of times a download must be retried before failing. */
110 // The download will be canceled by the remove request. in removeRequest_cancelsAndRemovesDownload()
115 // The download will be removed. in removeRequest_cancelsAndRemovesDownload()
178 // should be able to fail (MIN_RETRY_COUNT - 1) more times and then still complete the download in download_retryMakesProgress_resetsRetryCount()
233 // The download should then start and complete. in download_WhenRemovalInProgress_doesNotCancelRemoval()
269 // Finish one download. in removeAllDownloads_removesAllDownloads()
277 // Start a second download. in removeAllDownloads_removesAllDownloads()
359 // The second download should be queued and the first one should be able to complete. in downloads_withDifferentIds_maxDownloadsIsOne_executedSequentially()
365 // The second download can start once the first one has completed. in downloads_withDifferentIds_maxDownloadsIsOne_executedSequentially()
383 // Complete a download so that we can remove it. in downloadAndRemove_withDifferentIds_maxDownloadsIsOne_executeInParallel()
[all …]
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/core/src/test/java/com/google/android/exoplayer2/offline/
DDefaultDownloadIndexTest.java18 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_NONE;
19 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_UNKNOWN;
20 import static com.google.android.exoplayer2.offline.Download.STATE_DOWNLOADING;
21 import static com.google.android.exoplayer2.offline.Download.STATE_STOPPED;
22 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
76 Download download = new DownloadBuilder(id).build(); in addAndGetDownload_nonExistingId_returnsTheSameDownload() local
78 downloadIndex.putDownload(download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
79 Download readDownload = downloadIndex.getDownload(id); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
81 assertEqual(readDownload, download); in addAndGetDownload_nonExistingId_returnsTheSameDownload()
90 Download download = in addAndGetDownload_existingId_returnsUpdatedDownload() local
[all …]
DDownloadManagerTest.java55 /** The minimum number of times a download must be retried before failing. */
110 // The download will be canceled by the remove request. in removeRequest_cancelsAndRemovesDownload()
115 // The download will be removed. in removeRequest_cancelsAndRemovesDownload()
178 // should be able to fail (MIN_RETRY_COUNT - 1) more times and then still complete the download in download_retryMakesProgress_resetsRetryCount()
233 // The download should then start and complete. in download_WhenRemovalInProgress_doesNotCancelRemoval()
269 // Finish one download. in removeAllDownloads_removesAllDownloads()
277 // Start a second download. in removeAllDownloads_removesAllDownloads()
359 // The second download should be queued and the first one should be able to complete. in downloads_withDifferentIds_maxDownloadsIsOne_executedSequentially()
365 // The second download can start once the first one has completed. in downloads_withDifferentIds_maxDownloadsIsOne_executedSequentially()
383 // Complete a download so that we can remove it. in downloadAndRemove_withDifferentIds_maxDownloadsIsOne_executeInParallel()
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/offline/
DDownloadManager.java18 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_NONE;
19 import static com.google.android.exoplayer2.offline.Download.FAILURE_REASON_UNKNOWN;
20 import static com.google.android.exoplayer2.offline.Download.STATE_COMPLETED;
21 import static com.google.android.exoplayer2.offline.Download.STATE_DOWNLOADING;
22 import static com.google.android.exoplayer2.offline.Download.STATE_FAILED;
23 import static com.google.android.exoplayer2.offline.Download.STATE_QUEUED;
24 import static com.google.android.exoplayer2.offline.Download.STATE_REMOVING;
25 import static com.google.android.exoplayer2.offline.Download.STATE_RESTARTING;
26 import static com.google.android.exoplayer2.offline.Download.STATE_STOPPED;
27 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
[all …]
DWritableDownloadIndex.java21 /** A writable index of {@link Download Downloads}. */
26 * Adds or replaces a {@link Download}.
30 * @param download The {@link Download} to be added.
33 void putDownload(Download download) throws IOException; in putDownload() argument
36 * Removes the download with the given ID. Does nothing if a download with the given ID does not
41 * @param id The ID of the download to remove.
47 * Sets all {@link Download#STATE_DOWNLOADING} states to {@link Download#STATE_QUEUED}.
56 * Sets all states to {@link Download#STATE_REMOVING}.
65 * Sets the stop reason of the downloads in a terminal state ({@link Download#STATE_COMPLETED},
66 * {@link Download#STATE_FAILED}).
[all …]
DDownloadService.java18 import static com.google.android.exoplayer2.offline.Download.STOP_REASON_NONE;
43 * Starts a download service to resume any ongoing downloads. Extras:
57 * Adds a new download. Extras:
60 * <li>{@link #KEY_DOWNLOAD_REQUEST} - A {@link DownloadRequest} defining the download to be
62 * <li>{@link #KEY_STOP_REASON} - An initial stop reason for the download. If omitted {@link
63 * Download#STOP_REASON_NONE} is used.
71 * Removes a download. Extras:
74 * <li>{@link #KEY_CONTENT_ID} - The content id of a download to remove.
92 * Resumes all downloads except those that have a non-zero {@link Download#stopReason}. Extras:
113 * Download#STOP_REASON_NONE}. Extras:
[all …]
DDefaultDownloadIndex.java29 import com.google.android.exoplayer2.offline.Download.FailureReason;
30 import com.google.android.exoplayer2.offline.Download.State;
36 /** A {@link DownloadIndex} that uses SQLite to persist {@link Download Downloads}. */
75 COLUMN_STATE + " = " + Download.STATE_DOWNLOADING;
77 getStateQuery(Download.STATE_COMPLETED, Download.STATE_FAILED);
137 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
143 * <p>Applications that only have one download index may use this constructor. Applications that
144 * have multiple download indices should call {@link #DefaultDownloadIndex(DatabaseProvider,
154 * Creates an instance that stores the {@link Download Downloads} in an SQLite database provided
169 public Download getDownload(String id) throws DatabaseIOException { in getDownload()
[all …]
DDownload.java25 /** Represents state of a download. */
26 public final class Download { class
29 * Download states. One of {@link #STATE_QUEUED}, {@link #STATE_STOPPED}, {@link
47 * The download is waiting to be started. A download may be queued because the {@link
58 /** The download is stopped for a specified {@link #stopReason}. */
60 /** The download is currently started. */
62 /** The download completed. */
64 /** The download failed. */
66 /** The download is being removed. */
68 /** The download will restart after all downloaded data is removed. */
[all …]
DActionFileUpgradeUtil.java18 import static com.google.android.exoplayer2.offline.Download.STATE_QUEUED;
29 /** Provides download IDs during action file upgrade. */
33 * Returns a download id for given request.
36 * @return A corresponding download ID.
54 * @param downloadIdProvider A download ID provider, or {@code null}. If {@code null} then ID of
55 * each download will be its custom cache key if one is specified, or else its URL.
104 @Nullable Download download = downloadIndex.getDownload(request.id); in mergeRequest() local
105 if (download != null) { in mergeRequest()
106 download = DownloadManager.mergeRequest(download, request, download.stopReason, nowMs); in mergeRequest()
108 download = in mergeRequest()
[all …]
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/docs/
Ddownloading-media.md5 ExoPlayer provides functionality to download media for offline playback. In most
20 on requirements such as network connectivity, and so on. To download the
68 // A download cache should not evict media, so should use a NoopCacheEvictor.
77 // Choose an executor for downloading data. Using Runnable::run will cause each download task to
78 // download data on its own thread. Passing an executor that uses multiple threads will speed up
79 // download tasks that can be split into smaller parts for parallel execution. Applications that
83 // Create the download manager.
91 // Optionally, setters can be called to configure the download manager.
99 The example in the demo app also imports download state from legacy `ActionFile`
104 ## Adding a download ##
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/docs/
Ddownloading-media.md5 ExoPlayer provides functionality to download media for offline playback. In most
20 on requirements such as network connectivity, and so on. To download the
68 // A download cache should not evict media, so should use a NoopCacheEvictor.
77 // Choose an executor for downloading data. Using Runnable::run will cause each download task to
78 // download data on its own thread. Passing an executor that uses multiple threads will speed up
79 // download tasks that can be split into smaller parts for parallel execution. Applications that
83 // Create the download manager.
91 // Optionally, setters can be called to configure the download manager.
99 ## Adding a download ##
101 To add a download you need to create a `DownloadRequest` and send it to your
[all …]
/external/exoplayer/tree/demos/main/src/main/java/com/google/android/exoplayer2/demo/
DDownloadTracker.java30 import com.google.android.exoplayer2.offline.Download;
61 private final HashMap<Uri, Download> downloads;
88 Download download = downloads.get(checkNotNull(mediaItem.playbackProperties).sourceUri); in isDownloaded() local
89 return download != null && download.state != Download.STATE_FAILED; in isDownloaded()
93 Download download = downloads.get(uri); in getDownloadRequest() local
94 return download != null && download.state != Download.STATE_FAILED ? download.request : null; in getDownloadRequest()
99 Download download = downloads.get(checkNotNull(mediaItem.playbackProperties).sourceUri); in toggleDownload() local
100 if (download != null) { in toggleDownload()
102 context, DemoDownloadService.class, download.request.id, /* foreground= */ false); in toggleDownload()
116 Download download = loadedDownloads.getDownload(); in loadDownloads() local
[all …]
/external/python/google-api-python-client/docs/dyn/
Dandroidpublisher_v3.generatedapks.html81 …<code><a href="#download">download(packageName, versionCode, downloadId, x__xgafv=None)</a></code>…
88 <p class="firstline">Returns download metadata for all APKs that were generated from a given app bu…
96 …<code class="details" id="download">download(packageName, versionCode, downloadId, x__xgafv=None)<…
102 …downloadId: string, Download ID, which uniquely identifies the APK to download. Can be obtained fr…
117 …downloadId: string, Download ID, which uniquely identifies the APK to download. Can be obtained fr…
127 <pre>Returns download metadata for all APKs that were generated from a given app bundle.
142 …{ # Download metadata for split, standalone and universal APKs, as well as asset pack slices, sign…
145 { # Download metadata for an asset pack slice.
146 …&quot;A String&quot;, # Download ID, which uniquely identifies the APK to download. Should be supp…
153 { # Download metadata for a split APK.
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/demos/main/src/main/java/com/google/android/exoplayer2/demo/
DDownloadTracker.java36 import com.google.android.exoplayer2.offline.Download;
70 private final HashMap<Uri, Download> downloads;
95 @Nullable Download download = downloads.get(checkNotNull(mediaItem.localConfiguration).uri); in isDownloaded() local
96 return download != null && download.state != Download.STATE_FAILED; in isDownloaded()
101 @Nullable Download download = downloads.get(uri); in getDownloadRequest() local
102 return download != null && download.state != Download.STATE_FAILED ? download.request : null; in getDownloadRequest()
107 @Nullable Download download = downloads.get(checkNotNull(mediaItem.localConfiguration).uri); in toggleDownload() local
108 if (download != null && download.state != Download.STATE_FAILED) { in toggleDownload()
110 context, DemoDownloadService.class, download.request.id, /* foreground= */ false); in toggleDownload()
126 Download download = loadedDownloads.getDownload(); in loadDownloads() local
[all …]

12345678910>>...137