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

Commit 3e5f001d authored by Robert Carr's avatar Robert Carr
Browse files

Fix BLAST Surface release

The call to relayout may release the SurfaceControl for us by
reading back a null parcel. In this case remove will throw an exception.
We could check is valid, but actually we don't need to call remove
just release, which doesn't throw an exception if already released.

Bug: 146598493
Bug: 148692069
Test: Flip USE_BLAST_ADAPTER device boots.

Change-Id: I38ee8df702dc2645ca5da980bebdc5ac32a7a065
parent 0e33c62e
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1744,13 +1744,10 @@ public final class ViewRootImpl implements ViewParent,
        mSurface.release();
        mSurfaceControl.release();

        if (mBlastBufferQueue != null) {
            mTransaction.remove(mBlastSurfaceControl).apply();
            mBlastSurfaceControl = null;
        mBlastSurfaceControl.release();
        // We should probably add an explicit dispose.
        mBlastBufferQueue = null;
    }
    }

    /**
     * Block the input events during an Activity Transition. The KEYCODE_BACK event is allowed