public final class ManifestData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ManifestData.Activity
Activity info obtained from the manifest.
|
static class |
ManifestData.Instrumentation
Instrumentation info obtained from manifest
|
static class |
ManifestData.SupportsScreens
Class representing the
supports-screens node in the manifest. |
static class |
ManifestData.UsesConfiguration
Class representing the
uses-configuration node in the manifest. |
static class |
ManifestData.UsesFeature
Class representing a
uses-feature node in the manifest. |
static class |
ManifestData.UsesLibrary
Class representing a
uses-library node in the manifest. |
Modifier and Type | Field and Description |
---|---|
static int |
GL_ES_VERSION_NOT_SET
Value returned by
getGlEsVersion() when there are no <uses-feature> node
with the attribute glEsVersion set. |
static int |
MIN_SDK_CODENAME
Value returned by
getMinSdkVersion() when the value of the minSdkVersion attribute
in the manifest is a codename and not an integer value. |
Constructor and Description |
---|
ManifestData() |
Modifier and Type | Method and Description |
---|---|
ManifestData.Activity[] |
getActivities()
Returns the list of activities found in the manifest.
|
java.lang.Boolean |
getDebuggable()
Returns the
debuggable attribute value or null if it is not set. |
int |
getGlEsVersion()
Returns the glEsVersion from a
<uses-feature> or GL_ES_VERSION_NOT_SET
if not set. |
ManifestData.Instrumentation[] |
getInstrumentations()
Returns the list of instrumentations found in the manifest.
|
ManifestData.Activity |
getLauncherActivity()
Returns the name of one activity found in the manifest, that is configured to show
up in the HOME screen.
|
int |
getMinSdkVersion()
Returns the
minSdkVersion attribute, or 0 if it's not set or is a codename. |
java.lang.String |
getMinSdkVersionString()
Returns the
minSdkVersion attribute, or null if it's not set. |
java.lang.String |
getPackage()
Returns the package defined in the manifest, if found.
|
java.lang.String[] |
getProcesses()
Returns the list of process names declared by the manifest.
|
ManifestData.SupportsScreens |
getSupportsScreensFromManifest()
Returns the
ManifestData.SupportsScreens object representing the supports-screens
node, or null if the node doesn't exist at all. |
ManifestData.SupportsScreens |
getSupportsScreensValues()
Returns an always non-null instance of
ManifestData.SupportsScreens that's been initialized with
the default values, and the values from the manifest. |
int |
getTargetSdkVersion()
Returns the
targetSdkVersion attribute, or the same value as
getMinSdkVersion() if it was not set in the manifest. |
ManifestData.UsesConfiguration |
getUsesConfiguration()
Returns the
ManifestData.UsesConfiguration object representing the uses-configuration
node, or null if the node doesn't exist at all. |
ManifestData.UsesFeature[] |
getUsesFeatures()
Returns the list of features in use found in the manifest.
|
ManifestData.UsesLibrary[] |
getUsesLibraries()
Returns the list of libraries in use found in the manifest.
|
java.lang.Integer |
getVersionCode()
Returns the versionCode value defined in the manifest, if found, null otherwise.
|
void |
setMinSdkVersionString(java.lang.String minSdkVersion)
Sets the value of the
minSdkVersion attribute. |
void |
setTargetSdkVersionString(java.lang.String targetSdkVersion)
Sets the value of the
minSdkVersion attribute. |
public static final int MIN_SDK_CODENAME
getMinSdkVersion()
when the value of the minSdkVersion attribute
in the manifest is a codename and not an integer value.public static final int GL_ES_VERSION_NOT_SET
getGlEsVersion()
when there are no <uses-feature>
node
with the attribute glEsVersion set.public java.lang.String getPackage()
public java.lang.Integer getVersionCode()
public ManifestData.Activity[] getActivities()
public ManifestData.Activity getLauncherActivity()
public java.lang.String[] getProcesses()
public java.lang.Boolean getDebuggable()
debuggable
attribute value or null if it is not set.public java.lang.String getMinSdkVersionString()
minSdkVersion
attribute, or null if it's not set.public void setMinSdkVersionString(java.lang.String minSdkVersion)
minSdkVersion
attribute.minSdkVersion
- the string value of the attribute in the manifest.public int getMinSdkVersion()
minSdkVersion
attribute, or 0 if it's not set or is a codename.getMinSdkVersionString()
public void setTargetSdkVersionString(java.lang.String targetSdkVersion)
minSdkVersion
attribute.targetSdkVersion
- the string value of the attribute in the manifest.public int getTargetSdkVersion()
targetSdkVersion
attribute, or the same value as
getMinSdkVersion()
if it was not set in the manifest.public ManifestData.Instrumentation[] getInstrumentations()
ManifestData.Instrumentation
, or empty if no instrumentations were
found.public ManifestData.UsesLibrary[] getUsesLibraries()
ManifestData.UsesLibrary
objects, or empty if no libraries were found.public ManifestData.UsesFeature[] getUsesFeatures()
ManifestData.UsesFeature
objects, or empty if no libraries were found.public int getGlEsVersion()
<uses-feature>
or GL_ES_VERSION_NOT_SET
if not set.public ManifestData.SupportsScreens getSupportsScreensFromManifest()
ManifestData.SupportsScreens
object representing the supports-screens
node, or null if the node doesn't exist at all.
Some values in the ManifestData.SupportsScreens
instance maybe null, indicating that they
were not present in the manifest. To get an instance that contains the values, as seen
by the Android platform when the app is running, use getSupportsScreensValues()
.public ManifestData.SupportsScreens getSupportsScreensValues()
ManifestData.SupportsScreens
that's been initialized with
the default values, and the values from the manifest.
The default values depends on the manifest values for minSdkVersion and targetSdkVersion.public ManifestData.UsesConfiguration getUsesConfiguration()
ManifestData.UsesConfiguration
object representing the uses-configuration
node, or null if the node doesn't exist at all.