aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Configured.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/Configured.cxx')
-rw-r--r--src/db/Configured.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/db/Configured.cxx b/src/db/Configured.cxx
index 78be3e999..625300d75 100644
--- a/src/db/Configured.cxx
+++ b/src/db/Configured.cxx
@@ -23,16 +23,11 @@
#include "config/ConfigGlobal.hxx"
#include "config/ConfigData.hxx"
#include "config/ConfigError.hxx"
+#include "fs/AllocatedPath.hxx"
+#include "fs/StandardDirectory.hxx"
#include "util/Error.hxx"
#include "Log.hxx"
-#ifdef ANDROID
-#include "Main.hxx"
-#include "android/Context.hxx"
-#include "fs/AllocatedPath.hxx"
-#include "plugins/simple/SimpleDatabasePlugin.hxx"
-#endif
-
Database *
CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
Error &error)
@@ -57,12 +52,9 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
}
if (param == nullptr) {
-#ifdef ANDROID
- /* if there is no override, use the Android cache
- directory */
+ /* if there is no override, use the cache directory */
- const AllocatedPath cache_dir =
- context->GetCacheDir(Java::GetEnv());
+ const AllocatedPath cache_dir = GetUserCacheDir();
if (cache_dir.IsNull())
return nullptr;
@@ -71,9 +63,6 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
allocated = new config_param("database");
allocated->AddBlockParam("path", db_file.c_str(), -1);
param = allocated;
-#else
- return nullptr;
-#endif
}
Database *db = DatabaseGlobalInit(loop, listener, *param,