I don't understand this part. Why should the DB be closed/reopened specifically if the db is on sdcard and the cache directory is succesfully moved? Is that necessary? Is that needed when the db is not on sdcard? Is that needed when we reset the cache directory to its default value as well?

Also, if `setOfflineCacheDirectory` fails and returns `false`, it looks like the user will not be made aware of it, and there will also be nothing in the log about it.