+
+ /**
+ * Cancels a pending or current upload for an account
+ *
+ * @param account Owncloud accountName where the remote file will be stored.
+ */
+ public void cancel(Account account) {
+ Log_OC.d(TAG, "Account= " + account.name);
+
+ if (mCurrentDownload != null) {
+ Log_OC.d(TAG, "Current Download Account= " + mCurrentDownload.getAccount().name);
+ if (mCurrentDownload.getAccount().name.equals(account.name)) {
+ mCurrentDownload.cancel();
+ }
+ }
+ // Cancel pending downloads
+ cancelDownloadsForAccount(account);
+ }
+