Cherrypick and fix another merge conflict of ag/2163253

Test: manual
Change-Id: I33b8f87e53a3393a2802842ad2196c9d089ec7fc
2 files changed