googleapis / googleapis/google-api-java-client

Handling Thread.interrupted in MediaHttpDownload

Abierto
#1,051 1 comentario 0 reacciones 0 asignados Ver en GitHub
priority: p4 type: feature request
Lenguaje dominante
Java
Estrellas
1.5k
Forks
772
Merge medio
1 h 44 min
PR fusionados (30 d)
1

Descripción

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;
}

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.