Merge pull request #3666 from ByteHamster/fix-cancellation-exception
Ignore cancellationException
This commit is contained in:
commit
a99a41e3bb
|
@ -218,6 +218,11 @@ public class DownloadService extends Service {
|
|||
nm.cancel(NOTIFICATION_ID);
|
||||
|
||||
downloadCompletionThread.interrupt();
|
||||
try {
|
||||
downloadCompletionThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
syncExecutor.shutdown();
|
||||
schedExecutor.shutdown();
|
||||
cancelNotificationUpdater();
|
||||
|
|
|
@ -11,6 +11,7 @@ import org.greenrobot.eventbus.EventBus;
|
|||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
@ -140,7 +141,7 @@ public class PlaybackServiceTaskManager {
|
|||
if (queueFuture.isDone()) {
|
||||
try {
|
||||
return queueFuture.get();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
} catch (InterruptedException | ExecutionException | CancellationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue