Merge cherrypicks of [19008482, 20001918] into tm-d1-release.

Change-Id: Id62833a7dfb661b6a7892490eb59f4a435600c30