public class ApplicationInfo extends PackageItemInfo implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationInfo.DisplayNameComparator |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
String |
backupAgentName
Class implementing the Application's backup functionality.
|
String |
className
Class implementing the Application object.
|
int |
compatibleWidthLimitDp
The maximum smallest screen width the application is designed for.
|
static Parcelable.Creator<ApplicationInfo> |
CREATOR |
String |
credentialEncryptedDataDir
Deprecated.
|
String |
credentialProtectedDataDir
Full path to the credential-protected directory assigned to the package
for its persistent data.
|
String |
dataDir
Full path to the default directory assigned to the package for its
persistent data.
|
int |
descriptionRes
A style resource identifier (in the package's resources) of the
description of an application.
|
String |
deviceEncryptedDataDir
Deprecated.
|
String |
deviceProtectedDataDir
Full path to the device-protected directory assigned to the package for
its persistent data.
|
boolean |
enabled
When false, indicates that all components within this application are
considered disabled, regardless of their individually set enabled status.
|
int |
enabledSetting
For convenient access to the current enabled setting of this app.
|
static int |
FLAG_ALLOW_BACKUP
Value for
flags : set to false if the application does not wish
to permit any OS-driven backups of its data; true otherwise. |
static int |
FLAG_ALLOW_CLEAR_USER_DATA
Value for
flags : default value for the corresponding ActivityInfo flag. |
static int |
FLAG_ALLOW_TASK_REPARENTING
Value for
flags : default value for the corresponding ActivityInfo flag. |
static int |
FLAG_DEBUGGABLE
Value for
flags : set to true if this application would like to
allow debugging of its
code, even when installed on a non-development system. |
static int |
FLAG_EXTERNAL_STORAGE
Value for
flags : Set to true if the application is
currently installed on external/removable/unprotected storage. |
static int |
FLAG_EXTRACT_NATIVE_LIBS
When set installer extracts native libs from .apk files.
|
static int |
FLAG_FACTORY_TEST
Value for
flags : set to true if this application holds the
android.Manifest.permission#FACTORY_TEST permission and the
device is running in factory test mode. |
static int |
FLAG_FULL_BACKUP_ONLY
Value for
flags : true if the application asks that only
full-data streaming backups of its data be performed even though it defines
a BackupAgent , which normally
indicates that the app will manage its backed-up data via incremental
key/value updates. |
static int |
FLAG_HARDWARE_ACCELERATED
Value for
flags : true when the application's rendering
should be hardware accelerated. |
static int |
FLAG_HAS_CODE
Value for
flags : set to true if this application has code
associated with it. |
static int |
FLAG_INSTALLED
Value for
flags : true if the application is currently
installed for the calling user. |
static int |
FLAG_IS_DATA_ONLY
Value for
flags : true if the application only has its
data installed; the application package itself does not currently
exist on the device. |
static int |
FLAG_IS_GAME
Value for
flags : true if the application was declared to be a game, or
false if it is a non-game application. |
static int |
FLAG_KILL_AFTER_RESTORE
Value for
flags : set to false if the application must be kept
in memory following a full-system restore operation; true otherwise. |
static int |
FLAG_LARGE_HEAP
Value for
flags : true when the application has requested a
large heap for its processes. |
static int |
FLAG_MULTIARCH
Value for
flags : true if code from this application will need to be
loaded into other applications' processes. |
static int |
FLAG_PERSISTENT
Value for
flags : set to true if this application is persistent. |
static int |
FLAG_RESIZEABLE_FOR_SCREENS
Value for
flags : true when the application knows how to adjust
its UI for different screen sizes. |
static int |
FLAG_RESTORE_ANY_VERSION
Value for
flags : Set to true if the application's backup
agent claims to be able to handle restore data even "from the future,"
i.e. from versions of the application with a versionCode greater than
the one currently installed on the device. |
static int |
FLAG_STOPPED
Value for
flags : true if this application's package is in
the stopped state. |
static int |
FLAG_SUPPORTS_LARGE_SCREENS
Value for
flags : true when the application's window can be
increased in size for larger screens. |
static int |
FLAG_SUPPORTS_NORMAL_SCREENS
Value for
flags : true when the application's window can be
displayed on normal screens. |
static int |
FLAG_SUPPORTS_RTL
Value for
flags : true when the application is willing to support
RTL (right to left). |
static int |
FLAG_SUPPORTS_SCREEN_DENSITIES
Value for
flags : true when the application knows how to
accomodate different screen densities. |
static int |
FLAG_SUPPORTS_SMALL_SCREENS
Value for
flags : true when the application's window can be
reduced in size for smaller screens. |
static int |
FLAG_SUPPORTS_XLARGE_SCREENS
Value for
flags : true when the application's window can be
increased in size for extra large screens. |
static int |
FLAG_SUSPENDED
Value for
flags : true if this application's package is in
the suspended state. |
static int |
FLAG_SYSTEM
Value for
flags : if set, this application is installed in the
device's system image. |
static int |
FLAG_TEST_ONLY
Value for
flags : this is set if the application has specified
android:testOnly to be true. |
static int |
FLAG_UPDATED_SYSTEM_APP
Value for
flags : this is set if this application has been
installed as an update to a built-in system application. |
static int |
FLAG_USES_CLEARTEXT_TRAFFIC
Value for
flags : true if the application may use cleartext network traffic
(e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP
without STARTTLS or TLS). |
static int |
FLAG_VM_SAFE_MODE
Value for
flags : set to true if this application would like to
request the VM to operate under the safe mode. |
int |
flags
Flags associated with the application.
|
int |
fullBackupContent
An optional attribute that indicates the app supports automatic backup of app data.
|
int |
installLocation
For convenient access to package's install location.
|
int |
largestWidthLimitDp
The maximum smallest screen width the application will work on.
|
String |
manageSpaceActivityName
Class implementing the Application's manage space
functionality.
|
int |
minSdkVersion
The minimum SDK version this application can run on.
|
String |
nativeLibraryDir
Full path to the directory where native JNI libraries are stored.
|
String |
nativeLibraryRootDir
The root path where unpacked native libraries are stored.
|
boolean |
nativeLibraryRootRequiresIsa
Flag indicating that ISA must be appended to
nativeLibraryRootDir to be useful. |
int |
networkSecurityConfigRes
Resource file providing the application's Network Security Config.
|
String |
permission
Optional name of a permission required to be able to access this
application's components.
|
String |
primaryCpuAbi
The primary ABI that this application requires, This is inferred from the ABIs
of the native JNI libraries the application bundles.
|
static int |
PRIVATE_FLAG_AUTOPLAY
Value for
privateFlags : set to true if the application
is AutoPlay. |
static int |
PRIVATE_FLAG_BACKUP_IN_FOREGROUND
Value for
privateFlags : true means the OS should go ahead and
run full-data backup operations for the app even when it is in a
foreground-equivalent run state. |
static int |
PRIVATE_FLAG_CANT_SAVE_STATE
Value for
privateFlags : set to true if the application
has reported that it is heavy-weight, and thus can not participate in
the normal application lifecycle. |
static int |
PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE
When set, the default data storage directory for this app is pointed at
the device-protected location.
|
static int |
PRIVATE_FLAG_DIRECT_BOOT_AWARE
When set, assume that all components under the given app are direct boot
aware, unless otherwise specified.
|
static int |
PRIVATE_FLAG_EPHEMERAL
Value for
flags : true if the application is blocked via restrictions
and for most purposes is considered as not installed. |
static int |
PRIVATE_FLAG_FORWARD_LOCK
Value for
privateFlags : Set to true if the application has been
installed using the forward lock option. |
static int |
PRIVATE_FLAG_HAS_DOMAIN_URLS
Value for
privateFlags : true if the application has any IntentFiler
with some data URI using HTTP or HTTPS with an associated VIEW action. |
static int |
PRIVATE_FLAG_HIDDEN
Value for
privateFlags : true if the application is hidden via restrictions and for
most purposes is considered as not installed. |
static int |
PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE
When set, at least one component inside this application is direct boot
aware.
|
static int |
PRIVATE_FLAG_PRIVILEGED
Value for
privateFlags : set to true if the application
is permitted to hold privileged permissions. |
static int |
PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER
When set, signals that the application is required for the system user and should not be
uninstalled.
|
static int |
PRIVATE_FLAG_RESIZEABLE_ACTIVITIES
When set, the activities associated with this application are resizeable by default.
|
int |
privateFlags
Private/hidden flags.
|
String |
processName
The name of the process this application should run in.
|
String |
publicSourceDir
Full path to the publicly available parts of
sourceDir ,
including resources and manifest. |
int |
requiresSmallestWidthDp
The required smallest screen width the application can run on.
|
String[] |
resourceDirs
Full paths to the locations of extra resource packages this application
uses.
|
String |
scanPublicSourceDir |
String |
scanSourceDir |
String |
secondaryCpuAbi
The secondary ABI for this application.
|
String |
secondaryNativeLibraryDir
Full path where unpacked native libraries for
secondaryCpuAbi
are stored, if present. |
String |
seinfo
String retrieved from the seinfo tag found in selinux policy.
|
String[] |
sharedLibraryFiles
Paths to all shared libraries this application is linked against.
|
String |
sourceDir
Full path to the base APK for this application.
|
String[] |
splitPublicSourceDirs
Full path to the publicly available parts of
splitSourceDirs ,
including resources and manifest. |
String[] |
splitSourceDirs
Full paths to zero or more split APKs that, when combined with the base
APK defined in
sourceDir , form a complete application. |
int |
targetSdkVersion
The minimum SDK version this application targets.
|
String |
taskAffinity
Default task affinity of all activities in this application.
|
int |
theme
A style resource identifier (in the package's resources) of the
default visual theme of the application.
|
int |
uid
The kernel user-ID that has been assigned to this application;
currently this is not a unique ID (multiple applications can have
the same uid).
|
int |
uiOptions
The default extra UI options for activities in this application.
|
int |
versionCode
The app's declared version code.
|
String |
volumeUuid |
banner, DUMP_FLAG_ALL, DUMP_FLAG_APPLICATION, DUMP_FLAG_DETAILS, icon, labelRes, logo, metaData, name, nonLocalizedLabel, packageName, showUserIcon
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ApplicationInfo() |
ApplicationInfo(ApplicationInfo orig) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
void |
disableCompatibilityMode()
Disable compatibility mode
|
void |
dump(Printer pw,
String prefix) |
void |
dump(Printer pw,
String prefix,
int flags) |
protected ApplicationInfo |
getApplicationInfo()
Get the ApplicationInfo for the application to which this item belongs,
if available, otherwise returns null.
|
String |
getBaseCodePath() |
String |
getBaseResourcePath() |
String |
getCodePath() |
String |
getResourcePath() |
String[] |
getSplitCodePaths() |
String[] |
getSplitResourcePaths() |
boolean |
hasCode() |
boolean |
hasRtlSupport() |
void |
initForUser(int userId) |
boolean |
isAutoPlayApp() |
boolean |
isDefaultToDeviceProtectedStorage() |
boolean |
isDirectBootAware() |
boolean |
isEphemeralApp() |
boolean |
isExternalAsec() |
boolean |
isForwardLocked() |
boolean |
isInternal() |
boolean |
isPartiallyDirectBootAware() |
boolean |
isPrivilegedApp() |
boolean |
isRequiredForSystemUser() |
boolean |
isSystemApp() |
boolean |
isUpdatedSystemApp() |
Drawable |
loadDefaultIcon(PackageManager pm)
Retrieve the default graphical icon associated with this item.
|
CharSequence |
loadDescription(PackageManager pm)
Retrieve the textual description of the application.
|
void |
setBaseCodePath(String baseCodePath) |
void |
setBaseResourcePath(String baseResourcePath) |
void |
setCodePath(String codePath) |
void |
setResourcePath(String resourcePath) |
void |
setSplitCodePaths(String[] splitCodePaths) |
void |
setSplitResourcePaths(String[] splitResourcePaths) |
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel dest,
int parcelableFlags)
Flatten this object in to a Parcel.
|
dumpBack, dumpFront, loadBanner, loadDefaultBanner, loadDefaultLogo, loadIcon, loadLabel, loadLogo, loadSafeLabel, loadUnbadgedIcon, loadXmlMetaData
public String taskAffinity
ActivityInfo.taskAffinity
for more information. This comes
from the "taskAffinity" attribute.public String permission
public String processName
public String className
public int descriptionRes
public int theme
public String manageSpaceActivityName
public String backupAgentName
If android:allowBackup is set to false, this attribute is ignored.
public int fullBackupContent
0 is the default and means the app's entire data folder + managed external storage will be backed up; Any negative value indicates the app does not support full-data backup, though it may still want to participate via the traditional key/value backup API; A positive number specifies an xml resource in which the application has defined its backup include/exclude criteria.
If android:allowBackup is set to false, this attribute is ignored.
Context.getNoBackupFilesDir()
,
FLAG_ALLOW_BACKUP
public int uiOptions
android.R.attr#uiOptions
attribute in the
activity's manifest.public static final int FLAG_SYSTEM
flags
: if set, this application is installed in the
device's system image.public static final int FLAG_DEBUGGABLE
flags
: set to true if this application would like to
allow debugging of its
code, even when installed on a non-development system. Comes
from android:debuggable
of the <application> tag.public static final int FLAG_HAS_CODE
flags
: set to true if this application has code
associated with it. Comes
from android:hasCode
of the <application> tag.public static final int FLAG_PERSISTENT
flags
: set to true if this application is persistent.
Comes from android:persistent
of the <application> tag.public static final int FLAG_FACTORY_TEST
flags
: set to true if this application holds the
android.Manifest.permission#FACTORY_TEST
permission and the
device is running in factory test mode.public static final int FLAG_ALLOW_TASK_REPARENTING
flags
: default value for the corresponding ActivityInfo flag.
Comes from android:allowTaskReparenting
of the <application> tag.public static final int FLAG_ALLOW_CLEAR_USER_DATA
flags
: default value for the corresponding ActivityInfo flag.
Comes from android:allowClearUserData
of the <application> tag.public static final int FLAG_UPDATED_SYSTEM_APP
flags
: this is set if this application has been
installed as an update to a built-in system application.public static final int FLAG_TEST_ONLY
flags
: this is set if the application has specified
android:testOnly
to be true.public static final int FLAG_SUPPORTS_SMALL_SCREENS
flags
: true when the application's window can be
reduced in size for smaller screens. Corresponds to
android:smallScreens
.public static final int FLAG_SUPPORTS_NORMAL_SCREENS
flags
: true when the application's window can be
displayed on normal screens. Corresponds to
android:normalScreens
.public static final int FLAG_SUPPORTS_LARGE_SCREENS
flags
: true when the application's window can be
increased in size for larger screens. Corresponds to
android:largeScreens
.public static final int FLAG_RESIZEABLE_FOR_SCREENS
flags
: true when the application knows how to adjust
its UI for different screen sizes. Corresponds to
android:resizeable
.public static final int FLAG_SUPPORTS_SCREEN_DENSITIES
flags
: true when the application knows how to
accomodate different screen densities. Corresponds to
android:anyDensity
.public static final int FLAG_VM_SAFE_MODE
flags
: set to true if this application would like to
request the VM to operate under the safe mode. Comes from
android:vmSafeMode
of the <application> tag.public static final int FLAG_ALLOW_BACKUP
flags
: set to false
if the application does not wish
to permit any OS-driven backups of its data; true
otherwise.
Comes from the
android:allowBackup
attribute of the <application> tag.
public static final int FLAG_KILL_AFTER_RESTORE
flags
: set to false
if the application must be kept
in memory following a full-system restore operation; true
otherwise.
Ordinarily, during a full system restore operation each application is shut down
following execution of its agent's onRestore() method. Setting this attribute to
false
prevents this. Most applications will not need to set this attribute.
If
android:allowBackup
is set to false
or no
android:backupAgent
is specified, this flag will be ignored.
Comes from the
android:killAfterRestore
attribute of the <application> tag.
public static final int FLAG_RESTORE_ANY_VERSION
flags
: Set to true
if the application's backup
agent claims to be able to handle restore data even "from the future,"
i.e. from versions of the application with a versionCode greater than
the one currently installed on the device. Use with caution! By default
this attribute is false
and the Backup Manager will ensure that data
from "future" versions of the application are never supplied during a restore operation.
If
android:allowBackup
is set to false
or no
android:backupAgent
is specified, this flag will be ignored.
Comes from the
android:restoreAnyVersion
attribute of the <application> tag.
public static final int FLAG_EXTERNAL_STORAGE
flags
: Set to true if the application is
currently installed on external/removable/unprotected storage. Such
applications may not be available if their storage is not currently
mounted. When the storage it is on is not available, it will look like
the application has been uninstalled (its .apk is no longer available)
but its persistent data is not removed.public static final int FLAG_SUPPORTS_XLARGE_SCREENS
flags
: true when the application's window can be
increased in size for extra large screens. Corresponds to
android:xlargeScreens
.public static final int FLAG_LARGE_HEAP
flags
: true when the application has requested a
large heap for its processes. Corresponds to
android:largeHeap
.public static final int FLAG_STOPPED
flags
: true if this application's package is in
the stopped state.public static final int FLAG_SUPPORTS_RTL
flags
: true when the application is willing to support
RTL (right to left). All activities will inherit this value.
Set from the android.R.attr#supportsRtl
attribute in the
activity's manifest.
Default value is false (no support for RTL).public static final int FLAG_INSTALLED
flags
: true if the application is currently
installed for the calling user.public static final int FLAG_IS_DATA_ONLY
flags
: true if the application only has its
data installed; the application package itself does not currently
exist on the device.public static final int FLAG_IS_GAME
flags
: true if the application was declared to be a game, or
false if it is a non-game application.public static final int FLAG_FULL_BACKUP_ONLY
flags
: true
if the application asks that only
full-data streaming backups of its data be performed even though it defines
a BackupAgent
, which normally
indicates that the app will manage its backed-up data via incremental
key/value updates.public static final int FLAG_USES_CLEARTEXT_TRAFFIC
flags
: true
if the application may use cleartext network traffic
(e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP
without STARTTLS or TLS). If false
, the app declares that it does not intend to use
cleartext network traffic, in which case platform components (e.g., HTTP stacks,
DownloadManager
, MediaPlayer
) will refuse app's requests to use cleartext
traffic. Third-party libraries are encouraged to honor this flag as well.
NOTE: WebView
does not honor this flag.
This flag is ignored on Android N and above if an Android Network Security Config is present.
This flag comes from
android:usesCleartextTraffic
of the <application> tag.
public static final int FLAG_EXTRACT_NATIVE_LIBS
public static final int FLAG_HARDWARE_ACCELERATED
flags
: true
when the application's rendering
should be hardware accelerated.public static final int FLAG_SUSPENDED
flags
: true if this application's package is in
the suspended state.public static final int FLAG_MULTIARCH
flags
: true if code from this application will need to be
loaded into other applications' processes. On devices that support multiple
instruction sets, this implies the code might be loaded into a process that's
using any of the devices supported instruction sets.
The system might treat such applications specially, for eg., by extracting the application's native libraries for all supported instruction sets or by compiling the application's dex code for all supported instruction sets.
public int flags
FLAG_SYSTEM
, FLAG_DEBUGGABLE
, FLAG_HAS_CODE
,
FLAG_PERSISTENT
, FLAG_FACTORY_TEST
, and
FLAG_ALLOW_TASK_REPARENTING
FLAG_ALLOW_CLEAR_USER_DATA
, FLAG_UPDATED_SYSTEM_APP
,
FLAG_TEST_ONLY
, FLAG_SUPPORTS_SMALL_SCREENS
,
FLAG_SUPPORTS_NORMAL_SCREENS
,
FLAG_SUPPORTS_LARGE_SCREENS
, FLAG_SUPPORTS_XLARGE_SCREENS
,
FLAG_RESIZEABLE_FOR_SCREENS
,
FLAG_SUPPORTS_SCREEN_DENSITIES
, FLAG_VM_SAFE_MODE
,
FLAG_ALLOW_BACKUP
, FLAG_KILL_AFTER_RESTORE
,
FLAG_RESTORE_ANY_VERSION
, FLAG_EXTERNAL_STORAGE
,
FLAG_LARGE_HEAP
, FLAG_STOPPED
,
FLAG_SUPPORTS_RTL
, FLAG_INSTALLED
,
FLAG_IS_DATA_ONLY
, FLAG_IS_GAME
,
FLAG_FULL_BACKUP_ONLY
, FLAG_USES_CLEARTEXT_TRAFFIC
,
FLAG_MULTIARCH
.public static final int PRIVATE_FLAG_HIDDEN
privateFlags
: true if the application is hidden via restrictions and for
most purposes is considered as not installed.
public static final int PRIVATE_FLAG_CANT_SAVE_STATE
privateFlags
: set to true
if the application
has reported that it is heavy-weight, and thus can not participate in
the normal application lifecycle.
Comes from the android.R.styleable#AndroidManifestApplication_cantSaveState attribute of the <application> tag.
public static final int PRIVATE_FLAG_FORWARD_LOCK
privateFlags
: Set to true if the application has been
installed using the forward lock option.
NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml.
public static final int PRIVATE_FLAG_PRIVILEGED
privateFlags
: set to true
if the application
is permitted to hold privileged permissions.
public static final int PRIVATE_FLAG_HAS_DOMAIN_URLS
privateFlags
: true
if the application has any IntentFiler
with some data URI using HTTP or HTTPS with an associated VIEW action.
public static final int PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE
public static final int PRIVATE_FLAG_DIRECT_BOOT_AWARE
public static final int PRIVATE_FLAG_AUTOPLAY
privateFlags
: set to true
if the application
is AutoPlay.
public static final int PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE
public static final int PRIVATE_FLAG_EPHEMERAL
flags
: true
if the application is blocked via restrictions
and for most purposes is considered as not installed.
public static final int PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER
public static final int PRIVATE_FLAG_RESIZEABLE_ACTIVITIES
android.R.styleable#AndroidManifestActivity_resizeableActivity
,
Constant Field Valuespublic static final int PRIVATE_FLAG_BACKUP_IN_FOREGROUND
privateFlags
: true
means the OS should go ahead and
run full-data backup operations for the app even when it is in a
foreground-equivalent run state. Defaults to false
if unspecified.public int privateFlags
PRIVATE_FLAG_...
constants.
public int requiresSmallestWidthDp
android:requiresSmallestWidthDp
attribute of the <supports-screens> tag.public int compatibleWidthLimitDp
android:compatibleWidthLimitDp
attribute of the <supports-screens> tag.public int largestWidthLimitDp
android:largestWidthLimitDp
attribute of the <supports-screens> tag.public String volumeUuid
public String scanSourceDir
public String scanPublicSourceDir
public String sourceDir
public String publicSourceDir
public String[] splitSourceDirs
sourceDir
, form a complete application.public String[] splitPublicSourceDirs
splitSourceDirs
,
including resources and manifest. This may be different from
splitSourceDirs
if an application is forward locked.public String[] resourceDirs
public String seinfo
public String[] sharedLibraryFiles
PackageManager.GET_SHARED_LIBRARY_FILES
flag was used when retrieving
the structure.public String dataDir
public String deviceProtectedDataDir
@Deprecated public String deviceEncryptedDataDir
public String credentialProtectedDataDir
@Deprecated public String credentialEncryptedDataDir
public String nativeLibraryDir
public String secondaryNativeLibraryDir
secondaryCpuAbi
are stored, if present.
The main reason this exists is for bundled multi-arch apps, where
it's not trivial to calculate the location of libs for the secondary abi
given the location of the primary.
TODO: Change the layout of bundled installs so that we can use
nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well.
(e.g [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]
instead of [ "/system/lib/Foo", "/system/lib64/Foo" ]
.public String nativeLibraryRootDir
When nativeLibraryRootRequiresIsa
is set, the libraries are
placed in ISA-specific subdirectories under this path, otherwise the
libraries are placed directly at this path.
public boolean nativeLibraryRootRequiresIsa
nativeLibraryRootDir
to be useful.public String primaryCpuAbi
null
if this application does not require any particular ABI.
If non-null, the application will always be launched with this ABI.
public String secondaryCpuAbi
public int uid
public int minSdkVersion
public int targetSdkVersion
Build.VERSION_CODES.CUR_DEVELOPMENT
if this is a development build and the app is targeting that. You should
compare that this number is >= the SDK version number at which your
behavior was introduced.public int versionCode
public boolean enabled
public int enabledSetting
public int installLocation
public int networkSecurityConfigRes
public static final Parcelable.Creator<ApplicationInfo> CREATOR
public ApplicationInfo()
public ApplicationInfo(ApplicationInfo orig)
public boolean hasRtlSupport()
public boolean hasCode()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int parcelableFlags)
Parcelable
writeToParcel
in interface Parcelable
writeToParcel
in class PackageItemInfo
dest
- The Parcel in which the object should be written.parcelableFlags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public CharSequence loadDescription(PackageManager pm)
pm
- A PackageManager from which the label can be loaded; usually
the PackageManager from which you originally retrieved this item.public void disableCompatibilityMode()
public void initForUser(int userId)
public Drawable loadDefaultIcon(PackageManager pm)
PackageItemInfo
loadDefaultIcon
in class PackageItemInfo
pm
- A PackageManager from which the icon can be loaded; usually
the PackageManager from which you originally retrieved this item.public boolean isForwardLocked()
public boolean isSystemApp()
public boolean isPrivilegedApp()
public boolean isUpdatedSystemApp()
public boolean isInternal()
public boolean isExternalAsec()
public boolean isDefaultToDeviceProtectedStorage()
public boolean isDirectBootAware()
public boolean isPartiallyDirectBootAware()
public boolean isAutoPlayApp()
public boolean isEphemeralApp()
public boolean isRequiredForSystemUser()
protected ApplicationInfo getApplicationInfo()
PackageItemInfo
getApplicationInfo
in class PackageItemInfo
public void setCodePath(String codePath)
public void setBaseCodePath(String baseCodePath)
public void setSplitCodePaths(String[] splitCodePaths)
public void setResourcePath(String resourcePath)
public void setBaseResourcePath(String baseResourcePath)
public void setSplitResourcePaths(String[] splitResourcePaths)
public String getCodePath()
public String getBaseCodePath()
public String[] getSplitCodePaths()
public String getResourcePath()
public String getBaseResourcePath()
public String[] getSplitResourcePaths()