android: throw if Activity doesn't implement the required interface

This commit is contained in:
Saúl Ibarra Corretgé 2018-12-04 14:37:07 +01:00 committed by Saúl Ibarra Corretgé
parent 47830dfc3d
commit 0c3d037cb5
1 changed files with 6 additions and 0 deletions

View File

@ -109,6 +109,12 @@ public class JitsiMeetView
// The entry point into the invite feature of Jitsi Meet. The Java // The entry point into the invite feature of Jitsi Meet. The Java
// counterpart of the JavaScript InviteButton. // counterpart of the JavaScript InviteButton.
inviteController = new InviteController(externalAPIScope); inviteController = new InviteController(externalAPIScope);
// Check if the parent Activity implements JitsiMeetActivityInterface,
// otherwise things may go wrong.
if (!(context instanceof JitsiMeetActivityInterface)) {
throw new RuntimeException("Enclosing Activity must implement JitsiMeetActivityInterface");
}
} }
/** /**