Merge "Moving flag creation to a separate file" into tm-qpr-dev