Skip to content

PrivExt API >= 24 uninstall fixes.

PackageManagerCompat: Handle exceptions better

  • Excpliclty handle only the exceptions actually thrown by this method rather than have a blanket catch of 'Exception'.
  • Only re-throw what we actually care about, which is failure to set installer package name on permission mismatch.
  • Re-format comments as javadoc, and also update about this behaviour.

Installer: Fallback to DefaultInstaller on API >= 24 for uninstall, ... when PackageInstaller is the installer (privext).

  • In the case where the Privileged Extension is installed, but the installation happens through DefaultInstaller still due to something like a permission mismatch, that is set as the installer package name.
  • We cannot install packages installed by that via the system methods, so fallback to DefualtInstaller for uninstalling as well when the app is installed by PackageInstaller

Merge request reports