googleapis / googleapis/google-api-java-client
Handling Thread.interrupted in MediaHttpDownload
オープン
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 はまだ評価されていません。