README.txt
1 There are two libraries defined in this directory:
2 First, com.android.mediadrm.signer.jar is a shared java library
3 containing classes required by unbundled apps running on devices that use
4 the certficate provisioning and private key signing capabilities provided
5 by the MediaDrm API.
6 Second, com.android.mediadrm.signer.stubs.jar is a stub for the shared library
7 which provides build-time APIs to the unbundled clients.
8
9 At 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
11 parent classloader, regardless of whether the stub library is linked to the
12 app statically or dynamically, the real classes are loaded from the shared
13 library.
14
15 --- Rules of this library ---
16 o 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.
20 o 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
24 This library is distributed in the system image, and loaded as
25 a shared library. So you can change the implementation, but not
26 the interface. In this way it is like framework.jar.
27
28 --- Why does this library exist? ---
29
30 Unbundled apps cannot use internal platform classes.
31
32 This library will eventually be replaced when the provisioned certificate-
33 based signing infrastructure that is currently defined in the support library
34 is reintegrated with the framework in a new API. That API isn't ready yet so
35 this library is a compromise to make new capabilities available to the system
36 without exposing the full surface area of the support library.
37
38