Bug 801627 - Fix fullscreen Flash on Android r=blassey

This commit is contained in:
James Willcox 2012-10-22 10:51:29 -04:00
parent 058c4f07cd
commit 786d5e93d3
2 changed files with 14 additions and 4 deletions

View File

@ -1357,15 +1357,15 @@ abstract public class GeckoApp
// 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.setVisibility(View.VISIBLE);
mLayerView.show();
}
});
FrameLayout decor = (FrameLayout)getWindow().getDecorView();
decor.removeView(mFullScreenPluginContainer);
mFullScreenPluginView = null;
GeckoScreenOrientationListener.getInstance().unlockScreenOrientation();
@ -2651,7 +2651,7 @@ abstract public class GeckoApp
mMainHandler.post(new Runnable() {
public void run() {
mLayerView.setVisibility(View.INVISIBLE);
mLayerView.hide();
}
});
}

View File

@ -110,6 +110,16 @@ public class LayerView extends FrameLayout {
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();