diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 132f68f0a2..b995b6ffa8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2409,7 +2409,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID()); -#if defined(Q_OS_ANDROID) +#if defined(Q_OS_ANDROID) && connect(&AndroidHelper::instance(), &AndroidHelper::beforeEnterBackground, this, &Application::beforeEnterBackground); connect(&AndroidHelper::instance(), &AndroidHelper::enterBackground, this, &Application::enterBackground); connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground); @@ -9140,17 +9140,23 @@ void Application::beforeEnterBackground() { void Application::enterBackground() { QMetaObject::invokeMethod(DependencyManager::get().data(), "stop", Qt::BlockingQueuedConnection); -// if (getActiveDisplayPlugin()->isActive()) { -// getActiveDisplayPlugin()->deactivate(); -// } +// Quest only supports one plugin which can't be deactivated currently +#if !defined(ANDROID_APP_QUEST_INTERFACE) + if (getActiveDisplayPlugin()->isActive()) { + getActiveDisplayPlugin()->deactivate(); + } +#endif } void Application::enterForeground() { QMetaObject::invokeMethod(DependencyManager::get().data(), "start", Qt::BlockingQueuedConnection); -// if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) { -// qWarning() << "Could not re-activate display plugin"; -// } +// Quest only supports one plugin which can't be deactivated currently +#if !defined(ANDROID_APP_QUEST_INTERFACE) + if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) { + qWarning() << "Could not re-activate display plugin"; + } +#endif auto nodeList = DependencyManager::get(); nodeList->setSendDomainServerCheckInEnabled(true); }