Back out a2cdb1000e51 (bug 801627) because of Android crashes on a CLOSED TREE
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 22 Oct 2012 09:57:00 -0700
changeset 111171 8101371a2a4e9be8e2ced881f5d997cee176bc3c
parent 111170 6eda62c9a13d30dc2bd2cef61f396aed6a02ee95
child 111172 95be4274988ce54067798bee82efdae7b2a98f28
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs801627
milestone19.0a1
backs outa2cdb1000e515efccf4884531088f62dd79b9a8b
Back out a2cdb1000e51 (bug 801627) because of Android crashes on a CLOSED TREE
mobile/android/base/GeckoApp.java
mobile/android/base/gfx/LayerView.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1352,25 +1352,25 @@ abstract public class GeckoApp
             Log.w(LOGTAG, "Passed view is not the current full screen view");
             return;
         }
 
         mFullScreenPluginContainer.removeView(mFullScreenPluginView);
 
         // We need do do this on the next iteration in order to avoid
         // a deadlock, see comment below in FullScreenHolder
-        mMainHandler.post(new Runnable() {
+        mMainHandler.post(new Runnable() { 
             public void run() {
-                mLayerView.show();
+                mLayerView.setVisibility(View.VISIBLE);
             }
         });
 
         FrameLayout decor = (FrameLayout)getWindow().getDecorView();
         decor.removeView(mFullScreenPluginContainer);
-
+        
         mFullScreenPluginView = null;
 
         GeckoScreenOrientationListener.getInstance().unlockScreenOrientation();
         setFullScreen(false);
     }
 
     void removePluginView(final View view, final boolean isFullScreen) {
         mMainHandler.post(new Runnable() { 
@@ -2646,17 +2646,17 @@ abstract public class GeckoApp
              * event to be sent to Gecko. We synchronously wait for that to be
              * processed. Simultaneously, however, Flash is waiting on a mutex so
              * the post() below is an attempt to avoid a deadlock.
              */
             super.addView(view, index);
 
             mMainHandler.post(new Runnable() { 
                 public void run() {
-                    mLayerView.hide();
+                    mLayerView.setVisibility(View.INVISIBLE);
                 }
             });
         }
 
         /**
          * The methods below are simply copied from what Android WebKit does.
          * It wasn't ever called in my testing, but might as well
          * keep it in case it is for some reason. The methods
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -105,26 +105,16 @@ public class LayerView extends FrameLayo
         mInputConnectionHandler = null;
 
         setFocusable(true);
         setFocusableInTouchMode(true);
 
         GeckoAccessibility.setDelegate(this);
     }
 
-    public void show() {
-        View view = mTextureView != null ? mTextureView : mSurfaceView;
-        view.setVisibility(View.VISIBLE);
-    }
-
-    public void hide() {
-        View view = mTextureView != null ? mTextureView : mSurfaceView;
-        view.setVisibility(View.INVISIBLE);
-    }
-
     public void destroy() {
         if (mLayerClient != null) {
             mLayerClient.destroy();
         }
         if (mRenderer != null) {
             mRenderer.destroy();
         }
     }