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

Commit c4e9a56e authored by Tracy Zhou's avatar Tracy Zhou
Browse files

No need to remove callback and call surface.release in GridOptionPreviewer

It's taken care of by SurfaceControlViewHost.

Bug: 155365052
Test: manual
Change-Id: Ibc25857cfca489cf20d5b80eb68d8618b312c140
parent 07bfdd5b
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();