Showing the changes to interface/src/AndroidHelper.cpp (1 of 4 files). Show all
Unified · Split
| @@ -10,31 +10,11 @@ · 9 unmodified lines | ||
| 10 | 10 | // |
| 11 | 11 | #include "AndroidHelper.h" |
| 12 | 12 | #include <QDebug> |
| 13 | −#include <AccountManager.h> | |
| 14 | 13 | |
| 15 | 14 | AndroidHelper::AndroidHelper() { |
| 16 | 15 | } |
| 17 | 16 | |
| 18 | 17 | AndroidHelper::~AndroidHelper() { |
| 19 | − workerThread.quit(); | |
| 20 | − workerThread.wait(); | |
| 21 | −} | |
| 22 | − | |
| 23 | −void AndroidHelper::init() { | |
| 24 | − workerThread.start(); | |
| 25 | − _accountManager = QSharedPointer<AccountManager>(new AccountManager, &QObject::deleteLater); | |
| 26 | − _accountManager->setIsAgent(true); | |
| 27 | − _accountManager->setAuthURL(NetworkingConstants::METAVERSE_SERVER_URL()); | |
| 28 | − _accountManager->setSessionID(DependencyManager::get<AccountManager>()->getSessionID()); | |
| 29 | − connect(_accountManager.data(), &AccountManager::loginComplete, [](const QUrl& authURL) { | |
| 30 | − DependencyManager::get<AccountManager>()->setAccountInfo(AndroidHelper::instance().getAccountManager()->getAccountInfo()); | |
| 31 | − DependencyManager::get<AccountManager>()->setAuthURL(authURL); | |
| 32 | − }); | |
| 33 | − | |
| 34 | − connect(_accountManager.data(), &AccountManager::logoutComplete, [] () { | |
| 35 | − DependencyManager::get<AccountManager>()->logout(); | |
| 36 | − }); | |
| 37 | − _accountManager->moveToThread(&workerThread); | |
| 38 | 18 | } |
| 39 | 19 | |
| 40 | 20 | void AndroidHelper::requestActivity(const QString &activityName, const bool backToScene) { |