Merge cherrypicks of ['googleplex-android-review.googlesource.com/20727476', 'googleplex-android-review.googlesource.com/21497455'] into tm-d4-release.

Change-Id: Id2ad1bf2a799c3f8afa75372a294ca84156e8b11