@Test public void errorDownload() { mReleaseDownloader.onDownloadError(mock(RuntimeException.class)); verify(mListener).onError(anyString()); }
@WorkerThread synchronized void onDownloadError(RuntimeException e) { if (isCancelled()) { return; } AppCenterLog.error(LOG_TAG, "Failed to download update id=" + mDownloadId, e); mListener.onError(e.getMessage()); }
DownloadManagerReleaseDownloader extends AbstractReleaseDownloader { @WorkerThread synchronized void onDownloadError(RuntimeException e) { if (isCancelled()) { return; } AppCenterLog.error(LOG_TAG, "Failed to download update id=" + mDownloadId, e); mListener.onError(e.getMessage()); } }
DownloadManagerReleaseDownloader extends AbstractReleaseDownloader { @WorkerThread synchronized void onDownloadError(RuntimeException e) { if (isCancelled()) { return; } AppCenterLog.error(LOG_TAG, "Failed to download update id=" + mDownloadId, e); mListener.onError(e.getMessage()); } DownloadManagerReleaseDownloader(@NonNull Context context, @NonNull ReleaseDetails releaseDetails, @NonNull Listener listener); }
DownloadManagerReleaseDownloader extends AbstractReleaseDownloader { @WorkerThread synchronized void onDownloadError(RuntimeException e) { if (isCancelled()) { return; } AppCenterLog.error(LOG_TAG, "Failed to download update id=" + mDownloadId, e); mListener.onError(e.getMessage()); } DownloadManagerReleaseDownloader(@NonNull Context context, @NonNull ReleaseDetails releaseDetails, @NonNull Listener listener); @Override synchronized boolean isDownloading(); @AnyThread @Override synchronized void resume(); @Override synchronized void cancel(); }
DownloadManagerReleaseDownloader extends AbstractReleaseDownloader { @WorkerThread synchronized void onDownloadError(RuntimeException e) { if (isCancelled()) { return; } AppCenterLog.error(LOG_TAG, "Failed to download update id=" + mDownloadId, e); mListener.onError(e.getMessage()); } DownloadManagerReleaseDownloader(@NonNull Context context, @NonNull ReleaseDetails releaseDetails, @NonNull Listener listener); @Override synchronized boolean isDownloading(); @AnyThread @Override synchronized void resume(); @Override synchronized void cancel();  }