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

Change-Id: I22b513b4c36c1283145003cf11fc3082e8628340