diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 1b3ac65ec8..68f86832c5 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -196,6 +196,7 @@ * Upgrade Truth dependency from 0.44 to 1.0. * Upgrade to JUnit 4.13-rc-2. * UI + * Remove `SimpleExoPlayerView` and `PlaybackControlView`. * Remove deperecated `exo_simple_player_view.xml` and `exo_playback_control_view.xml` from resource. * Add setter methods to `PlayerView` and `PlayerControlView` to set diff --git a/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java b/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java index 884b811664..0ab527ad58 100644 --- a/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java +++ b/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java @@ -276,14 +276,14 @@ public class PlayerActivity extends AppCompatActivity } } - // PlaybackControlView.PlaybackPreparer implementation + // PlaybackPreparer implementation @Override public void preparePlayback() { player.prepare(); } - // PlaybackControlView.VisibilityListener implementation + // PlayerControlView.VisibilityListener implementation @Override public void onVisibilityChange(int visibility) { diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java deleted file mode 100644 index 47d60e0233..0000000000 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlaybackControlView.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.android.exoplayer2.ui; - -import android.content.Context; -import android.util.AttributeSet; - -/** @deprecated Use {@link PlayerControlView}. */ -@Deprecated -public class PlaybackControlView extends PlayerControlView { - - /** @deprecated Use {@link com.google.android.exoplayer2.ControlDispatcher}. */ - @Deprecated - public interface ControlDispatcher extends com.google.android.exoplayer2.ControlDispatcher {} - - @Deprecated - @SuppressWarnings("deprecation") - private static final class DefaultControlDispatcher - extends com.google.android.exoplayer2.DefaultControlDispatcher implements ControlDispatcher {} - /** @deprecated Use {@link com.google.android.exoplayer2.DefaultControlDispatcher}. */ - @Deprecated - @SuppressWarnings("deprecation") - public static final ControlDispatcher DEFAULT_CONTROL_DISPATCHER = new DefaultControlDispatcher(); - - public PlaybackControlView(Context context) { - super(context); - } - - public PlaybackControlView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public PlaybackControlView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public PlaybackControlView( - Context context, AttributeSet attrs, int defStyleAttr, AttributeSet playbackAttrs) { - super(context, attrs, defStyleAttr, playbackAttrs); - } -} diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java deleted file mode 100644 index fae3382a32..0000000000 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.android.exoplayer2.ui; - -import android.content.Context; -import android.util.AttributeSet; -import androidx.annotation.Nullable; -import com.google.android.exoplayer2.Player; -import com.google.android.exoplayer2.SimpleExoPlayer; - -/** @deprecated Use {@link PlayerView}. */ -@Deprecated -public final class SimpleExoPlayerView extends PlayerView { - - public SimpleExoPlayerView(Context context) { - super(context); - } - - public SimpleExoPlayerView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public SimpleExoPlayerView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - /** - * Switches the view targeted by a given {@link SimpleExoPlayer}. - * - * @param player The player whose target view is being switched. - * @param oldPlayerView The old view to detach from the player. - * @param newPlayerView The new view to attach to the player. - * @deprecated Use {@link PlayerView#switchTargetView(Player, PlayerView, PlayerView)} instead. - */ - @Deprecated - @SuppressWarnings("deprecation") - public static void switchTargetView( - SimpleExoPlayer player, - @Nullable SimpleExoPlayerView oldPlayerView, - @Nullable SimpleExoPlayerView newPlayerView) { - PlayerView.switchTargetView(player, oldPlayerView, newPlayerView); - } - -}