Class ShadowPackageBackwardCompatibility

java.lang.Object
org.robolectric.shadows.ShadowPackageBackwardCompatibility

@Implements(className="android.content.pm.PackageBackwardCompatibility", minSdk=27, maxSdk=28) public class ShadowPackageBackwardCompatibility extends Object
Shadow of PackageBackwardCompatibility to handle a scenario that can come up when multiple Android versions end up on the classpath.
  • Constructor Details

    • ShadowPackageBackwardCompatibility

      public ShadowPackageBackwardCompatibility()
  • Method Details

    • addOptionalUpdater

      @Implementation(minSdk=28) protected static boolean addOptionalUpdater(List<Object> packageUpdaters, String className, Supplier<Object> defaultUpdater)
      Stubbing this out as if Android S+ is on the classpath, we'll get a ClassCastException instead of a ClassNotFoundException. Since we don't really need this logic, simpler to just skip it