Merge cherrypicks of ['googleplex-android-review.googlesource.com/25007539', 'googleplex-android-review.googlesource.com/24956689'] into security-aosp-tm-release.

Change-Id: I686ce700b5141944db1c17c0a7bcbb8d9b05027f