Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -212,6 +212,8 @@ · 211 unmodified lines | ||
| 212 | 212 | #if defined(Q_OS_ANDROID) |
| 213 | 213 | #include <QtAndroidExtras/QAndroidJniObject> |
| 214 | 214 | #include <android/log.h> |
| 215 | +#include <android/asset_manager.h> | |
| 216 | +#include <android/asset_manager_jni.h> | |
| 215 | 217 | #endif |
| 216 | 218 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU |
| 217 | 219 | // FIXME seems to be broken. |
| @@ -238,6 +240,7 @@ extern "C" { · 20 unmodified lines | ||
| 238 | 240 | extern "C" { |
| 239 | 241 | |
| 240 | 242 | JNIEXPORT void Java_io_highfidelity_hifiinterface_InterfaceActivity_nativeOnCreate(JNIEnv* env, jobject obj, jobject instance, jobject asset_mgr) { |
| 243 | + storage::FileStorage::setAssetManager(AAssetManager_fromJava(env, asset_mgr)); | |
| 241 | 244 | qDebug() << "nativeOnCreate On thread " << QThread::currentThreadId(); |
| 242 | 245 | } |
| 243 | 246 | |
| @@ -332,7 +335,11 @@ static QTimer identityPacketTimer; · 88 unmodified lines | ||
| 332 | 335 | static QTimer pingTimer; |
| 333 | 336 | |
| 334 | 337 | static const QString DISABLE_WATCHDOG_FLAG("HIFI_DISABLE_WATCHDOG"); |
| 338 | +#if defined(Q_OS_ANDROID) | |
| 339 | +static bool DISABLE_WATCHDOG = true; | |
| 340 | +#else | |
| 335 | 341 | static bool DISABLE_WATCHDOG = QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG); |
| 342 | +#endif | |
| 336 | 343 | |
| 337 | 344 | |
| 338 | 345 | static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16; |
| @@ -1777,7 +1784,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1438 unmodified lines | ||
| 1777 | 1784 | static int lastCountOfNearbyAvatars = -1; |
| 1778 | 1785 | QTimer* checkNearbyAvatarsTimer = new QTimer(this); |
| 1779 | 1786 | checkNearbyAvatarsTimer->setInterval(CHECK_NEARBY_AVATARS_INTERVAL_MS); // 10 seconds, Qt::CoarseTimer ok |
| 1780 | − connect(checkNearbyAvatarsTimer, &QTimer::timeout, this, [this]() { | |
| 1787 | + connect(checkNearbyAvatarsTimer, &QTimer::timeout, this, []() { | |
| 1781 | 1788 | auto avatarManager = DependencyManager::get<AvatarManager>(); |
| 1782 | 1789 | int nearbyAvatars = avatarManager->numberOfAvatarsInRange(avatarManager->getMyAvatar()->getWorldPosition(), |
| 1783 | 1790 | NEARBY_AVATAR_RADIUS_METERS) - 1; |