Address review comments from aosp/2671457. Test: test.py Change-Id: I5b6b667847727d4de3944467885576a15f72846f