DO NOT MERGE Back-port fixes for b/62196835 am: 24fdc53c -s ours am: ff115bff am: ccbac7e9 -s ours am: 76007bb2 Change-Id: I143ebc6b57fe5c458e373dad1ac566f5d419aef2