Merge "Generalize the condition to take task snapshot when entering AOD" into sc-dev