From e413510093bf46146891a9efffc83e7f5c46269e Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sat, 8 Jul 2017 17:20:47 +0200 Subject: [PATCH] Document the methods of DownloadClient --- .../lineageos/updater/download/DownloadClient.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/org/lineageos/updater/download/DownloadClient.java b/src/org/lineageos/updater/download/DownloadClient.java index fa437fdd..9bc875fb 100644 --- a/src/org/lineageos/updater/download/DownloadClient.java +++ b/src/org/lineageos/updater/download/DownloadClient.java @@ -39,10 +39,22 @@ public interface DownloadClient { Map> getAll(); } + /** + * Start the download. This method has no effect if the download already started. + */ void start(); + /** + * Resume the download. The download will fail if the server can't fulfil the + * partial content request and DownloadCallback.onFailure() will be called. + * This method has no effect if the download already started or the destination + * file doesn't exist. + */ void resume(); + /** + * Cancel the download. This method has no effect if the download isn't ongoing. + */ void cancel(); final class Builder {