2017-10-03 08:38:46 +02:00
|
|
|
package org.schabi.newpipe.player;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
import org.schabi.newpipe.R;
|
|
|
|
|
2017-10-13 03:22:25 +02:00
|
|
|
public final class BackgroundPlayerActivity extends ServicePlayerActivity {
|
2017-10-03 08:38:46 +02:00
|
|
|
|
2017-10-29 02:18:40 +01:00
|
|
|
private static final String TAG = "BackgroundPlayerActivity";
|
2017-10-03 08:38:46 +02:00
|
|
|
|
|
|
|
@Override
|
2017-10-13 03:22:25 +02:00
|
|
|
public String getTag() {
|
|
|
|
return TAG;
|
2017-10-03 08:38:46 +02:00
|
|
|
}
|
|
|
|
|
2017-10-12 06:16:28 +02:00
|
|
|
@Override
|
2017-10-13 03:22:25 +02:00
|
|
|
public String getSupportActionTitle() {
|
|
|
|
return getResources().getString(R.string.title_activity_background_player);
|
2017-10-12 06:16:28 +02:00
|
|
|
}
|
|
|
|
|
2017-10-03 08:38:46 +02:00
|
|
|
@Override
|
2017-10-13 03:22:25 +02:00
|
|
|
public Intent getBindIntent() {
|
|
|
|
return new Intent(this, BackgroundPlayer.class);
|
2017-10-13 02:02:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-10-13 03:22:25 +02:00
|
|
|
public void startPlayerListener() {
|
|
|
|
if (player != null && player instanceof BackgroundPlayer.BasePlayerImpl) {
|
|
|
|
((BackgroundPlayer.BasePlayerImpl) player).setActivityListener(this);
|
2017-10-13 02:02:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2017-10-13 03:22:25 +02:00
|
|
|
public void stopPlayerListener() {
|
|
|
|
if (player != null && player instanceof BackgroundPlayer.BasePlayerImpl) {
|
|
|
|
((BackgroundPlayer.BasePlayerImpl) player).removeActivityListener(this);
|
2017-10-03 08:38:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|