ff5659fbc was intended to be a clean revert of 660cf30e21
that fixed a DOA issue. However, the author incorrectly rebased that
revert and picked up pieces of a separate change as well. This reverts
those sections of the change so that they can be submitted with the
correct attribution and with proper review.
Bug: 34415265
Bug: 34914977
Test: make
Change-Id: I977c3ba10bb05f04ac8cfd95d17954c454c83340