Merge cherrypicks of [17730677] into security-aosp-sc-release.

Change-Id: I3324df3cdebbcfd896944460028ef133ba8eeb3c