Merge cherrypicks of [19568829, 19569654] into tm-d1-release.

Change-Id: Ic65419febec0a5f17342ac99ffc28dff8495b5dd