Bug 801627 - Fix fullscreen Flash on Android r=blassey

This commit is contained in:
James Willcox 2012-10-22 10:51:29 -04:00
Родитель 6e6d97b2a4
Коммит 69f9db0f82
2 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -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();
}
});
}

Просмотреть файл

@ -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();