diff --git a/config/android-common.mk b/config/android-common.mk index 25548f561da..0ce55c3d19d 100644 --- a/config/android-common.mk +++ b/config/android-common.mk @@ -71,5 +71,4 @@ JAVAC_FLAGS = \ -bootclasspath $(JAVA_BOOTCLASSPATH) \ -encoding UTF8 \ -g \ - -Werror \ $(NULL) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 2d23dae446a..caee4a819e1 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -164,7 +164,6 @@ CompositorParent::DeallocPLayers(PLayersParent* actor) return true; } -<<<<<<< local #ifdef MOZ_WIDGET_ANDROID void CompositorParent::RegisterCompositorWithJava() @@ -173,9 +172,6 @@ CompositorParent::RegisterCompositorWithJava() } #endif - -======= ->>>>>>> other } // namespace layers } // namespace mozilla diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java index 9ce9193e7f3..c1fa0f2d01c 100644 --- a/mobile/android/base/AboutHomeContent.java +++ b/mobile/android/base/AboutHomeContent.java @@ -468,7 +468,7 @@ public class AboutHomeContent extends ScrollView { // If gecko is ready, the session restore initialization has already occurred. // This means sessionstore.js has been moved to sessionstore.bak. Otherwise, the // previous session will still be in sessionstore.js. - final String sessionFilename = "sessionstore." + (GeckoApp.mAppContext.sIsGeckoReady ? "bak" : "js"); + final String sessionFilename = "sessionstore." + (GeckoApp.sIsGeckoReady ? "bak" : "js"); final JSONArray tabs; String jsonString = readJSONFile(activity, sessionFilename); if (jsonString == null) diff --git a/mobile/android/base/gfx/AbstractLayerView.java b/mobile/android/base/gfx/AbstractLayerView.java index 32513482e35..d9da17e2e24 100644 --- a/mobile/android/base/gfx/AbstractLayerView.java +++ b/mobile/android/base/gfx/AbstractLayerView.java @@ -56,5 +56,7 @@ public interface AbstractLayerView { public boolean postDelayed(Runnable action, long delayMillis); public Context getContext(); public int getMaxTextureSize(); + public void clearEventQueue(); + public void processEventQueue(); } diff --git a/mobile/android/base/gfx/LayerView.java b/mobile/android/base/gfx/LayerView.java index 0c4a431df63..629c18de9bc 100644 --- a/mobile/android/base/gfx/LayerView.java +++ b/mobile/android/base/gfx/LayerView.java @@ -69,7 +69,7 @@ import org.json.JSONObject; * mediator between the LayerRenderer and the LayerController. */ public class LayerView extends GLSurfaceView - implements AbstractLayerView { + implements AbstractLayerView, GeckoEventListener { private Context mContext; private LayerController mController; private InputConnectionHandler mInputConnectionHandler; @@ -170,9 +170,9 @@ public class LayerView extends GLSurfaceView } public GeckoInputConnection setInputConnectionHandler() { - mInputConnectionHandler = GeckoInputConnection.create(this); - setInputConnectionHandler(mInputConnectionHandler); - return mInputConnectionHandler; + GeckoInputConnection geckoInputConnection = GeckoInputConnection.create(this); + mInputConnectionHandler = geckoInputConnection; + return geckoInputConnection; } @Override diff --git a/mobile/android/base/gfx/MultiTileLayer.java b/mobile/android/base/gfx/MultiTileLayer.java index 10fb5f112a7..394cb3e9e71 100644 --- a/mobile/android/base/gfx/MultiTileLayer.java +++ b/mobile/android/base/gfx/MultiTileLayer.java @@ -380,7 +380,7 @@ public class MultiTileLayer extends Layer { } @Override - public void beginTransaction(LayerView aView) { + public void beginTransaction(AbstractLayerView aView) { super.beginTransaction(aView); for (SubTile layer : mTiles) { diff --git a/mobile/android/base/gfx/layers/OGLSurfaceView.java b/mobile/android/base/gfx/layers/OGLSurfaceView.java index 717e12be115..75530d0e82e 100644 --- a/mobile/android/base/gfx/layers/OGLSurfaceView.java +++ b/mobile/android/base/gfx/layers/OGLSurfaceView.java @@ -43,6 +43,7 @@ import android.view.SurfaceView; import android.util.Log; import android.view.View; +import org.mozilla.gecko.GeckoApp; import org.mozilla.gecko.gfx.*; import org.mozilla.gecko.GeckoInputConnection; @@ -132,6 +133,8 @@ public class OGLSurfaceView implements AbstractLayerView { public boolean postDelayed(Runnable action, long delayMillis) { return false; } public Context getContext() { return mContext; } public int getMaxTextureSize() { return 1024; } + public void clearEventQueue() {} + public void processEventQueue() {} private class InternalSurfaceView extends SurfaceView { public InternalSurfaceView() { diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 5370f33770e..adde22b6b37 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -975,7 +975,11 @@ void * AndroidBridge::CallEglCreateWindowSurface(void *dpy, void *config, AndroidGeckoSurfaceView &sview) { ALOG_BRIDGE("AndroidBridge::CallEglCreateWindowSurface"); - AutoLocalJNIFrame jniFrame(GetJNIForThread()); + + // Called off the main thread by the compositor + JNIEnv *env = GetJNIForThread(); + if (!env) + return NULL; /* * This is basically: