OSDN Git Service

Always have determinate progress in import notification
authorBobby Georgescu <georgescu@google.com>
Wed, 16 Jan 2013 22:15:49 +0000 (14:15 -0800)
committerBobby Georgescu <georgescu@google.com>
Wed, 16 Jan 2013 22:15:49 +0000 (14:15 -0800)
Bug: 7967520
Change-Id: Iaeb5f2e3d508d964856faaea63475cbc25e13c0d

src/com/android/gallery3d/ingest/IngestService.java

index 2ca4d4c..12b056b 100644 (file)
@@ -188,12 +188,11 @@ public class IngestService extends Service implements ImportTask.Listener,
         }
         if (mClientActivity != null) {
             mClientActivity.onImportProgress(visitedCount, totalCount, pathIfSuccessful);
-        } else {
-            mNotificationBuilder.setProgress(totalCount, visitedCount, false)
-                .setContentText(getResources().getText(R.string.ingest_importing));
-            mNotificationManager.notify(NotificationIds.INGEST_NOTIFICATION_IMPORTING,
-                    mNotificationBuilder.build());
         }
+        mNotificationBuilder.setProgress(totalCount, visitedCount, false)
+            .setContentText(getResources().getText(R.string.ingest_importing));
+        mNotificationManager.notify(NotificationIds.INGEST_NOTIFICATION_IMPORTING,
+                mNotificationBuilder.build());
     }
 
     @Override