Merge cherrypicks of ['ag/20941605', 'ag/20946885'] into tm-qpr2-release.

Change-Id: I2f86b8635384aa2a07f47149f3257eb36ef98b9e