mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Fix scheduler NPE in DownloadService
PiperOrigin-RevId: 230260266
This commit is contained in:
parent
29711b922d
commit
de3a749b97
2 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ public class DemoDownloadService extends DownloadService {
|
|||
|
||||
@Override
|
||||
protected void onDownloadStateChanged(DownloadState downloadState) {
|
||||
Notification notification = null;
|
||||
Notification notification;
|
||||
if (downloadState.state == DownloadState.STATE_COMPLETED) {
|
||||
notification =
|
||||
DownloadNotificationUtil.buildDownloadCompletedNotification(
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ public abstract class DownloadService extends Service {
|
|||
public void detachService(DownloadService downloadService, boolean unschedule) {
|
||||
Assertions.checkState(this.downloadService == downloadService);
|
||||
this.downloadService = null;
|
||||
if (unschedule) {
|
||||
if (scheduler != null && unschedule) {
|
||||
scheduler.cancel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue