Cherry-pick I157164910f from Master. Bug: 11621857 Change-Id: I0fd0496e9091165280f34b4640ff0e524e3847b9
Bug: 9833890 Change-Id: I0af4a358cc1457dc08c32744b5c170bd2a3382c9