Manually merge changes from giant AOSP topic

Change-Id: I855d9d0941c8d2bf9292590dda975b3ee2d3b71b