Bug 730890 - Set up an Android Looper on the main Gecko thread r=cjones
This commit is contained in:
@@ -191,6 +191,7 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jDisableScreenOrientationNotifications = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "disableScreenOrientationNotifications", "()V");
|
||||
jLockScreenOrientation = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "lockScreenOrientation", "(I)V");
|
||||
jUnlockScreenOrientation = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "unlockScreenOrientation", "()V");
|
||||
jPumpMessageLoop = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "pumpMessageLoop", "()V");
|
||||
|
||||
jEGLContextClass = (jclass) jEnv->NewGlobalRef(jEnv->FindClass("javax/microedition/khronos/egl/EGLContext"));
|
||||
jEGL10Class = (jclass) jEnv->NewGlobalRef(jEnv->FindClass("javax/microedition/khronos/egl/EGL10"));
|
||||
@@ -2130,6 +2131,15 @@ AndroidBridge::UnlockScreenOrientation()
|
||||
mJNIEnv->CallStaticVoidMethod(mGeckoAppShellClass, jUnlockScreenOrientation);
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::PumpMessageLoop()
|
||||
{
|
||||
if (!mJNIEnv)
|
||||
return;
|
||||
|
||||
mJNIEnv->CallStaticVoidMethod(mGeckoAppShellClass, jPumpMessageLoop);
|
||||
}
|
||||
|
||||
/* attribute nsIAndroidBrowserApp browserApp; */
|
||||
NS_IMETHODIMP nsAndroidBridge::GetBrowserApp(nsIAndroidBrowserApp * *aBrowserApp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user