+
+
+ /**
+ * TODO review this method when "folder synchronization" replaces "folder download"; this is a fast and ugly
+ * patch.
+ */
+ private void sendBroadcastNewSyncFolder(Account account, String remotePath) {
+ 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);
+ mService.sendStickyBroadcast(added);
+ }
+
+ /**
+ * TODO review this method when "folder synchronization" replaces "folder download"; this is a fast and ugly
+ * patch.
+ */
+ private void sendBroadcastFinishedSyncFolder(Account account, String remotePath, boolean success) {
+ 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);
+ mService.sendStickyBroadcast(finished);
+ }
+
+