• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1There are two libraries defined in this directory:
2First, com.android.mediadrm.signer.jar is a shared java library
3containing classes required by unbundled apps running on devices that use
4the certficate provisioning and private key signing capabilities provided
5by the MediaDrm API.
6Second, com.android.mediadrm.signer.stubs.jar is a stub for the shared library
7which provides build-time APIs to the unbundled clients.
8
9At runtime, the shared library is added to the classloader of the app via the
10<uses-library> tag. And since Java always tries to load a class from the
11parent classloader, regardless of whether the stub library is linked to the
12app statically or dynamically, the real classes are loaded from the shared
13library.
14
15--- Rules of this library ---
16o The stub library is effectively a PUBLIC API for unbundled CAST receivers
17  that may be distributed outside the system image. So it MUST BE API STABLE.
18  You can add but not remove. The rules are the same as for the
19  public platform SDK API.
20o This library can see and instantiate internal platform classes, but it must not
21  expose them in any public method (or by extending them via inheritance). This would
22  break clients of the library because they cannot see the internal platform classes.
23
24This library is distributed in the system image, and loaded as
25a shared library. So you can change the implementation, but not
26the interface. In this way it is like framework.jar.
27
28--- Why does this library exist? ---
29
30Unbundled apps cannot use internal platform classes.
31
32This library will eventually be replaced when the provisioned certificate-
33based signing infrastructure that is currently defined in the support library
34is reintegrated with the framework in a new API.  That API isn't ready yet so
35this library is a compromise to make new capabilities available to the system
36without exposing the full surface area of the support library.
37
38