Add nullability annotation

This commit is contained in:
tzugen 2021-08-26 19:47:32 +02:00
parent 029f0fa4da
commit e0df24182e
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
package org.moire.ultrasonic.service;
import androidx.annotation.Nullable;
import org.moire.ultrasonic.domain.MusicDirectory;
import org.moire.ultrasonic.util.LRUCache;
import org.moire.ultrasonic.util.ShufflePlayBuffer;
@ -28,6 +30,8 @@ public class Downloader
{
public final List<DownloadFile> downloadList = new ArrayList<>();
public final List<DownloadFile> backgroundDownloadList = new ArrayList<>();
@Nullable
public DownloadFile currentDownloading;
private final ShufflePlayBuffer shufflePlayBuffer;

View File

@ -409,9 +409,7 @@ class MediaPlayerController(
reset()
// Cancel current download, if necessary.
if (downloader.currentDownloading != null) {
downloader.currentDownloading.cancelDownload()
}
downloader.currentDownloading?.cancelDownload()
} else {
jukeboxMediaPlayer.stopJukeboxService()
}