am 2dc78498: Merge "Remove fixed size restriction on the SurfaceView before setting it to the full screen content view." into froyo

Merge commit '2dc784988aa1660d02b50ed4e7d7679ba14b25b4' into froyo-plus-aosp

* commit '2dc784988aa1660d02b50ed4e7d7679ba14b25b4':
  Remove fixed size restriction on the SurfaceView
This commit is contained in:
Grace Kloba
2010-04-19 13:17:53 -07:00
committed by Android Git Automerger

View File

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