mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Cleanup deprecated SimpleExoPlayerView and PlaybackControlView
PiperOrigin-RevId: 318152038
This commit is contained in:
parent
d0309b3798
commit
d5f029315c
4 changed files with 3 additions and 113 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue