Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a77f9e9 authored by Grace Kloba's avatar Grace Kloba Committed by Android Git Automerger
Browse files

am e3ce4c89: am 2dc78498: Merge "Remove fixed size restriction on the...

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

Merge commit 'e3ce4c89' into kraken

* commit 'e3ce4c89':
  Remove fixed size restriction on the SurfaceView
parents 08e15982 e3ce4c89
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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;
    }