googleapis / googleapis/google-api-java-client

Handling Thread.interrupted in MediaHttpDownload

オープン
#1,051 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: p4 type: feature request
主要言語
Java
スター
1.5k
フォーク
772
平均マージ
1時間 44分
マージ済み PR(30日)
1

説明

I was wondering if you could make a change such as the following to handle stopping a download. The developer could interrupt the background Thread doing the download to stop it.

if (mediaContentLength <= nextByteIndex || Thread.interrupted()) {
// All required bytes have been downloaded from the server.
bytesDownloaded = mediaContentLength;
updateStateAndNotifyListener(DownloadState.MEDIA_COMPLETE);
return;
}

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。