From 6edb3792d83e6e299a9d330db938075634e76d14 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Mon, 19 Apr 2010 12:14:17 -0700 Subject: [PATCH] Remove fixed size restriction on the SurfaceView before setting it to the full screen content view. Fix http://b/issue?id=2607352 --- core/java/android/webkit/PluginFullScreenHolder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/java/android/webkit/PluginFullScreenHolder.java b/core/java/android/webkit/PluginFullScreenHolder.java index 6d9e10802afa7..1deca67562dc5 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; }