Do not crash when receiving video call on device w/o camera
Daniel Gultsch
created
Upon accepting a video call on a device that can not establish a video track on
its own (for example by not having a camera), displaying the video enable/disable
button would fail. This commit defaults this button to disabled.
@@ -393,7 +393,7 @@ public class WebRTCWrapper {
boolean isVideoEnabled() {
final VideoTrack videoTrack = this.localVideoTrack;
if (videoTrack == null) {
- throw new IllegalStateException("Local video track does not exist");
+ return false;
}
return videoTrack.enabled();
}
@@ -961,4 +961,5 @@
<string name="server_does_not_support_easy_onboarding_invites">Server does not support generating invites</string>
<string name="no_active_accounts_support_this">No active accounts support this feature</string>
<string name="backup_started_message">The backup has been started. You’ll get a notification once it has been completed.</string>
+ <string name="unable_to_enable_video">Unable to enable video.</string>
</resources>