X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/20583912301fc6b0ec069ebfeeba50d52d435183..0f7ea542c9b657ba6ad335cd5003901b6ab35385:/src/com/owncloud/android/files/services/IndexedForest.java diff --git a/src/com/owncloud/android/files/services/IndexedForest.java b/src/com/owncloud/android/files/services/IndexedForest.java index f3c38fdd..1343a8c1 100644 --- a/src/com/owncloud/android/files/services/IndexedForest.java +++ b/src/com/owncloud/android/files/services/IndexedForest.java @@ -213,19 +213,19 @@ public class IndexedForest { } - public ConcurrentMap> get(Account account){ - ConcurrentMap> accountMap = new ConcurrentHashMap>(); + /** + * Remove the elements that contains account as a part of its key + * @param account + */ + public void remove(Account account){ Iterator it = mMap.keySet().iterator(); while (it.hasNext()) { String key = it.next(); Log_OC.d("IndexedForest", "Number of pending downloads= " + mMap.size()); if (key.startsWith(account.name)) { - synchronized (accountMap) { - accountMap.putIfAbsent(key, mMap.get(key)); - } + mMap.remove(key); } } - return accountMap; } /**