Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb8e914e authored by Jaewan Kim's avatar Jaewan Kim Committed by Android (Google) Code Review
Browse files

Merge "MediaSession2: Remove MediaSession2#registerPlayerEventCallback()" into pi-dev

parents 9cc14485 8e17db55
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -1616,35 +1616,6 @@ public class MediaSession2 implements AutoCloseable {
        mProvider.notifyError_impl(errorCode, extras);
    }

    /**
     * Register {@link PlayerEventCallback} to listen changes in the underlying
     * {@link MediaPlayerBase}, regardless of the change in the underlying player.
     * <p>
     * Registered callbacks will be also called when the underlying player is changed.
     *
     * @param executor a callback Executor
     * @param callback a EventCallback
     * @throws IllegalArgumentException if executor or callback is {@code null}.
     * @hide
     */
    // TODO(jaewan): Remove (b/74157064)
    public void registerPlayerEventCallback(@NonNull @CallbackExecutor Executor executor,
            @NonNull PlayerEventCallback callback) {
        mProvider.registerPlayerEventCallback_impl(executor, callback);
    }

    /**
     * Unregister the previously registered {@link PlayerEventCallback}.
     *
     * @param callback the callback to be removed
     * @throws IllegalArgumentException if the callback is {@code null}.
     * @hide
     */
    // TODO(jaewan): Remove (b/74157064)
    public void unregisterPlayerEventCallback(@NonNull PlayerEventCallback callback) {
        mProvider.unregisterPlayerEventCallback_impl(callback);
    }

    /**
     * Get the player state.
     *
+0 −2
Original line number Diff line number Diff line
@@ -68,8 +68,6 @@ public interface MediaSession2Provider extends TransportControlProvider {
    void setPlaylistParams_impl(PlaylistParams params);
    PlaylistParams getPlaylistParams_impl();
    void notifyError_impl(int errorCode, Bundle extras);
    void registerPlayerEventCallback_impl(Executor executor, PlayerEventCallback callback);
    void unregisterPlayerEventCallback_impl(PlayerEventCallback callback);

    interface CommandProvider {
        int getCommandCode_impl();