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

Commit 64ebc35b authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by Android (Google) Code Review
Browse files

Merge "Always recreate the SurfaceView when updating the grid preview" into tm-dev

parents bdf34222 731a7c82
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -64,8 +64,10 @@ class GridOptionPreviewer {
        if (mSurfaceCallback != null) {
            mSurfaceCallback.cleanUp();
            mSurfaceCallback.resetLastSurface();
            if (mGridOptionSurface != null) {
                mGridOptionSurface.getHolder().removeCallback(mSurfaceCallback);
            }
        }
        if (mGridOptionSurface == null) {
        mGridOptionSurface = new SurfaceView(mPreviewContainer.getContext());
        mGridOptionSurface.setLayoutParams(new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
@@ -73,7 +75,6 @@ class GridOptionPreviewer {
        mSurfaceCallback = new GridOptionSurfaceHolderCallback(mGridOptionSurface,
                mGridOptionSurface.getContext());
        mGridOptionSurface.getHolder().addCallback(mSurfaceCallback);
        }
        mPreviewContainer.addView(mGridOptionSurface);
    }