Place recordLayerHistoryAnimationTx behind flag

Current block of code uses the legacy layer, which will eventually
be removed. It is already called elsewhere and is doubly called without
the LayerLifecycleManager flag.

Bug: b/330785038
Test: presubmit
Change-Id: Iea6cb58c3885967ccbf0245549f060380bc1d745
1 file changed