Package com.android.repository.api
Interface InstallerFactory
-
- All Known Implementing Classes:
AbstractInstallerFactory,BasicInstallerFactory
public interface InstallerFactoryA factory forPackageOperations. Will also add appropriatePackageOperation.StatusChangeListeners via aInstallerFactory.StatusChangeListenerFactory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceInstallerFactory.StatusChangeListenerFactoryA class that can create a list of appropriate listeners for an installer/uninstaller.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InstallercreateInstaller(RemotePackage p, RepoManager mgr, Downloader downloader)Canonical way to create instances ofInstaller.UninstallercreateUninstaller(LocalPackage p, RepoManager mgr)Canonical way to create instances ofUninstaller.voidsetFallbackFactory(InstallerFactory fallback)If a factory can't itself create an installer for a given package, it will try again using the givenfallback, if provided.voidsetListenerFactory(InstallerFactory.StatusChangeListenerFactory listenerFactory)Sets the factory used to generate the list of listeners added to the generated installers/ uninstallers.
-
-
-
Method Detail
-
createInstaller
@NonNull Installer createInstaller(@NonNull RemotePackage p, @NonNull RepoManager mgr, @NonNull Downloader downloader)
Canonical way to create instances ofInstaller.
-
createUninstaller
@NonNull Uninstaller createUninstaller(@NonNull LocalPackage p, @NonNull RepoManager mgr)
Canonical way to create instances ofUninstaller.
-
setListenerFactory
void setListenerFactory(@NonNull InstallerFactory.StatusChangeListenerFactory listenerFactory)Sets the factory used to generate the list of listeners added to the generated installers/ uninstallers.
-
setFallbackFactory
void setFallbackFactory(@Nullable InstallerFactory fallback)If a factory can't itself create an installer for a given package, it will try again using the givenfallback, if provided. If an operation fails, the operation can contain a reference to an operation created by the fallback factory to facilitate retrying the install.
-
-