Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / aosp-stubs / src / main / java / com / android / media / remotedisplay / RemoteDisplayProvider.java
RemoteDisplayProvider.java68 lines · 2.2 KiBRaw
| 1 | package com.android.media.remotedisplay; |
| 2 | |
| 3 | import android.content.Context; |
| 4 | import android.os.IBinder; |
| 5 | |
| 6 | import java.util.Collection; |
| 7 | import java.util.Collections; |
| 8 | |
| 9 | /** |
| 10 | * Compile-only stub of {@code com.android.media.remotedisplay.RemoteDisplayProvider}. |
| 11 | * Not packaged; the real class comes from the {@code com.android.media.remotedisplay} |
| 12 | * shared library, which the app pulls in with {@code <uses-library>}. |
| 13 | * |
| 14 | * <p>{@code RemoteDisplayProviderWatcher} in system_server binds a service exporting |
| 15 | * {@link #SERVICE_INTERFACE} and drives it through this surface: the callbacks are how |
| 16 | * the system asks for discovery and for a connection, and {@link #addDisplay} and |
| 17 | * friends are how routes get back to {@code MediaRouter}. |
| 18 | * |
| 19 | * <p>The callbacks are declared concrete rather than abstract, matching AOSP - a provider that does |
| 20 | * not do volume, for instance, simply does not override those. The class has no abstract members at |
| 21 | * all, so a subclass cannot miss one. |
| 22 | * |
| 23 | * <p>Verified against frameworks/base/media/lib/remotedisplay/.../RemoteDisplayProvider.java and |
| 24 | * the {@code DISCOVERY_MODE_*} values in |
| 25 | * frameworks/base/media/java/android/media/RemoteDisplayState.java. |
| 26 | */ |
| 27 | public abstract class RemoteDisplayProvider { |
| 28 | public static final String SERVICE_INTERFACE = |
| 29 | "com.android.media.remotedisplay.RemoteDisplayProvider"; |
| 30 | |
| 31 | public static final int DISCOVERY_MODE_NONE = 0; |
| 32 | public static final int DISCOVERY_MODE_PASSIVE = 1; |
| 33 | public static final int DISCOVERY_MODE_ACTIVE = 2; |
| 34 | |
| 35 | public RemoteDisplayProvider(Context context) {} |
| 36 | |
| 37 | public final Context getContext() { |
| 38 | return null; |
| 39 | } |
| 40 | |
| 41 | public IBinder getBinder() { |
| 42 | return null; |
| 43 | } |
| 44 | |
| 45 | public int getDiscoveryMode() { |
| 46 | return DISCOVERY_MODE_NONE; |
| 47 | } |
| 48 | |
| 49 | public Collection<RemoteDisplay> getDisplays() { |
| 50 | return Collections.emptyList(); |
| 51 | } |
| 52 | |
| 53 | public RemoteDisplay findRemoteDisplay(String id) { |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | public void addDisplay(RemoteDisplay display) {} |
| 58 | |
| 59 | public void updateDisplay(RemoteDisplay display) {} |
| 60 | |
| 61 | public void removeDisplay(RemoteDisplay display) {} |
| 62 | |
| 63 | public void onDiscoveryModeChanged(int mode) {} |
| 64 | |
| 65 | public void onConnect(RemoteDisplay display) {} |
| 66 | |
| 67 | public void onDisconnect(RemoteDisplay display) {} |
| 68 | } |