Merge cherrypicks of [1526176, 1526177] into androidx-enterprise-release

Change-Id: Iee5ef2a1ce42e3badd128dfaee7c6809339d173d