Merge cherrypicks of [18800448] into security-aosp-tm-release.

Change-Id: Ic042b2138a171fbd4839943d6802b089e220b6f2