X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/83ad608faadfcfc5a0ceee9d6c460702b3ff3f11..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 66c2d437..1343a8c1 100644 --- a/src/com/owncloud/android/files/services/IndexedForest.java +++ b/src/com/owncloud/android/files/services/IndexedForest.java @@ -213,17 +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)) { - accountMap.putIfAbsent(key, mMap.get(key)); + mMap.remove(key); } } - return accountMap; } /**