diff options
-rw-r--r-- | core/java/android/webkit/PluginFullScreenHolder.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/webkit/PluginFullScreenHolder.java b/core/java/android/webkit/PluginFullScreenHolder.java index 6d9e108..1deca67 100644 --- a/core/java/android/webkit/PluginFullScreenHolder.java +++ b/core/java/android/webkit/PluginFullScreenHolder.java @@ -27,6 +27,7 @@ package android.webkit; import android.app.Dialog; import android.view.KeyEvent; import android.view.MotionEvent; +import android.view.SurfaceView; import android.view.View; import android.view.ViewGroup; @@ -51,6 +52,15 @@ class PluginFullScreenHolder extends Dialog { contentView.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + // fixed size is only used either during pinch zoom or surface is too + // big. Make sure it is not fixed size before setting it to the full + // screen content view + if (contentView instanceof SurfaceView) { + final SurfaceView sView = (SurfaceView) contentView; + if (sView.isFixedSize()) { + sView.getHolder().setSizeFromLayout(); + } + } super.setContentView(contentView); mContentView = contentView; } |