Revert "Revert "LayerActivity: Corrected lifecycle""

This reverts commit 97a598797bce3dfb5339fbb7f99f319a5d677719.