Allows to leave an activity.