Manually merge changes from giant AOSP topic

Change-Id: I46bbec40cf9322e223b18a8995e657121eb96ba2