Move some native codes to there

This commit is contained in:
khanhduytran0
2020-09-04 15:27:56 +07:00
parent 97893a2222
commit 2f0f4f8ee6
13 changed files with 568 additions and 15 deletions

View File

@@ -28,7 +28,7 @@ public class InstallModActivity extends AppCompatActivity
Surface surface = new Surface(tex);
Field field = surface.getClass().getDeclaredField("mNativeObject");
field.setAccessible(true);
BinaryExecutor.setupBridgeSurfaceAWT((long) field.get(surface));
JREUtils.setupBridgeSurfaceAWT((long) field.get(surface));
} catch (Throwable th) {
Tools.showError(InstallModActivity.this, th, true);
}
@@ -97,12 +97,12 @@ public class InstallModActivity extends AppCompatActivity
System.out.println(Arrays.toString(javaArgList.toArray(new String[0])));
BinaryExecutor.setJavaEnvironment(this);
JREUtils.setJavaEnvironment(this);
BinaryExecutor.redirectStdio();
BinaryExecutor.setJavaEnvironment(this);
BinaryExecutor.initJavaRuntime();
BinaryExecutor.chdir(Tools.MAIN_PATH);
JREUtils.redirectStdio();
JREUtils.setJavaEnvironment(this);
JREUtils.initJavaRuntime();
JREUtils.chdir(Tools.MAIN_PATH);
VMLauncher.launchJVM(javaArgList.toArray(new String[0]));
} catch (Throwable th) {