|
|
|
|
@ -4,6 +4,7 @@ import android.Manifest; |
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
|
import android.app.Activity; |
|
|
|
|
import android.app.Dialog; |
|
|
|
|
import android.app.PictureInPictureUiState; |
|
|
|
|
import android.content.Intent; |
|
|
|
|
import android.content.pm.ActivityInfo; |
|
|
|
|
import android.content.res.Configuration; |
|
|
|
|
@ -26,6 +27,7 @@ import android.widget.TextView; |
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
import androidx.annotation.RequiresApi; |
|
|
|
|
import androidx.fragment.app.Fragment; |
|
|
|
|
import androidx.fragment.app.FragmentActivity; |
|
|
|
|
import androidx.lifecycle.Observer; |
|
|
|
|
@ -1500,8 +1502,18 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) { |
|
|
|
|
super.onPictureInPictureModeChanged(isInPictureInPictureMode); |
|
|
|
|
@RequiresApi(35) |
|
|
|
|
public void onPictureInPictureUiStateChanged(@NonNull PictureInPictureUiState pipState) { |
|
|
|
|
super.onPictureInPictureUiStateChanged(pipState); |
|
|
|
|
if (pipState.isTransitioningToPip()) { |
|
|
|
|
hideControl(); |
|
|
|
|
hideSheet(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, @NonNull Configuration newConfig) { |
|
|
|
|
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig); |
|
|
|
|
if (!isFullscreen()) setVideoView(isInPictureInPictureMode); |
|
|
|
|
if (isInPictureInPictureMode) { |
|
|
|
|
PlaybackService.start(mPlayers); |
|
|
|
|
|