Manually merge changes from giant AOSP topic

Change-Id: I0e2f5d114e40409e862f6f4c36be4eab52ad12bb