Merge "Traverse all leaf task when processing activities visibility"