Package org.robolectric.shadows
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
addOptionalUpdater
(List<com.android.server.pm.parsing.library.PackageSharedLibraryUpdater> packageUpdaters, String className, Supplier<com.android.server.pm.parsing.library.PackageSharedLibraryUpdater> defaultUpdater) Stubbing this out as if Android S+ is on the classpath, we'll get a ClassCastException instead of a ClassNotFoundException.
-
Constructor Details
-
ShadowPackageBackwardCompatibility
public ShadowPackageBackwardCompatibility()
-
-
Method Details
-
addOptionalUpdater
@Implementation(minSdk=28) protected static boolean addOptionalUpdater(List<com.android.server.pm.parsing.library.PackageSharedLibraryUpdater> packageUpdaters, String className, Supplier<com.android.server.pm.parsing.library.PackageSharedLibraryUpdater> 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
-