diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivityDelegate.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivityDelegate.java index 2fec9ac3b..3567a32af 100644 --- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivityDelegate.java +++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetActivityDelegate.java @@ -40,6 +40,15 @@ public class JitsiMeetActivityDelegate { private static PermissionListener permissionListener; private static Callback permissionsCallback; + /** + * Tells whether or not the permissions request is currently in progress. + * + * @return {@code true} if the permssions are being requested or {@code false} otherwise. + */ + static boolean arePermissionsBeingRequested() { + return permissionListener != null; + } + /** * {@link Activity} lifecycle method which should be called from * {@code Activity#onActivityResult} so we are notified about results of external intents diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java index d95b98927..c7f5f1ccd 100644 --- a/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java +++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetView.java @@ -123,6 +123,7 @@ public class JitsiMeetView extends BaseReactView { PictureInPictureModule.class); if (pipModule != null && PictureInPictureModule.isPictureInPictureSupported() + && !JitsiMeetActivityDelegate.arePermissionsBeingRequested() && this.url != null) { try { pipModule.enterPictureInPicture();