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

Commit fbc4732b authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "No need to remove callback and call surface.release in...

Merge "No need to remove callback and call surface.release in GridOptionPreviewer" into ub-launcher3-master
parents 500804ec c4e9a56e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ package com.android.customization.picker.grid;

import android.content.Context;
import android.os.Bundle;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewGroup;
@@ -54,11 +53,6 @@ class GridOptionPreviewer {
    public void release() {
        if (mGridOptionSurface != null) {
            mSurfaceCallback.cleanUp();
            mGridOptionSurface.getHolder().removeCallback(mSurfaceCallback);
            Surface surface = mGridOptionSurface.getHolder().getSurface();
            if (surface != null) {
                surface.release();
            }
            mGridOptionSurface = null;
        }
        mPreviewContainer.removeAllViews();