Prechádzať zdrojové kódy

remove EXTRA_FILE_PATH

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 rokov pred
rodič
commit
659dabb672

+ 0 - 3
src/main/java/com/owncloud/android/files/services/FileDownloader.java

@@ -87,7 +87,6 @@ public class FileDownloader extends Service
     private static final String DOWNLOAD_ADDED_MESSAGE = "DOWNLOAD_ADDED";
     private static final String DOWNLOAD_FINISH_MESSAGE = "DOWNLOAD_FINISH";
     public static final String EXTRA_DOWNLOAD_RESULT = "RESULT";
-    public static final String EXTRA_FILE_PATH = "FILE_PATH";
     public static final String EXTRA_REMOTE_PATH = "REMOTE_PATH";
     public static final String EXTRA_LINKED_TO_PATH = "LINKED_TO";
     public static final String EXTRA_CONFLICT_UPLOAD = "CONFLICT_UPLOAD";
@@ -691,7 +690,6 @@ public class FileDownloader extends Service
         end.putExtra(EXTRA_DOWNLOAD_RESULT, downloadResult.isSuccess());
         end.putExtra(ACCOUNT_NAME, download.getAccount().name);
         end.putExtra(EXTRA_REMOTE_PATH, download.getRemotePath());
-        end.putExtra(EXTRA_FILE_PATH, download.getSavePath());
         end.putExtra(OCFileListFragment.DOWNLOAD_BEHAVIOUR, download.getBehaviour());
         end.putExtra(SendShareDialog.ACTIVITY_NAME, download.getActivityName());
         end.putExtra(SendShareDialog.PACKAGE_NAME, download.getPackageName());
@@ -714,7 +712,6 @@ public class FileDownloader extends Service
         Intent added = new Intent(getDownloadAddedMessage());
         added.putExtra(ACCOUNT_NAME, download.getAccount().name);
         added.putExtra(EXTRA_REMOTE_PATH, download.getRemotePath());
-        added.putExtra(EXTRA_FILE_PATH, download.getSavePath());
         added.putExtra(EXTRA_LINKED_TO_PATH, linkedToRemotePath);
         added.setPackage(getPackageName());
         sendStickyBroadcast(added);

+ 1 - 6
src/main/java/com/owncloud/android/services/SyncFolderHandler.java

@@ -37,7 +37,6 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.operations.SynchronizeFolderOperation;
-import com.owncloud.android.utils.FileStorageUtils;
 
 import java.io.IOException;
 
@@ -123,7 +122,7 @@ class SyncFolderHandler extends Handler {
             } catch (AccountsException | IOException e) {
                 sendBroadcastFinishedSyncFolder(account, remotePath, false);
                 mService.dispatchResultToOperationListeners(mCurrentSyncOperation, new RemoteOperationResult(e));
-                
+
                 Log_OC.e(TAG, "Error while trying to get authorization", e);
             } finally {
                 mPendingOperations.removePayload(account.name, remotePath);
@@ -176,8 +175,6 @@ class SyncFolderHandler extends Handler {
         Intent added = new Intent(FileDownloader.getDownloadAddedMessage());
         added.putExtra(FileDownloader.ACCOUNT_NAME, account.name);
         added.putExtra(FileDownloader.EXTRA_REMOTE_PATH, remotePath);
-        added.putExtra(FileDownloader.EXTRA_FILE_PATH, FileStorageUtils.getSavePath(account.name)
-                + remotePath);
         added.setPackage(mService.getPackageName());
         mService.sendStickyBroadcast(added);
     }
@@ -191,8 +188,6 @@ class SyncFolderHandler extends Handler {
         Intent finished = new Intent(FileDownloader.getDownloadFinishMessage());
         finished.putExtra(FileDownloader.ACCOUNT_NAME, account.name);
         finished.putExtra(FileDownloader.EXTRA_REMOTE_PATH, remotePath);
-        finished.putExtra(FileDownloader.EXTRA_FILE_PATH,
-                FileStorageUtils.getSavePath(account.name) + remotePath);
         finished.putExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, success);
         finished.setPackage(mService.getPackageName());
         mService.sendStickyBroadcast(finished);