mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
get notification manager if it does not exist
This commit is contained in:
parent
ad6509bdb5
commit
576fb79f67
1 changed files with 5 additions and 1 deletions
|
@ -1158,7 +1158,11 @@ public class FileUploader extends Service
|
||||||
private void notifyUploadResult(UploadFileOperation upload,
|
private void notifyUploadResult(UploadFileOperation upload,
|
||||||
RemoteOperationResult uploadResult) {
|
RemoteOperationResult uploadResult) {
|
||||||
Log_OC.d(TAG, "NotifyUploadResult with resultCode: " + uploadResult.getCode());
|
Log_OC.d(TAG, "NotifyUploadResult with resultCode: " + uploadResult.getCode());
|
||||||
// / cancelled operation or success -> silent removal of progress notification
|
// cancelled operation or success -> silent removal of progress notification
|
||||||
|
if (mNotificationManager == null) {
|
||||||
|
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
mNotificationManager.cancel(R.string.uploader_upload_in_progress_ticker);
|
mNotificationManager.cancel(R.string.uploader_upload_in_progress_ticker);
|
||||||
|
|
||||||
// Show the result: success or fail notification
|
// Show the result: success or fail notification
|
||||||
|
|
Loading…
Reference in a new issue