Manually merge changes from giant AOSP topic

Change-Id: I8d3baa79404e440e77fc1efdd2a9f9eb0b93169b