googleapis / googleapis/google-api-java-client
Handling Thread.interrupted in MediaHttpDownload
Đang mở
priority: p4
type: feature request
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 772
- Merge trung bình
- 1 giờ 44 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
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;
}
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.