| Index: mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/AndroidHandler.java
|
| diff --git a/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/AndroidHandler.java b/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/AndroidHandler.java
|
| index 5f15c708f371fec8afce7eaf9eaa887884f6e9af..0f0045bdaef5b455bba0ab9020243c8b68aec876 100644
|
| --- a/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/AndroidHandler.java
|
| +++ b/mojo/shell/android/apk/src/org/chromium/mojo_shell_apk/AndroidHandler.java
|
| @@ -65,9 +65,17 @@ public class AndroidHandler {
|
|
|
| /**
|
| * Extracts and runs the application libraries contained by the indicated archive.
|
| + * @param context the application context
|
| + * @param archivePath the path of the archive containing the application to be run
|
| + * @param handle handle to the shell to be passed to the native application. On the Java side
|
| + * this is opaque payload.
|
| + * @param runApplicationPtr pointer to the function that will set the native thunks and call
|
| + * into the application MojoMain. On the Java side this is opaque
|
| + * payload.
|
| */
|
| @CalledByNative
|
| - private static boolean bootstrap(Context context, String archivePath, int handle) {
|
| + private static boolean bootstrap(Context context, String archivePath, int handle,
|
| + long runApplicationPtr) {
|
| File bootstrap_java_library;
|
| File bootstrap_native_library;
|
| try {
|
| @@ -103,9 +111,10 @@ public class AndroidHandler {
|
| Class<?> loadedClass = bootstrapLoader.loadClass(BOOTSTRAP_CLASS);
|
| Class<? extends Runnable> bootstrapClass = loadedClass.asSubclass(Runnable.class);
|
| Constructor<? extends Runnable> constructor = bootstrapClass.getConstructor(
|
| - Context.class, File.class, File.class, Integer.class);
|
| + Context.class, File.class, File.class, Integer.class, Long.class);
|
| Runnable bootstrapRunnable = constructor.newInstance(context, bootstrap_native_library,
|
| - application_native_library, Integer.valueOf(handle));
|
| + application_native_library, Integer.valueOf(handle),
|
| + Long.valueOf(runApplicationPtr));
|
| bootstrapRunnable.run();
|
| } catch (Throwable t) {
|
| Log.e(TAG, "Running Bootstrap failed: " + t);
|
|
|