| Index: mojo/shell/android/mojo_main.cc
|
| diff --git a/mojo/shell/android/mojo_main.cc b/mojo/shell/android/mojo_main.cc
|
| index a8afd89f6c19725d4671b79c7b20fd4f1464a877..0c7f84c275a116b963277ed29247fe3889014175 100644
|
| --- a/mojo/shell/android/mojo_main.cc
|
| +++ b/mojo/shell/android/mojo_main.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/android/command_line_android.h"
|
| #include "base/android/java_handler_thread.h"
|
| +#include "base/android/jni_android.h"
|
| #include "base/android/jni_string.h"
|
| #include "base/at_exit.h"
|
| #include "base/bind.h"
|
| @@ -51,9 +52,9 @@ void RunShell(std::vector<GURL> app_urls) {
|
| static void Init(JNIEnv* env,
|
| jclass clazz,
|
| jobject context,
|
| - jobjectArray jparameters) {
|
| + jobjectArray jparameters,
|
| + jstring j_local_apps_directory) {
|
| base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
|
| -
|
| base::android::InitApplicationContext(env, scoped_context);
|
|
|
| base::android::InitNativeCommandLineFromJavaArray(env, jparameters);
|
| @@ -63,7 +64,10 @@ static void Init(JNIEnv* env,
|
| // LazyInstances is akin to stack-allocating objects; their destructors
|
| // will be invoked first-in-last-out.
|
| shell::Context* shell_context = new shell::Context();
|
| + shell_context->mojo_url_resolver()->SetLocalAppsPath(base::FilePath(
|
| + base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)));
|
| g_context.Get().reset(shell_context);
|
| +
|
| g_java_message_loop.Get().reset(new base::MessageLoopForUI);
|
| base::MessageLoopForUI::current()->Start();
|
|
|
|
|