mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 19:26:17 +00:00
Fix case where device lied about pip mode support.
This commit is contained in:
committed by
Greyson Parrelli
parent
aff5c2aa16
commit
ea6d1a9381
@@ -35,6 +35,7 @@ import android.view.WindowManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.util.Consumer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
@@ -279,7 +280,13 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||
private boolean enterPipModeIfPossible() {
|
||||
if (isSystemPipEnabledAndAvailable()) {
|
||||
if (viewModel.canEnterPipMode()) {
|
||||
enterPictureInPictureMode(pipBuilderParams.build());
|
||||
try {
|
||||
enterPictureInPictureMode(pipBuilderParams.build());
|
||||
} catch (IllegalStateException e) {
|
||||
Log.w(TAG, "Device lied to us about supporting PiP.", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
CallParticipantsListDialog.dismiss(getSupportFragmentManager());
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user