Show error message only once - if the error is not handled, simply show "Unknown error: {error_reason}"
Revert "Display a toast in case of call error"
This reverts commit 63198bc591
.
Conflicts:
src/org/linphone/LinphoneManager.java
This commit is contained in:
parent
da1d109458
commit
36c23ce372
3 changed files with 46 additions and 48 deletions
|
@ -367,6 +367,7 @@
|
||||||
<string name="pref_sipinfo_dtmf">Send SIP INFO DTMFs</string>
|
<string name="pref_sipinfo_dtmf">Send SIP INFO DTMFs</string>
|
||||||
<string name="pref_voice_mail">Voice mail uri</string>
|
<string name="pref_voice_mail">Voice mail uri</string>
|
||||||
<string name="voicemail_unread"> unread messages</string>
|
<string name="voicemail_unread"> unread messages</string>
|
||||||
|
<string name="error_unknown">Unknown error</string>
|
||||||
<string name="error_call_declined">Call declined</string>
|
<string name="error_call_declined">Call declined</string>
|
||||||
<string name="error_user_not_found">User not found</string>
|
<string name="error_user_not_found">User not found</string>
|
||||||
<string name="error_incompatible_media">Incompatible media parameters</string>
|
<string name="error_incompatible_media">Incompatible media parameters</string>
|
||||||
|
|
|
@ -208,6 +208,8 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
||||||
displayCustomToast(getString(R.string.error_user_not_found), Toast.LENGTH_LONG);
|
displayCustomToast(getString(R.string.error_user_not_found), Toast.LENGTH_LONG);
|
||||||
} else if (message != null && message.equals("Unsupported media type")) {
|
} else if (message != null && message.equals("Unsupported media type")) {
|
||||||
displayCustomToast(getString(R.string.error_incompatible_media), Toast.LENGTH_LONG);
|
displayCustomToast(getString(R.string.error_incompatible_media), Toast.LENGTH_LONG);
|
||||||
|
} else if (message != null && state == State.Error) {
|
||||||
|
displayCustomToast(getString(R.string.error_unknown) + " - " + message, Toast.LENGTH_LONG);
|
||||||
}
|
}
|
||||||
resetClassicMenuLayoutAndGoBackToCallIfStillRunning();
|
resetClassicMenuLayoutAndGoBackToCallIfStillRunning();
|
||||||
}
|
}
|
||||||
|
|
|
@ -848,11 +848,6 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give user some hint about the error...
|
|
||||||
if (state == State.Error && LinphoneActivity.isInstanciated() ) {
|
|
||||||
LinphoneActivity.instance().displayCustomToast("Call errored: " + message, Toast.LENGTH_LONG);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == State.CallEnd) {
|
if (state == State.CallEnd) {
|
||||||
|
|
Loading…
Reference in a new issue