com.android.sdklib.repositoryv2
Class LegacyRepoUtils

java.lang.Object
  extended by com.android.sdklib.repositoryv2.LegacyRepoUtils

public class LegacyRepoUtils
extends java.lang.Object

Utilities used by the FallbackLocalRepoLoader and FallbackRemoteRepoLoaders to convert IPkgDescs into forms useful to RepoManager.


Constructor Summary
LegacyRepoUtils()
           
 
Method Summary
static com.android.repository.impl.meta.TypeDetails createTypeDetails(IPkgDesc desc, int layoutLibVersion, java.util.Collection<IAndroidTarget.OptionalLibrary> addonLibraries, java.io.File packageDir, com.android.repository.api.ProgressIndicator progress, com.android.repository.io.FileOp fop)
          Convert a IPkgDesc and other old-style information into a TypeDetails.
static java.lang.String getDisplayName(IPkgDesc legacy)
          Gets the RepoPackage.getDisplayName() return value from an IPkgDesc.
static java.lang.String getLegacyPath(IPkgDesc desc, java.lang.String relativeInstallPath)
          Gets the path (see RepoPackage.getPath()) for a legacy package.
static java.util.List<IAndroidTarget.OptionalLibrary> parseLegacyAdditionalLibraries(java.io.File packageLocation, com.android.repository.api.ProgressIndicator progress, com.android.repository.io.FileOp fop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyRepoUtils

public LegacyRepoUtils()
Method Detail

createTypeDetails

@NonNull
public static com.android.repository.impl.meta.TypeDetails createTypeDetails(@NonNull
                                                                                     IPkgDesc desc,
                                                                                     int layoutLibVersion,
                                                                                     @NonNull
                                                                                     java.util.Collection<IAndroidTarget.OptionalLibrary> addonLibraries,
                                                                                     @Nullable
                                                                                     java.io.File packageDir,
                                                                                     @NonNull
                                                                                     com.android.repository.api.ProgressIndicator progress,
                                                                                     @NonNull
                                                                                     com.android.repository.io.FileOp fop)
Convert a IPkgDesc and other old-style information into a TypeDetails.


getDisplayName

public static java.lang.String getDisplayName(IPkgDesc legacy)
Gets the RepoPackage.getDisplayName() return value from an IPkgDesc.


parseLegacyAdditionalLibraries

public static java.util.List<IAndroidTarget.OptionalLibrary> parseLegacyAdditionalLibraries(@NonNull
                                                                                            java.io.File packageLocation,
                                                                                            @NonNull
                                                                                            com.android.repository.api.ProgressIndicator progress,
                                                                                            @NonNull
                                                                                            com.android.repository.io.FileOp fop)

getLegacyPath

public static java.lang.String getLegacyPath(@NonNull
                                             IPkgDesc desc,
                                             @Nullable
                                             java.lang.String relativeInstallPath)
Gets the path (see RepoPackage.getPath()) for a legacy package.

Parameters:
desc - The IPkgDesc of the legacy package.
relativeInstallPath - The path of the package relative to the sdk root. Used to generate the path if normal methods fail.
Returns:
The path.