public class PackageParserUtils
extends java.lang.Object
Constructor and Description |
---|
PackageParserUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getProperty(java.util.Properties props,
java.lang.String propKey,
java.lang.String defaultValue)
Utility method that returns a property from a
Properties object. |
static com.android.repository.Revision |
getRevisionProperty(java.util.Properties props,
java.lang.String propKey)
Utility method to parse the
PkgProps.PKG_REVISION property as a revision
(major.minor.micro.preview). |
static java.util.List<java.io.File> |
parseSkinFolder(java.io.File skinRootFolder,
com.android.repository.io.FileOp fileOp)
Parses the skin folder and builds the skin list.
|
@Nullable public static com.android.repository.Revision getRevisionProperty(@Nullable java.util.Properties props, @NonNull java.lang.String propKey)
PkgProps.PKG_REVISION
property as a revision
(major.minor.micro.preview).props
- The properties to parse.propKey
- The name of the property. Must not be null.Revision
or null if there is no such property or it couldn't be parsed.@Nullable public static java.lang.String getProperty(@Nullable java.util.Properties props, @NonNull java.lang.String propKey, @Nullable java.lang.String defaultValue)
Properties
object. Returns the default
value if props is null or if the property is not defined.props
- The Properties
to search into. If null, the default value is
returned.propKey
- The name of the property. Must not be null.defaultValue
- The default value to return if props
is null or if the key is not
found. Can be null.props
is null.@NonNull public static java.util.List<java.io.File> parseSkinFolder(@NonNull java.io.File skinRootFolder, @NonNull com.android.repository.io.FileOp fileOp)
skinRootFolder
- The path to the skin root folder.