Fix crash when cloning layers

Hack to disable legacy code which is showing up
in some crash clusters. The code is obsolete and
has no effect when frontend is enabled. Reduce
some chaos/noise by avoiding this path when
frontend is enabled.

Fixes: 314858515
Test: presubmit
Change-Id: I3244e9d8b240f567ae5b68bc8120d7669d962d54
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index f7800bb..c8b1059 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2687,6 +2687,7 @@
 }
 
 void Layer::setInitialValuesForClone(const sp<Layer>& clonedFrom, uint32_t mirrorRootId) {
+    if (mFlinger->mLayerLifecycleManagerEnabled) return;
     mSnapshot->path.id = clonedFrom->getSequence();
     mSnapshot->path.mirrorRootIds.emplace_back(mirrorRootId);