Add user agent in android project
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / RemoveFileOperation.java
index 6bd4e8a..c77fcd3 100644 (file)
@@ -1,5 +1,9 @@
-/* ownCloud Android client application
- *   Copyright (C) 2012-2014 ownCloud Inc.
+/**
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   @author masensio
+ *   Copyright (C) 2015 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -17,6 +21,7 @@
 
 package com.owncloud.android.operations;
 
+import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@@ -27,9 +32,6 @@ import com.owncloud.android.operations.common.SyncOperation;
 
 /**
  * Remote operation performing the removal of a remote file or folder in the ownCloud server.
- * 
- * @author David A. Velasco
- * @author masensio
  */
 public class RemoveFileOperation extends SyncOperation {
     
@@ -77,7 +79,7 @@ public class RemoveFileOperation extends SyncOperation {
         boolean localRemovalFailed = false;
         if (!mOnlyLocalCopy) {
             RemoveRemoteFileOperation operation = new RemoveRemoteFileOperation(mRemotePath);
-            result = operation.execute(client);
+            result = operation.execute(client, MainApp.getUserAgent());
             if (result.isSuccess() || result.getCode() == ResultCode.FILE_NOT_FOUND) {
                 localRemovalFailed = !(getStorageManager().removeFile(mFileToRemove, true, true));
             }