Fix link-type check warning on com.android.media.remotedisplay

The library has been built without SDK, and is used by an app
RemoteDisplayProviderTest that is built with SDK. Such this SDK ->
non-SDK dependency has been causing link-type check warnings, which will
turn into errors soon.

This change fixes the warning by making a stub library
com.android.media.remotedisplay.stubs from the runtime library and let the app
to link against the stub library. Since the stubs library does not use any
private APIs, it is built with SDK.

Bug: 69899800
Test: m -j RemoteDisplayProviderTest is successful and does not show any
link-type check warning.

Change-Id: I7ee297a9d1aa4f01136b9a026a4939df2d483b8c
diff --git a/media/lib/remotedisplay/README.txt b/media/lib/remotedisplay/README.txt
index 5738dbe..1a52c4d 100644
--- a/media/lib/remotedisplay/README.txt
+++ b/media/lib/remotedisplay/README.txt
@@ -1,8 +1,17 @@
-This library (com.android.media.remotedisplay.jar) is a shared java library
+There are two libraries defined in this directory:
+First, com.android.media.remotedisplay.jar is a shared java library
 containing classes required by unbundled remote display providers.
+Second, com.android.media.remotedisplay.stubs.jar is a stub for the shared
+library which provides build-time APIs to the unbundled clients.
+
+At runtime, the shared library is added to the classloader of the app via the
+<uses-library> tag. And since Java always tries to load a class from the
+parent classloader, regardless of whether the stub library is linked to the
+app statically or dynamically, the real classes are loaded from the shared
+library.
 
 --- Rules of this library ---
-o This library is effectively a PUBLIC API for unbundled remote display providers
+o The stub library is effectively a PUBLIC API for unbundled remote display providers
   that may be distributed outside the system image. So it MUST BE API STABLE.
   You can add but not remove. The rules are the same as for the
   public platform SDK API.