googleapis / googleapis/google-api-java-client
Handling Thread.interrupted in MediaHttpDownload
Aperta
priority: p4
type: feature request
- Lingua principale
- Java
- Stelle
- 1.5k
- Fork
- 772
- Merge medio
- 1h 44m
- PR unite (30g)
- 1
Descrizione
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;
}
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.