Showing the changes to interface/src/Application.cpp (1 of 48 files). Show all
Unified · Split
| @@ -853,7 +853,11 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 852 unmodified lines | ||
| 853 | 853 | DependencyManager::set<Cursor::Manager>(); |
| 854 | 854 | DependencyManager::set<VirtualPad::Manager>(); |
| 855 | 855 | DependencyManager::set<DesktopPreviewProvider>(); |
| 856 | +#if defined(Q_OS_ANDROID) | |
| 857 | + DependencyManager::set<AccountManager>(); // use the default user agent getter | |
| 858 | +#else | |
| 856 | 859 | DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp)); |
| 860 | +#endif | |
| 857 | 861 | DependencyManager::set<StatTracker>(); |
| 858 | 862 | DependencyManager::set<ScriptEngines>(ScriptEngine::CLIENT_SCRIPT); |
| 859 | 863 | DependencyManager::set<ScriptInitializerMixin, NativeScriptInitializers>(); |
| @@ -2254,6 +2258,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1394 unmodified lines | ||
| 2254 | 2258 | _pendingRenderEvent = false; |
| 2255 | 2259 | |
| 2256 | 2260 | qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID()); |
| 2261 | + | |
| 2262 | +#if defined(Q_OS_ANDROID) | |
| 2263 | + AndroidHelper::instance().init(); | |
| 2264 | + AndroidHelper::instance().notifyLoadComplete(); | |
| 2265 | +#endif | |
| 2257 | 2266 | } |
| 2258 | 2267 | |
| 2259 | 2268 | void Application::updateVerboseLogging() { |
| @@ -8247,17 +8256,17 @@ void Application::openAndroidActivity(const QString& activityName) { · 5987 unmodified lines | ||
| 8247 | 8256 | void Application::enterBackground() { |
| 8248 | 8257 | QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), |
| 8249 | 8258 | "stop", Qt::BlockingQueuedConnection); |
| 8250 | − //GC: commenting it out until we fix it | |
| 8251 | − //getActiveDisplayPlugin()->deactivate(); | |
| 8259 | + if (getActiveDisplayPlugin()->isActive()) { | |
| 8260 | + getActiveDisplayPlugin()->deactivate(); | |
| 8261 | + } | |
| 8252 | 8262 | } |
| 8263 | + | |
| 8253 | 8264 | void Application::enterForeground() { |
| 8254 | 8265 | QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), |
| 8255 | 8266 | "start", Qt::BlockingQueuedConnection); |
| 8256 | − //GC: commenting it out until we fix it | |
| 8257 | − /*if (!getActiveDisplayPlugin() || !getActiveDisplayPlugin()->activate()) { | |
| 8267 | + if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) { | |
| 8258 | 8268 | qWarning() << "Could not re-activate display plugin"; |
| 8259 | − }*/ | |
| 8260 | − | |
| 8269 | + } | |
| 8261 | 8270 | } |
| 8262 | 8271 | #endif |
| 8263 | 8272 | |