@@ -671,8 +671,7 @@ public void maybeShowErrorDialogOnDisconnect(Call call) {
671671 Log .d (this , "maybeShowErrorDialogOnDisconnect: Call=" + call );
672672
673673 if (!isFinishing () && call != null ) {
674- final int resId = getResIdForDisconnectCause (call .getDisconnectCause (),
675- call .getSuppServNotification ());
674+ final int resId = getResIdForDisconnectCause (call );
676675 if (resId != INVALID_RES_ID ) {
677676 showErrorDialog (resId );
678677 }
@@ -775,26 +774,18 @@ public void onCancel(DialogInterface dialog) {
775774 mDialog .show ();
776775 }
777776
778- private int getResIdForDisconnectCause (Call . DisconnectCause cause ,
779- Call . SsNotification notification ) {
777+ private int getResIdForDisconnectCause (Call call ) {
778+ Call . DisconnectCause cause = call . getDisconnectCause ();
780779 int resId = INVALID_RES_ID ;
781780
782781 if (cause == Call .DisconnectCause .INCOMING_MISSED ) {
783- // If the network sends SVC Notification then this dialog will be displayed
784- // in case of B when the incoming call at B is not answered and gets forwarded
785- // to C
786- if (notification != null && notification .notificationType == 1 &&
787- notification .code ==
788- Call .SsNotification .MT_CODE_ADDITIONAL_CALL_FORWARDED ) {
782+ if (call .wasAdditionalCallForwarded ()) {
789783 resId = R .string .callUnanswered_forwarded ;
790784 }
791785 } else if (cause == Call .DisconnectCause .CALL_BARRED ) {
792786 // When call is disconnected with this code then it can either be barring from
793787 // MO side or MT side.
794- // In MT case, if network sends SVC Notification then this dialog will be
795- // displayed when A is calling B & incoming is barred on B.
796- if (notification != null && notification .notificationType == 0 &&
797- notification .code == Call .SsNotification .MO_CODE_INCOMING_CALLS_BARRED ) {
788+ if (call .isRemoteIncomingCallBarringEnabled ()) {
798789 resId = R .string .callFailed_incoming_cb_enabled ;
799790 } else {
800791 resId = R .string .callFailed_cb_enabled ;
0 commit comments