AndroidSdkHandler
/RepoManager
and associated classes instead.@Deprecated public class PkgDesc extends java.lang.Object implements IPkgDesc
PkgDesc
keeps information on individual SDK packages
(both local or remote packages definitions.)
To create a new PkgDesc
, use one of the package-specific constructors
provided here.
To query packages capabilities, rely on getType()
and the PkgDesc.hasXxx()
methods provided in the base PkgDesc
.
Modifier and Type | Class and Description |
---|---|
static class |
PkgDesc.Builder
Deprecated.
|
static interface |
PkgDesc.IGetPath
Deprecated.
|
static interface |
PkgDesc.IIsUpdateFor
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
PkgDesc(PkgType type,
com.android.repository.api.License license,
java.lang.String listDisplay,
java.lang.String descriptionShort,
java.lang.String descriptionUrl,
boolean isObsolete,
com.android.repository.Revision revision,
com.android.sdklib.AndroidVersion androidVersion,
java.lang.String path,
IdDisplay tag,
IdDisplay vendor,
com.android.repository.Revision minToolsRev,
com.android.repository.Revision minPlatformToolsRev,
PkgDesc.IIsUpdateFor customIsUpdateFor,
PkgDesc.IGetPath customPath,
IdDisplay name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IPkgDesc o)
Deprecated.
Compares this descriptor to another one.
|
boolean |
equals(java.lang.Object obj)
Deprecated.
|
com.android.sdklib.AndroidVersion |
getAndroidVersion()
Deprecated.
Returns the package's
AndroidVersion or null. |
java.lang.String |
getBaseInstallId()
Deprecated.
Returns a stable string id that can be used to reference this package, which
excludes the preview suffix.
|
java.io.File |
getCanonicalInstallFolder(java.io.File sdkLocation)
Deprecated.
Returns the canonical location where such a package would be installed.
|
java.lang.String |
getDescriptionShort()
Deprecated.
|
java.lang.String |
getDescriptionUrl()
Deprecated.
|
java.lang.String |
getInstallId()
Deprecated.
Returns a stable string id that can be used to reference this package, including
a suffix indicating that this package is a preview if it is.
|
com.android.repository.api.License |
getLicense()
Deprecated.
|
java.lang.String |
getListDescription()
Deprecated.
|
java.lang.String |
getListDisplay()
Deprecated.
Returns the list-display meta data of this package.
|
com.android.repository.Revision |
getMinPlatformToolsRev()
Deprecated.
Returns the package's
min-platform-tools-rev or null. |
com.android.repository.Revision |
getMinToolsRev()
Deprecated.
Returns the package's
min-tools-rev or null. |
IdDisplay |
getName()
Deprecated.
|
java.lang.String |
getPath()
Deprecated.
Returns the package's path string or null.
|
com.android.repository.Revision |
getRevision()
Deprecated.
Returns the package's
Revision . |
IdDisplay |
getTag()
Deprecated.
Returns the package's tag id-display tuple or null.
|
PkgType |
getType()
Deprecated.
Returns the type of the package.
|
IdDisplay |
getVendor()
Deprecated.
Returns the package's vendor-id string or null.
|
boolean |
hasAndroidVersion()
Deprecated.
|
int |
hashCode()
Deprecated.
|
boolean |
hasMinPlatformToolsRev()
Deprecated.
|
boolean |
hasMinToolsRev()
Deprecated.
|
boolean |
hasName()
Deprecated.
|
boolean |
hasPath()
Deprecated.
|
boolean |
hasTag()
Deprecated.
|
boolean |
hasVendor()
Deprecated.
|
boolean |
isObsolete()
Deprecated.
|
boolean |
isPreview()
Deprecated.
|
boolean |
isUpdateFor(IPkgDesc existingDesc)
Deprecated.
Computes the most general case of
isUpdateFor(IPkgDesc) . |
boolean |
isUpdateFor(IPkgDesc existingDesc,
com.android.repository.Revision.PreviewComparison previewComparison)
Deprecated.
Indicates whether this package descriptor is an update for the given
existing descriptor, using the given comparison method.
|
protected java.lang.String |
patternReplaceImpl(java.lang.String result)
Deprecated.
|
java.lang.String |
toString()
Deprecated.
String representation for debugging purposes.
|
protected PkgDesc(@NonNull PkgType type, @Nullable com.android.repository.api.License license, @Nullable java.lang.String listDisplay, @Nullable java.lang.String descriptionShort, @Nullable java.lang.String descriptionUrl, boolean isObsolete, @Nullable com.android.repository.Revision revision, @Nullable com.android.sdklib.AndroidVersion androidVersion, @Nullable java.lang.String path, @Nullable IdDisplay tag, @Nullable IdDisplay vendor, @Nullable com.android.repository.Revision minToolsRev, @Nullable com.android.repository.Revision minPlatformToolsRev, @Nullable PkgDesc.IIsUpdateFor customIsUpdateFor, @Nullable PkgDesc.IGetPath customPath, @Nullable IdDisplay name)
@NonNull public PkgType getType()
IPkgDesc
@Nullable public java.lang.String getListDisplay()
IPkgDesc
getListDisplay
in interface IPkgDesc
@Nullable public IdDisplay getName()
@Nullable public java.lang.String getDescriptionShort()
getDescriptionShort
in interface IPkgDesc
@Nullable public java.lang.String getDescriptionUrl()
getDescriptionUrl
in interface IPkgDesc
@Nullable public com.android.repository.api.License getLicense()
getLicense
in interface IPkgDesc
public boolean isObsolete()
isObsolete
in interface IPkgDesc
public final boolean hasAndroidVersion()
hasAndroidVersion
in interface IPkgDesc
public boolean hasName()
public final boolean hasMinToolsRev()
hasMinToolsRev
in interface IPkgDesc
public final boolean hasMinPlatformToolsRev()
hasMinPlatformToolsRev
in interface IPkgDesc
@NonNull public final com.android.repository.Revision getRevision()
IPkgDesc
Revision
.getRevision
in interface IPkgDesc
@Nullable public com.android.sdklib.AndroidVersion getAndroidVersion()
IPkgDesc
AndroidVersion
or null.getAndroidVersion
in interface IPkgDesc
IPkgDesc.hasAndroidVersion()
is true; otherwise a null value.public boolean isPreview()
@Nullable public java.lang.String getPath()
IPkgDesc
For PkgType.PKG_SYS_IMAGE
, the path is the system-image ABI.
For PkgType.PKG_PLATFORM
, the path is the platform hash string.
For PkgType.PKG_ADDON
, the path is the platform hash string.
For PkgType.PKG_EXTRA
, the path is the extra-path string.
getPath
in interface IPkgDesc
IPkgDesc.hasPath()
is true; otherwise a null value.@Nullable public IdDisplay getTag()
IPkgDesc
getTag
in interface IPkgDesc
IPkgDesc.hasTag()
is true; otherwise a null value.@Nullable public IdDisplay getVendor()
IPkgDesc
getVendor
in interface IPkgDesc
IPkgDesc.hasVendor()
is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinToolsRev()
IPkgDesc
min-tools-rev
or null.getMinToolsRev
in interface IPkgDesc
IPkgDesc.hasMinToolsRev()
is true; otherwise a null value.@Nullable public com.android.repository.Revision getMinPlatformToolsRev()
IPkgDesc
min-platform-tools-rev
or null.getMinPlatformToolsRev
in interface IPkgDesc
IPkgDesc.hasMinPlatformToolsRev()
is true; otherwise null.public java.lang.String getInstallId()
IPkgDesc
getInstallId
in interface IPkgDesc
public java.lang.String getBaseInstallId()
IPkgDesc
getBaseInstallId
in interface IPkgDesc
public java.io.File getCanonicalInstallFolder(@NonNull java.io.File sdkLocation)
IPkgDesc
getCanonicalInstallFolder
in interface IPkgDesc
sdkLocation
- The root of the SDK.public boolean isUpdateFor(@NonNull IPkgDesc existingDesc)
isUpdateFor(IPkgDesc)
.
Individual package types use this and complement with their own specific cases
as needed.isUpdateFor
in interface IPkgDesc
existingDesc
- A non-null package descriptor to compare with.public boolean isUpdateFor(@NonNull IPkgDesc existingDesc, @NonNull com.android.repository.Revision.PreviewComparison previewComparison)
IPkgDesc
isUpdateFor
in interface IPkgDesc
existingDesc
- A non-null existing descriptor.previewComparison
- The Revision.PreviewComparison
method to use
when comparing the packages.public int compareTo(@NonNull IPkgDesc o)
This is must not be used an indication that a package is a suitable update for another one. The comparison order is however suitable for sorting packages for display purposes.
compareTo
in interface java.lang.Comparable<IPkgDesc>
@NonNull public java.lang.String getListDescription()
getListDescription
in interface IPkgDesc
protected java.lang.String patternReplaceImpl(java.lang.String result)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object