فهرست منبع

Ensure that upload notification gets cancelled

Normally, the notification gets cancelled when the service is destroyed.
But that does not always happen in practice, so we also cancel it after
every result.

Signed-off-by: Torsten Grote <t@grobox.de>
Torsten Grote 4 سال پیش
والد
کامیت
931aac7345
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/main/java/com/owncloud/android/files/services/FileUploader.java

+ 2 - 0
src/main/java/com/owncloud/android/files/services/FileUploader.java

@@ -751,6 +751,8 @@ public class FileUploader extends Service
             mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
         }
 
+        mNotificationManager.cancel(FOREGROUND_SERVICE_ID);
+
         // Only notify if the upload fails
         if (!uploadResult.isCancelled() &&
             !uploadResult.isSuccess() &&