Allow threaded system initialization

This commit is contained in:
Emux 2019-09-28 22:35:28 +03:00
parent 7ad3f4a0b1
commit 0c1c06c1bb
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3
3 changed files with 16 additions and 1 deletions

View File

@ -3,6 +3,8 @@
## New since 0.12.0
- Render themes: symbols on lines with billboard, rotate [#743](https://github.com/mapsforge/vtm/pull/743)
- Threaded system initialization (Android)
- `Parameters.THREADED_INIT`
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.13.0)

View File

@ -70,7 +70,15 @@ public class MapView extends GLSurfaceView {
public static double targetGLESVersion = 3.0;
private static void init() {
System.loadLibrary("vtm-jni");
if (Parameters.THREADED_INIT)
new Thread(new Runnable() {
@Override
public void run() {
System.loadLibrary("vtm-jni");
}
}).start();
else
System.loadLibrary("vtm-jni");
}
protected AndroidMap mMap;

View File

@ -67,6 +67,11 @@ public final class Parameters {
*/
public static boolean TEXTURE_ATLAS = false;
/**
* Threaded system initialization.
*/
public static boolean THREADED_INIT = false;
private Parameters() {
throw new IllegalStateException();
}