com.android.sdklib.repository.descriptors
Class PkgDescExtra
java.lang.Object
com.android.sdklib.repository.descriptors.PkgDesc
com.android.sdklib.repository.descriptors.PkgDescExtra
- All Implemented Interfaces:
- IPkgCapabilities, IPkgDesc, IPkgDescExtra, IListDescription, java.lang.Comparable<IPkgDesc>
public final class PkgDescExtra
- extends PkgDesc
- implements IPkgDescExtra
Implementation detail of IPkgDescExtra
for extra packages.
Method Summary |
static boolean |
compatibleVendorAndPath(IPkgDescExtra lhs,
IPkgDescExtra rhs)
Helper to computhe whether the extra path of both IPkgDescExtra s
are compatible with each other, which means they are either equal or are
matched between existing path and the potential old paths list. |
static java.lang.String[] |
convertOldPaths(java.lang.String oldPathsProperty)
Helper method that converts the old_paths property string into the
an old paths array. |
java.lang.String |
getNameDisplay()
Returns the display name of the Extra. |
java.lang.String[] |
getOldPaths()
Returns an optional list of older paths for this extra package. |
Methods inherited from class com.android.sdklib.repository.descriptors.PkgDesc |
compareTo, equals, getAndroidVersion, getBaseInstallId, getCanonicalInstallFolder, getDescriptionShort, getDescriptionUrl, getInstallId, getLicense, getListDescription, getListDisplay, getMinPlatformToolsRev, getMinToolsRev, getName, getPath, getRevision, getTag, getType, getVendor, hasAndroidVersion, hashCode, hasMinPlatformToolsRev, hasMinToolsRev, hasName, hasPath, hasTag, hasVendor, isObsolete, isPreview, isUpdateFor, isUpdateFor, patternReplaceImpl, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.android.sdklib.repository.descriptors.IPkgDesc |
getAndroidVersion, getBaseInstallId, getCanonicalInstallFolder, getDescriptionShort, getDescriptionUrl, getInstallId, getLicense, getListDisplay, getMinPlatformToolsRev, getMinToolsRev, getName, getPath, getRevision, getTag, getType, getVendor, isObsolete, isPreview, isUpdateFor, isUpdateFor |
Methods inherited from interface java.lang.Comparable |
compareTo |
getOldPaths
@NonNull
public java.lang.String[] getOldPaths()
- Description copied from interface:
IPkgDescExtra
- Returns an optional list of older paths for this extra package.
- Specified by:
getOldPaths
in interface IPkgDescExtra
- Returns:
- A non-null, possibly empty, for old paths previously used for the same extra.
getNameDisplay
@NonNull
public java.lang.String getNameDisplay()
- Description copied from interface:
IPkgDescExtra
- Returns the display name of the Extra.
- Specified by:
getNameDisplay
in interface IPkgDescExtra
- Returns:
- A non-null name for the Extra, used for display purposes.
convertOldPaths
@NonNull
public static java.lang.String[] convertOldPaths(@Nullable
java.lang.String oldPathsProperty)
- Helper method that converts the old_paths property string into the
an old paths array.
- Parameters:
oldPathsProperty
- A possibly-null old_path property string.
- Returns:
- A list of old paths split by their separator. Can be empty but not null.
compatibleVendorAndPath
public static boolean compatibleVendorAndPath(@NonNull
IPkgDescExtra lhs,
@NonNull
IPkgDescExtra rhs)
- Helper to computhe whether the extra path of both
IPkgDescExtra
s
are compatible with each other, which means they are either equal or are
matched between existing path and the potential old paths list.
This also covers backward compatibility -- in earlier schemas the vendor id was
merged into the path string when reloading installed extras.
- Parameters:
lhs
- A non-null IPkgDescExtra
.rhs
- Another non-null IPkgDescExtra
.
- Returns:
- true if the paths are compatible.