Manually merge changes from giant AOSP topic

Change-Id: Idf009f97c0572d34640d355fe02d78b7e27f4a1c