diff options
Diffstat (limited to 'java/com/google/android/libraries/mobiledatadownload/DownloadListener.java')
-rw-r--r-- | java/com/google/android/libraries/mobiledatadownload/DownloadListener.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/com/google/android/libraries/mobiledatadownload/DownloadListener.java b/java/com/google/android/libraries/mobiledatadownload/DownloadListener.java index 240406d..673bfc7 100644 --- a/java/com/google/android/libraries/mobiledatadownload/DownloadListener.java +++ b/java/com/google/android/libraries/mobiledatadownload/DownloadListener.java @@ -42,8 +42,14 @@ public interface DownloadListener { * * <p>The onComplete is run on MDD Control Executor. If you need to do heavy work, please offload * to a background task. + * + * <p>If using foreground downloads, an exception may be thrown here to tell MDD a failure + * notification should be shown instead of a success notification. <b>NOTE:</b> this is the only + * case where the exception will be taken into account. Throwing an exception here will + * <em>NOT</em> cause the download future returned by MDD to fail. */ - void onComplete(ClientFileGroup clientFileGroup); + // TODO (b/236401280): Switch to async api + void onComplete(ClientFileGroup clientFileGroup) throws Exception; /** This will be called when the download failed. */ default void onFailure(Throwable t) { |