Minimal cherry-pick to keep things alive. Bug: 27689078 (cherry picked from commit bdd30d86) Change-Id: I06b9d75f58c59cb07ef5170f784ea6745168efaa