Search in sources :

Example 1 with PatchInstallerFactory

use of com.android.tools.idea.sdk.install.patch.PatchInstallerFactory in project android by JetBrains.

the class StudioSdkInstallerUtil method createInstallerFactory.

/**
   * Find the best {@link InstallerFactory} for the given {@link RepoPackage}.
   */
@NotNull
public static InstallerFactory createInstallerFactory(@NotNull AndroidSdkHandler sdkHandler) {
    InstallerFactory factory;
    InstallerFactory basicFactory = new BasicInstallerFactory();
    if (Boolean.getBoolean("sdk.patches.disable")) {
        factory = basicFactory;
    } else {
        factory = new PatchInstallerFactory();
        factory.setFallbackFactory(basicFactory);
    }
    factory.setListenerFactory(new StudioSdkInstallListenerFactory(sdkHandler));
    return factory;
}
Also used : BasicInstallerFactory(com.android.repository.impl.installer.BasicInstallerFactory) InstallerFactory(com.android.repository.api.InstallerFactory) PatchInstallerFactory(com.android.tools.idea.sdk.install.patch.PatchInstallerFactory) BasicInstallerFactory(com.android.repository.impl.installer.BasicInstallerFactory) PatchInstallerFactory(com.android.tools.idea.sdk.install.patch.PatchInstallerFactory) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

InstallerFactory (com.android.repository.api.InstallerFactory)1 BasicInstallerFactory (com.android.repository.impl.installer.BasicInstallerFactory)1 PatchInstallerFactory (com.android.tools.idea.sdk.install.patch.PatchInstallerFactory)1 NotNull (org.jetbrains.annotations.NotNull)1