Cancel notification updater future before shutting down executor
This commit is contained in:
parent
4a4392e797
commit
f095ca8474
@ -219,9 +219,9 @@ public class DownloadService extends Service {
|
|||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
cancelNotificationUpdater();
|
||||||
syncExecutor.shutdown();
|
syncExecutor.shutdown();
|
||||||
schedExecutor.shutdown();
|
schedExecutor.shutdown();
|
||||||
cancelNotificationUpdater();
|
|
||||||
if (downloadPostFuture != null) {
|
if (downloadPostFuture != null) {
|
||||||
downloadPostFuture.cancel(true);
|
downloadPostFuture.cancel(true);
|
||||||
}
|
}
|
||||||
@ -640,6 +640,7 @@ public class DownloadService extends Service {
|
|||||||
if (n != null) {
|
if (n != null) {
|
||||||
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
nm.notify(R.id.notification_downloading, n);
|
nm.notify(R.id.notification_downloading, n);
|
||||||
|
Log.d(TAG, "Download progress notification was posted");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,6 +173,7 @@ public class DownloadServiceNotification {
|
|||||||
}
|
}
|
||||||
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
nm.notify(id, builder.build());
|
nm.notify(id, builder.build());
|
||||||
|
Log.d(TAG, "Download report notification was posted");
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "No report is created");
|
Log.d(TAG, "No report is created");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user