History log of /frameworks/base/core/java/android/content/pm/SharedLibraryInfo.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e6b4614d88c04a3b3fb0497b5e8f6b4c359f6f2d 01-May-2017 Svetoslav Ganov <svetoslavganov@google.com> Addess API council comments

Test: manual

bug:37322491

Change-Id: I2017e667c5452c7ef7c56ec19c594e685700b33a
/frameworks/base/core/java/android/content/pm/SharedLibraryInfo.java
0cb43ef67b5d284f6c0afbca5a50e189355c0ab3 18-Apr-2017 Svetoslav Ganov <svetoslavganov@google.com> Address API council comments

Test: all static shared lib CTS tests pass

bug:37327970

Change-Id: Ie8c4d853da5fa0a6125b9def38831860f79ce53d
/frameworks/base/core/java/android/content/pm/SharedLibraryInfo.java
6788212d17f54475ca9c3dd689a863e031db868f 12-Dec-2016 Svet Ganov <svetoslavganov@google.com> Platform support for static shared libraries

This change adds support for static shared libraries that
emulate static linking allowing apps that statically link
against the same library version to share a common
implementation. A library is hosed by a package in a standard
APK.

Static shared libraries have a name and a version declared
by a dedicated manifest tag. A client uses also a new tag
to refer to the static library it uses by specifying the
lib name, version, and the hash of the signing certificate.
This allows two apps to rely on two different library versions
and prevents impersonation of the shared library by a side-loaded
app with the same package name.

Internally apps providing static libs use synthetic package
name generated from the manifest package name and the library
version. This allows having different "versions" of the same
package installed at the same time.

An application cannot be installed if a static shared lib it
depends on is missing. A used shared library cannot be uninstalled.
Shared libraries can rotate certificates like normal apps. The
versions of these libs should be ordered similarly to the version
codes of the hosting package. Such libs cannot use shared user
id, cannot be ephemeral, cannot declare other libraries, cannot
rename their package, cannot declare child-packages. They must
target O SDK. Also they cannot be suspended or hidden or their
uninstall blocked. Generally, speaking policy regarding code in
static shared libs should be applied to the packages using the
library as it could have just statically linked the code.

We now have APIs to query information about the shared libraries
on the device in general. To clients static shared libraries are
presented as multiple versions of the same package which is how
they are declared and published. Therefore, one can have two
versions of the same package which means we need way to query
for and uninstall a specific version of a package. Also static
shared libs can depend on other static shared libs which are
versioned packages. To ease representation we add the concept
of a versioned package which should be used in the case of
static shared libs.

A client can see only the static shared libs it depends on and
more specifically only the versions it depends would be retrieved
by using the standard package manager APIs. There is a new
dedicated API to get info about all shared libraries which
would provide data about all static shared lib versions. Also
these libraries must use v2 signing scheme.

Test: CTS tests pass

bug:30974070

Change-Id: I4f3d537ee7a81f880950377b996e1d9d4813da5c
/frameworks/base/core/java/android/content/pm/SharedLibraryInfo.java