Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java

Issue 1407233017: Define a Java-side global application context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
diff --git a/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java b/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
index 942c19c4b4dbd4c5e9fd70d4d984cdb5acfe6c8f..70a6c40e37e5de7e779b0c2b03fa5bc21dc8f56a 100644
--- a/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
+++ b/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
@@ -11,6 +11,7 @@ import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
+import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -63,6 +64,8 @@ public class ShellMain {
parametersList.addAll(Arrays.asList(parameters));
}
+ ContextUtils.initApplicationContext(applicationContext);
+ // THIS IS SKETCHY: nativeInit treats applicationContext as an Activity!
Torne 2015/11/06 16:43:19 Mojo folks: The variable on this side is called "a
qsr 2015/11/13 14:36:06 Yes, this code is wrong. This code has been forked
nativeInit(applicationContext, mojoShell.getAbsolutePath(),
parametersList.toArray(new String[parametersList.size()]),
cachedAppsDir.getAbsolutePath(),

Powered by Google App Engine
This is Rietveld 408576698