check if activity closed recursively