diff --git a/mobile/android/base/FormAssistPopup.java b/mobile/android/base/FormAssistPopup.java index 3c6718ff307..4d683f5eb7f 100644 --- a/mobile/android/base/FormAssistPopup.java +++ b/mobile/android/base/FormAssistPopup.java @@ -206,7 +206,7 @@ public class FormAssistPopup extends RelativeLayout implements GeckoEventListene sValidationMessageHeight = (int) (res.getDimension(R.dimen.validation_message_height)); } - ImmutableViewportMetrics viewportMetrics = GeckoAppShell.getGeckoInterface().getLayerView().getViewportMetrics(); + ImmutableViewportMetrics viewportMetrics = GeckoAppShell.getLayerView().getViewportMetrics(); float zoom = viewportMetrics.zoomFactor; // These values correspond to the input box for which we want to diff --git a/mobile/android/base/GeckoAccessibility.java b/mobile/android/base/GeckoAccessibility.java index 9370be5ba78..307be51a22a 100644 --- a/mobile/android/base/GeckoAccessibility.java +++ b/mobile/android/base/GeckoAccessibility.java @@ -153,7 +153,7 @@ public class GeckoAccessibility { } else { // In Jelly Bean we populate an AccessibilityNodeInfo with the minimal amount of data to have // it work with TalkBack. - final LayerView view = GeckoAppShell.getGeckoInterface().getLayerView(); + final LayerView view = GeckoAppShell.getLayerView(); if (view == null) return; diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index 5bdd58928c3..904fb667793 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -1294,6 +1294,7 @@ abstract public class GeckoApp LayerView layerView = (LayerView) findViewById(R.id.layer_view); layerView.initializeView(GeckoAppShell.getEventDispatcher()); mLayerView = layerView; + GeckoAppShell.setLayerView(layerView); // bind the GeckoEditable instance to the new LayerView GeckoAppShell.notifyIMEContext(GeckoEditableListener.IME_STATE_DISABLED, "", "", ""); } diff --git a/mobile/android/base/GeckoAppShell.java b/mobile/android/base/GeckoAppShell.java index fff7874080e..9b58794e1a1 100644 --- a/mobile/android/base/GeckoAppShell.java +++ b/mobile/android/base/GeckoAppShell.java @@ -287,13 +287,9 @@ public class GeckoAppShell // run gecko -- it will spawn its own thread GeckoAppShell.nativeInit(); - // Tell Gecko where the target byte buffer is for rendering - if (getGeckoInterface() != null) - sLayerView = getGeckoInterface().getLayerView(); if (sLayerView != null) GeckoAppShell.setLayerClient(sLayerView.getLayerClient()); - // First argument is the .apk path String combinedArgs = apkPath + " -greomni " + apkPath; if (args != null) @@ -2048,7 +2044,6 @@ public class GeckoAppShell public interface GeckoInterface { public GeckoProfile getProfile(); - public LayerView getLayerView(); public PromptService getPromptService(); public Activity getActivity(); public String getDefaultUAString(); diff --git a/mobile/android/base/GeckoEvent.java b/mobile/android/base/GeckoEvent.java index 5cd72d74626..eab01ce840e 100644 --- a/mobile/android/base/GeckoEvent.java +++ b/mobile/android/base/GeckoEvent.java @@ -311,7 +311,7 @@ public class GeckoEvent { event.mPoints = new Point[1]; PointF geckoPoint = new PointF(pt.x, pt.y); - geckoPoint = GeckoAppShell.getGeckoInterface().getLayerView().convertViewPointToLayerPoint(geckoPoint); + geckoPoint = GeckoAppShell.getLayerView().convertViewPointToLayerPoint(geckoPoint); if (geckoPoint == null) { // This could happen if Gecko isn't ready yet.