Merge remote-tracking branch 'origin/refactor_remote_operation_to_read_file' into...
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileUploader.java
index 5f1bd3d..0044194 100644 (file)
@@ -57,6 +57,7 @@ import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.ui.activity.InstantUploadActivity;
 import com.owncloud.android.ui.preview.PreviewImageActivity;
 import com.owncloud.android.ui.preview.PreviewImageFragment;
+import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.Log_OC;
 
 import android.accounts.Account;
@@ -266,13 +267,6 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
                 uploadKey = buildRemoteName(account, files[i].getRemotePath());
                 newUpload = new UploadFileOperation(account, files[i], chunked, isInstant, forceOverwrite, localAction, 
                         getApplicationContext());
-//                if (chunked) {
-//                    newUpload = new ChunkedUploadFileOperation(account, files[i], isInstant, forceOverwrite,
-//                            localAction, getApplicationContext());
-//                } else {
-//                    newUpload = new UploadFileOperation(account, files[i], isInstant, forceOverwrite, localAction, 
-//                            getApplicationContext());
-//                }
                 if (isInstant) {
                     newUpload.setRemoteFolderToBeCreated();
                 }
@@ -716,7 +710,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
     private void notifyUploadStart(UploadFileOperation upload) {
         // / create status notification with a progress bar
         mLastPercent = 0;
-        mNotification = new Notification(R.drawable.icon, getString(R.string.uploader_upload_in_progress_ticker),
+        mNotification = new Notification(DisplayUtils.getSeasonalIconId(), getString(R.string.uploader_upload_in_progress_ticker),
                 System.currentTimeMillis());
         mNotification.flags |= Notification.FLAG_ONGOING_EVENT;
         mDefaultNotificationContentView = mNotification.contentView;
@@ -725,7 +719,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
         mNotification.contentView.setProgressBar(R.id.status_progress, 100, 0, false);
         mNotification.contentView.setTextViewText(R.id.status_text,
                 String.format(getString(R.string.uploader_upload_in_progress_content), 0, upload.getFileName()));
-        mNotification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
+        mNotification.contentView.setImageViewResource(R.id.status_icon, DisplayUtils.getSeasonalIconId());
         
         /// includes a pending intent in the notification showing the details view of the file
         Intent showDetailsIntent = new Intent(this, FileDisplayActivity.class);
@@ -812,7 +806,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
 
             // / fail -> explicit failure notification
             mNotificationManager.cancel(R.string.uploader_upload_in_progress_ticker);
-            Notification finalNotification = new Notification(R.drawable.icon,
+            Notification finalNotification = new Notification(DisplayUtils.getSeasonalIconId(),
                     getString(R.string.uploader_upload_failed_ticker), System.currentTimeMillis());
             finalNotification.flags |= Notification.FLAG_AUTO_CANCEL;
             String content = null;