From 893dcd95465a1b992f646e196666f519a30820df Mon Sep 17 00:00:00 2001 From: Holden Date: Mon, 13 May 2024 18:59:30 -0400 Subject: [PATCH] Android: Fix Checking Storage Permissions --- android/src/AndroidInit.cpp | 2 -- src/main.cc | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/android/src/AndroidInit.cpp b/android/src/AndroidInit.cpp index 69a9f978af1..85ce40bc294 100644 --- a/android/src/AndroidInit.cpp +++ b/android/src/AndroidInit.cpp @@ -141,8 +141,6 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) JoystickAndroid::setNativeMethods(); - AndroidInterface::checkStoragePermissions(); - QNativeInterface::QAndroidApplication::hideSplashScreen(333); return JNI_VERSION_1_6; diff --git a/src/main.cc b/src/main.cc index f094ce06c8b..36d74662037 100644 --- a/src/main.cc +++ b/src/main.cc @@ -21,6 +21,10 @@ #include "RunGuard.h" #endif +#ifdef Q_OS_ANDROID + #include "AndroidInterface.h" +#endif + #ifdef QT_DEBUG #include "CmdLineOptParser.h" @@ -208,6 +212,10 @@ int main(int argc, char *argv[]) } else #endif { + #ifdef Q_OS_ANDROID + AndroidInterface::checkStoragePermissions(); + #endif + exitCode = app.exec(); }