Trying To Initialize the native core

Signed-off-by: Priyank Shankar <shankarpriyank312002@gmail.com>
This commit is contained in:
Priyank Shankar 2022-06-23 21:19:13 +05:30
parent 48547ae2f8
commit 66415d41d9
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ public class HelloWorldScreen extends Screen implements SurfaceCallback
int w = surfaceContainer.getWidth();
Canvas canvas = null;
if (surfaceContainer.getSurface() != null)
if (surfaceContainer.getSurface() != null && MapFragment.nativeIsEngineCreated())
{
canvas = surfaceContainer.getSurface()
.lockCanvas(new Rect(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE));

View file

@ -392,7 +392,7 @@ public class MapFragment extends BaseMwmFragment
static native void nativeScalePlus();
static native void nativeScaleMinus();
public static native boolean nativeShowMapForUrl(String url);
static native boolean nativeIsEngineCreated();
public static native boolean nativeIsEngineCreated();
static native boolean nativeDestroySurfaceOnDetach();
public static native boolean nativeCreateEngine(Surface surface, int density,
boolean firstLaunch,