| Index: remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java
|
| diff --git a/remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java b/remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java
|
| index a85adcd487f2ee243ed0cc2613d340f12217eecc..f8f7fb96e043fcf6072cb1b1f1a3feb4e954ddda 100644
|
| --- a/remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java
|
| +++ b/remoting/android/host/src/org/chromium/chromoting/host/jni/Host.java
|
| @@ -18,16 +18,14 @@ public class Host {
|
| // Pointer to the C++ object, cast to a |long|.
|
| private long mNativeJniHost;
|
|
|
| - private static boolean sLoaded;
|
| -
|
| - // Called once from the main Activity. Loads and initializes the native
|
| - // code.
|
| + /**
|
| + * To be called once from the Application context singleton. Loads and initializes the native
|
| + * code. Called on the UI thread.
|
| + * @param context The Application context.
|
| + */
|
| public static void loadLibrary(Context context) {
|
| - if (sLoaded) return;
|
| -
|
| System.loadLibrary("remoting_host_jni");
|
| - ContextUtils.initApplicationContext(context.getApplicationContext());
|
| - sLoaded = true;
|
| + ContextUtils.initApplicationContext(context);
|
| }
|
|
|
| public Host() {
|
|
|