Backport of latest android changes.