code: public static boolean isSystemPackage(@Nullable @CheckForNull Package aPackage) {
      if (aPackage == null) {
        return false;
      }
      return runAsSystem(
          () ->
              aPackage.getId().equals(PACKAGE_SYSTEM)
                  || (aPackage.getRootPackage() != null
                      && aPackage.getRootPackage().getId().equals(PACKAGE_SYSTEM)));
    }
docs: Returns whether the given package is a system package, i.e. it is the root system package or a
  descendant of the root system package.
  
  @param aPackage package
  @return whether package is a system package