Search in sources :

Example 1 with PictureInPictureParams

use of android.app.PictureInPictureParams in project Signal-Android by signalapp.

the class WebRtcCallActivity method enterPipModeIfPossible.

private boolean enterPipModeIfPossible() {
    if (viewModel.canEnterPipMode() && isSystemPipEnabledAndAvailable()) {
        PictureInPictureParams params = new PictureInPictureParams.Builder().setAspectRatio(new Rational(9, 16)).build();
        enterPictureInPictureMode(params);
        CallParticipantsListDialog.dismiss(getSupportFragmentManager());
        return true;
    }
    return false;
}
Also used : Rational(android.util.Rational) PictureInPictureParams(android.app.PictureInPictureParams)

Example 2 with PictureInPictureParams

use of android.app.PictureInPictureParams in project Camera-Roll-Android-App by kollerlukas.

the class VideoPlayerActivity method onPause.

@Override
protected void onPause() {
    super.onPause();
    if (player.getPlayWhenReady() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        PictureInPictureParams params = new PictureInPictureParams.Builder().build();
        enterPictureInPictureMode(params);
    }
}
Also used : PictureInPictureParams(android.app.PictureInPictureParams)

Example 3 with PictureInPictureParams

use of android.app.PictureInPictureParams in project Signal-Android by WhisperSystems.

the class WebRtcCallActivity method enterPipModeIfPossible.

private boolean enterPipModeIfPossible() {
    if (viewModel.canEnterPipMode() && isSystemPipEnabledAndAvailable()) {
        PictureInPictureParams params = new PictureInPictureParams.Builder().setAspectRatio(new Rational(9, 16)).build();
        enterPictureInPictureMode(params);
        CallParticipantsListDialog.dismiss(getSupportFragmentManager());
        return true;
    }
    return false;
}
Also used : Rational(android.util.Rational) PictureInPictureParams(android.app.PictureInPictureParams)

Aggregations

PictureInPictureParams (android.app.PictureInPictureParams)3 Rational (android.util.Rational)2