SharedLibraryInfo
class SharedLibraryInfo : Parcelable
| kotlin.Any | |
| ↳ | android.content.pm.SharedLibraryInfo | 
This class provides information for a shared library. There are four types of shared libraries: builtin - non-updatable part of the OS; dynamic - updatable backwards-compatible dynamically linked; static - non backwards-compatible emulating static linking; SDK - updatable backwards-incompatible dynamically loaded.
Summary
| Constants | |
|---|---|
| static Int | Shared library type: this library is a part of the OS and cannot be updated or uninstalled. | 
| static Int | Shared library type: this library is backwards-compatible, can be updated, and updates can be uninstalled. | 
| static Int | SDK package shared library type: this library is not compatible between versions, can be updated and updates can be uninstalled. | 
| static Int | Shared library type: this library is not backwards -compatible, can be updated and updates can be uninstalled. | 
| static Int | Constant for referring to an undefined version. | 
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| MutableList<String!> | Gets the list of certificate digests for the shared library. | 
| VersionedPackage | Gets the package that declares the library. | 
| MutableList<VersionedPackage!> | Gets the packages that depend on the library. | 
| Long | Gets the version of the library. | 
| String! | getName()Gets the library name an app defines in its manifest to depend on the library. | 
| Int | getType()Gets the type of this library. | 
| Int | |
| String | toString() | 
| Unit | writeToParcel(: Parcel, : Int) | 
| Properties | |
|---|---|
| static Parcelable.Creator<SharedLibraryInfo!> | |
Constants
TYPE_BUILTIN
static val TYPE_BUILTIN: Int
Shared library type: this library is a part of the OS and cannot be updated or uninstalled.
Value: 0TYPE_DYNAMIC
static val TYPE_DYNAMIC: Int
Shared library type: this library is backwards-compatible, can be updated, and updates can be uninstalled. Clients link against the latest version of the library.
Value: 1TYPE_SDK_PACKAGE
static val TYPE_SDK_PACKAGE: Int
SDK package shared library type: this library is not compatible between versions, can be updated and updates can be uninstalled. Clients depend on a specific version of the library. SDK packages are not loaded automatically by the OS and rely e.g. on 3P libraries to make them available for the clients.
Value: 3TYPE_STATIC
static val TYPE_STATIC: Int
Shared library type: this library is not backwards -compatible, can be updated and updates can be uninstalled. Clients link against a specific version of the library. Static shared libraries simulate static linking while allowing for multiple clients to reuse the same instance of the library.
Value: 2VERSION_UNDEFINED
static val VERSION_UNDEFINED: Int
Constant for referring to an undefined version.
Value: -1Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
| Int | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0orandroid.os.Parcelable#CONTENTS_FILE_DESCRIPTOR | 
getCertDigests
fun getCertDigests(): MutableList<String!>
Gets the list of certificate digests for the shared library.
| Return | |
|---|---|
| MutableList<String!> | The list of certificate digests This value cannot be null. | 
getDeclaringPackage
fun getDeclaringPackage(): VersionedPackage
Gets the package that declares the library.
| Return | |
|---|---|
| VersionedPackage | The package declaring the library. This value cannot be null. | 
getDependentPackages
fun getDependentPackages(): MutableList<VersionedPackage!>
Gets the packages that depend on the library. NOTE: the list also contains the result of #getOptionalDependentPackages.
| Return | |
|---|---|
| MutableList<VersionedPackage!> | The dependent packages. This value cannot be null. | 
getLongVersion
fun getLongVersion(): Long
Gets the version of the library. For static libraries this is the declared version and for dynamic and builtin it is VERSION_UNDEFINED as these are not versioned.
| Return | |
|---|---|
| Long | The version. Value is -1 or greater | 
getName
fun getName(): String!
Gets the library name an app defines in its manifest to depend on the library.
| Return | |
|---|---|
| String! | The name. | 
getType
fun getType(): Int
Gets the type of this library.
| Return | |
|---|---|
| Int | The library type. Value is either 0or a combination ofandroid.content.pm.SharedLibraryInfo#TYPE_BUILTIN,android.content.pm.SharedLibraryInfo#TYPE_DYNAMIC,android.content.pm.SharedLibraryInfo#TYPE_STATIC, andandroid.content.pm.SharedLibraryInfo#TYPE_SDK_PACKAGE | 
getVersion
fungetVersion(): Int
Deprecated: Use getLongVersion() instead.
| Return | |
|---|---|
| Int | Value is -1 or greater | 
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
writeToParcel
fun writeToParcel(
: Parcel,
: Int
): Unit
| Parameters | |
|---|---|
| dest | The Parcel in which the object should be written. This value cannot be null. | 
| flags | Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
