ankidroid/Anki-Android — pull request #76 by hssm (2013-07-07 08:03:53+00:00)
Title: Issue 1501: Close media database after importing.

[Issue 1501](https://code.google.com/p/ankidroid/issues/detail?id=1501) again. It was going to haunt me until I figured it out.

```mSrc``` is the collection we are importing. Notice, however, that the collection itself isn't closed in the normal way. We're directly closing its database. This, however, means that the media database in the collection is still left open.

To be honest, I don't understand why we aren't closing it with Collection.close. Why do we need to need to keep the "count" (which is actually in AnkiDatabaseManager, contrary to the comment) of this database? Haven't we finished using it? I'm not sure what the implications of changing this are, so I've left it as-in and just closed the media database as well later down when we've finished importing media.