Merge "Improve AmbientState test coverage" into tm-qpr-dev