Loading api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -26899,7 +26899,6 @@ package android.media { method public final void notifyRequestFailed(long, int); method public final void notifyRoutes(@NonNull java.util.Collection<android.media.MediaRoute2Info>); method public final void notifySessionCreated(@NonNull android.media.RoutingSessionInfo, long); method public final void notifySessionCreationFailed(long); method public final void notifySessionReleased(@NonNull String); method public final void notifySessionUpdated(@NonNull android.media.RoutingSessionInfo); method @CallSuper @Nullable public android.os.IBinder onBind(@NonNull android.content.Intent); media/java/android/media/IMediaRoute2ProviderServiceCallback.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ oneway interface IMediaRoute2ProviderServiceCallback { // TODO: Change it to updateRoutes? void updateState(in MediaRoute2ProviderInfo providerInfo); void notifySessionCreated(in RoutingSessionInfo sessionInfo, long requestId); void notifySessionCreationFailed(long requestId); void notifySessionUpdated(in RoutingSessionInfo sessionInfo); void notifySessionReleased(in RoutingSessionInfo sessionInfo); void notifyRequestFailed(long requestId, int reason); Loading media/java/android/media/MediaRoute2ProviderService.java +2 −19 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ public abstract class MediaRoute2ProviderService extends Service { String sessionId = sessionInfo.getId(); synchronized (mSessionLock) { if (mSessionInfo.containsKey(sessionId)) { // TODO: Notify failure to the requester, and throw exception if needed. Log.w(TAG, "Ignoring duplicate session id."); return; } Loading @@ -252,24 +253,6 @@ public abstract class MediaRoute2ProviderService extends Service { } } /** * Notifies clients of that the session could not be created. * * @param requestId id of the previous request to create the session provided in * {@link #onCreateSession(long, String, String, Bundle)}. * @see #onCreateSession(long, String, String, Bundle) */ public final void notifySessionCreationFailed(long requestId) { if (mRemoteCallback == null) { return; } try { mRemoteCallback.notifySessionCreationFailed(requestId); } catch (RemoteException ex) { Log.w(TAG, "Failed to notify session creation failed."); } } /** * Notifies the existing session is updated. For example, when * {@link RoutingSessionInfo#getSelectedRoutes() selected routes} are changed. Loading Loading @@ -364,7 +347,7 @@ public abstract class MediaRoute2ProviderService extends Service { * {@link Bundle} which contains how to control the session. * <p> * If you can't create the session or want to reject the request, call * {@link #notifySessionCreationFailed(long)} with the given {@code requestId}. * {@link #notifyRequestFailed(long, int)} with the given {@code requestId}. * * @param requestId the id of this request * @param packageName the package name of the application that selected the route Loading media/tests/MediaRouter/src/com/android/mediaroutertest/SampleMediaRoute2ProviderService.java +1 −2 Original line number Diff line number Diff line Loading @@ -216,8 +216,7 @@ public class SampleMediaRoute2ProviderService extends MediaRoute2ProviderService @Nullable Bundle sessionHints) { MediaRoute2Info route = mRoutes.get(routeId); if (route == null || TextUtils.equals(ROUTE_ID3_SESSION_CREATION_FAILED, routeId)) { // Tell the router that session cannot be created by passing null as sessionInfo. notifySessionCreationFailed(requestId); notifyRequestFailed(requestId, REASON_UNKNOWN_ERROR); return; } maybeDeselectRoute(routeId); Loading services/core/java/com/android/server/media/MediaRoute2Provider.java +0 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,6 @@ abstract class MediaRoute2Provider { void onProviderStateChanged(@Nullable MediaRoute2Provider provider); void onSessionCreated(@NonNull MediaRoute2Provider provider, @Nullable RoutingSessionInfo sessionInfo, long requestId); void onSessionCreationFailed(@NonNull MediaRoute2Provider provider, long requestId); void onSessionUpdated(@NonNull MediaRoute2Provider provider, @NonNull RoutingSessionInfo sessionInfo); void onSessionReleased(@NonNull MediaRoute2Provider provider, Loading Loading
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -26899,7 +26899,6 @@ package android.media { method public final void notifyRequestFailed(long, int); method public final void notifyRoutes(@NonNull java.util.Collection<android.media.MediaRoute2Info>); method public final void notifySessionCreated(@NonNull android.media.RoutingSessionInfo, long); method public final void notifySessionCreationFailed(long); method public final void notifySessionReleased(@NonNull String); method public final void notifySessionUpdated(@NonNull android.media.RoutingSessionInfo); method @CallSuper @Nullable public android.os.IBinder onBind(@NonNull android.content.Intent);
media/java/android/media/IMediaRoute2ProviderServiceCallback.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ oneway interface IMediaRoute2ProviderServiceCallback { // TODO: Change it to updateRoutes? void updateState(in MediaRoute2ProviderInfo providerInfo); void notifySessionCreated(in RoutingSessionInfo sessionInfo, long requestId); void notifySessionCreationFailed(long requestId); void notifySessionUpdated(in RoutingSessionInfo sessionInfo); void notifySessionReleased(in RoutingSessionInfo sessionInfo); void notifyRequestFailed(long requestId, int reason); Loading
media/java/android/media/MediaRoute2ProviderService.java +2 −19 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ public abstract class MediaRoute2ProviderService extends Service { String sessionId = sessionInfo.getId(); synchronized (mSessionLock) { if (mSessionInfo.containsKey(sessionId)) { // TODO: Notify failure to the requester, and throw exception if needed. Log.w(TAG, "Ignoring duplicate session id."); return; } Loading @@ -252,24 +253,6 @@ public abstract class MediaRoute2ProviderService extends Service { } } /** * Notifies clients of that the session could not be created. * * @param requestId id of the previous request to create the session provided in * {@link #onCreateSession(long, String, String, Bundle)}. * @see #onCreateSession(long, String, String, Bundle) */ public final void notifySessionCreationFailed(long requestId) { if (mRemoteCallback == null) { return; } try { mRemoteCallback.notifySessionCreationFailed(requestId); } catch (RemoteException ex) { Log.w(TAG, "Failed to notify session creation failed."); } } /** * Notifies the existing session is updated. For example, when * {@link RoutingSessionInfo#getSelectedRoutes() selected routes} are changed. Loading Loading @@ -364,7 +347,7 @@ public abstract class MediaRoute2ProviderService extends Service { * {@link Bundle} which contains how to control the session. * <p> * If you can't create the session or want to reject the request, call * {@link #notifySessionCreationFailed(long)} with the given {@code requestId}. * {@link #notifyRequestFailed(long, int)} with the given {@code requestId}. * * @param requestId the id of this request * @param packageName the package name of the application that selected the route Loading
media/tests/MediaRouter/src/com/android/mediaroutertest/SampleMediaRoute2ProviderService.java +1 −2 Original line number Diff line number Diff line Loading @@ -216,8 +216,7 @@ public class SampleMediaRoute2ProviderService extends MediaRoute2ProviderService @Nullable Bundle sessionHints) { MediaRoute2Info route = mRoutes.get(routeId); if (route == null || TextUtils.equals(ROUTE_ID3_SESSION_CREATION_FAILED, routeId)) { // Tell the router that session cannot be created by passing null as sessionInfo. notifySessionCreationFailed(requestId); notifyRequestFailed(requestId, REASON_UNKNOWN_ERROR); return; } maybeDeselectRoute(routeId); Loading
services/core/java/com/android/server/media/MediaRoute2Provider.java +0 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,6 @@ abstract class MediaRoute2Provider { void onProviderStateChanged(@Nullable MediaRoute2Provider provider); void onSessionCreated(@NonNull MediaRoute2Provider provider, @Nullable RoutingSessionInfo sessionInfo, long requestId); void onSessionCreationFailed(@NonNull MediaRoute2Provider provider, long requestId); void onSessionUpdated(@NonNull MediaRoute2Provider provider, @NonNull RoutingSessionInfo sessionInfo); void onSessionReleased(@NonNull MediaRoute2Provider provider, Loading