Merge cherrypicks of [19517836, 19517837] into tm-d1-release.

Change-Id: I881441a3d7f27972b16af4f2a0d8bae9e864d846