فهرست منبع

Progress bar in notifications is hidden when download/upload finishes

David A. Velasco 11 سال پیش
والد
کامیت
7ab8ee7d4a

+ 2 - 1
src/com/owncloud/android/files/services/FileDownloader.java

@@ -465,7 +465,8 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
                 .setTicker(getString(tickerId))
                 .setContentTitle(getString(tickerId))
                 .setAutoCancel(true)
-                .setOngoing(false);
+                .setOngoing(false)
+                .setProgress(0, 0, false);
             boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED ||
                                                 // (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
                                                   (downloadResult.isIdPRedirection()

+ 4 - 1
src/com/owncloud/android/files/services/FileUploader.java

@@ -731,7 +731,10 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
         } else if (uploadResult.isSuccess()) {
             // / success -> silent update of progress notification to success
             // message
-            mNotificationBuilder.setOngoing(false).setAutoCancel(true);
+            mNotificationBuilder
+                .setOngoing(false)
+                .setAutoCancel(true)
+                .setProgress(0, 0, false);
             
             /// includes a pending intent in the notification showing the details view of the file
             Intent showDetailsIntent = null;