Validate EXTRA_INSTALLER_PACKAGE_NAME

When installing an app via ACTION_INSTALL_PACKAGE, the caller could
use this extra field to specify the installer package name. As using
PackageInstaller APIs, we should limit setting the installer package
name that is not the caller only when apps with INSTALL_PACKAGES
permission.

Bug: 236687884
Test: atest CtsPackageInstallTestCases
Test: manually using the PoC in the buganizer to ensure the symptom
      no longer exists.
Merged-In: I74eb4ea2e2733321b5fbf328a9835a3ca7d0dfa9
Change-Id: I99af469730756e9b5bc6ea4af51b1ea796164ce7
1 file changed