+ \r
+ /**\r
+ * Static map with the files being download and the path to the temporal file were are download\r
+ */\r
+ private static Map<String, String> mDownloadsInProgress = Collections.synchronizedMap(new HashMap<String, String>());\r
+ \r
+ /**\r
+ * Returns True when the file referred by 'remotePath' in the ownCloud account 'account' is downloading\r
+ */\r
+ public static boolean isDownloading(Account account, String remotePath) {\r
+ return (mDownloadsInProgress.get(buildRemoteName(account.name, remotePath)) != null);\r
+ }\r
+ \r
+ /**\r
+ * Builds a key for mDownloadsInProgress from the accountName and remotePath\r
+ */\r
+ private static String buildRemoteName(String accountName, String remotePath) {\r
+ return accountName + remotePath;\r
+ }\r