X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/6fee98e6a4dc85b836f185cecf2b41637469e453..9093ef8f9fc64c290d0fed5f66106fa6a20330df:/src/com/owncloud/android/operations/SynchronizeFolderOperation.java diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 420adcab..61375c43 100644 --- a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -159,9 +159,6 @@ public class SynchronizeFolderOperation extends SyncOperation { syncContents(client); } - if (mFilesForDirectDownload.isEmpty()) { - sendBroadcastForNotifyingUIUpdate(result.isSuccess()); - } } if (mCancellationRequested.get()) { @@ -170,16 +167,6 @@ public class SynchronizeFolderOperation extends SyncOperation { } catch (OperationCancelledException e) { result = new RemoteOperationResult(e); - - // Needed in case that cancellation occurs before starting any download. - // If not, yellow arrow continues being shown. - sendBroadcastForNotifyingUIUpdate(false); - - Intent intent = new Intent(mContext, FileDownloader.class); - intent.setAction(FileDownloader.ACTION_CANCEL_FILE_DOWNLOAD); - intent.putExtra(FileDownloader.EXTRA_ACCOUNT, mAccount); - intent.putExtra(FileDownloader.EXTRA_FILE, mLocalFolder); - mContext.startService(intent); } return result; @@ -224,7 +211,6 @@ public class SynchronizeFolderOperation extends SyncOperation { result.getLogMessage()); } - sendBroadcastForNotifyingUIUpdate(result.isSuccess()); } return result; @@ -511,16 +497,6 @@ public class SynchronizeFolderOperation extends SyncOperation { } } - private void sendBroadcastForNotifyingUIUpdate(boolean result) { - // Send a broadcast message for notifying UI update - Intent uiUpdate = new Intent(FileDownloader.getDownloadFinishMessage()); - uiUpdate.putExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, result); - uiUpdate.putExtra(FileDownloader.ACCOUNT_NAME, mAccount.name); - uiUpdate.putExtra(FileDownloader.EXTRA_REMOTE_PATH, mRemotePath); - uiUpdate.putExtra(FileDownloader.EXTRA_FILE_PATH, mLocalFolder.getRemotePath()); - mContext.sendStickyBroadcast(uiUpdate); - } - /** * Cancel operation