Merge cherrypicks of [20218634, 20393929] into tm-qpr1-release.

Change-Id: I509ccb5de80384a71b9224b8cd2c0190a2e4289c