LayerActivity: Corrected lifecycle
Should contemplate the case that the activity gets stopped

Change-Id: Iaf3f8f6359252a785c8ff45e05b9dfde44babbec