Merge cherrypicks of [1317624, 1317625, 1317626, 1317627, 1316664] into ndk-release-r21

Change-Id: I8f4d77d7d420c339da04c571ae1782078ff90737