SF: Fix duplicate callbacks from mirrored layers

When cloning layers, we would also clone the layer's
callback handles which resulted in SF emitting duplicate
callbacks.

Test: presubmit
Test: launcher does not ANR when switching wallpapers with screen recording enabled
Bug: 205922358

Change-Id: Ic0435164f27d9bca7f80fc57d9021a9f544c936f
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index cd531d6..df91904 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -66,7 +66,7 @@
     // one of the layers, in this case the original layer, needs to handle the deletion. The
     // original layer and the clone should be removed at the same time so there shouldn't be any
     // issue with the clone layer trying to use the texture.
-    if (mBufferInfo.mBuffer != nullptr && !isClone()) {
+    if (mBufferInfo.mBuffer != nullptr) {
         callReleaseBufferCallback(mDrawingState.releaseBufferListener,
                                   mBufferInfo.mBuffer->getBuffer(), mBufferInfo.mFrameNumber,
                                   mBufferInfo.mFence, mTransformHint,