Fix crash when handling call messaging failures.

This commit is contained in:
Cody Henthorne
2020-11-05 15:56:56 -05:00
committed by GitHub
parent 2b4a4d6109
commit 349a2f72cb
6 changed files with 61 additions and 22 deletions

View File

@@ -35,7 +35,14 @@ public class WebRtcViewModel {
// Multiring Hangup States
CALL_ACCEPTED_ELSEWHERE,
CALL_DECLINED_ELSEWHERE,
CALL_ONGOING_ELSEWHERE
CALL_ONGOING_ELSEWHERE;
public boolean isErrorState() {
return this == NETWORK_FAILURE ||
this == RECIPIENT_UNAVAILABLE ||
this == NO_SUCH_USER ||
this == UNTRUSTED_IDENTITY;
}
}
private final @NonNull State state;