Fix switching to main player when MainActivity is closed

This commit is contained in:
Stypox 2020-11-02 18:06:14 +01:00
parent 2379041125
commit 265896a07e
4 changed files with 18 additions and 4 deletions

View file

@ -30,6 +30,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import org.schabi.newpipe.R;
@ -231,6 +232,7 @@ public final class MainPlayer extends Service {
return metrics.heightPixels < metrics.widthPixels;
}
@Nullable
public View getView() {
if (playerImpl == null) {
return null;