summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/incallui/InCallActivity.java')
-rw-r--r--src/com/android/incallui/InCallActivity.java34
1 files changed, 7 insertions, 27 deletions
diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java
index 60410bd3..66e68308 100644
--- a/src/com/android/incallui/InCallActivity.java
+++ b/src/com/android/incallui/InCallActivity.java
@@ -416,12 +416,11 @@ public class InCallActivity extends Activity {
return super.dispatchPopulateAccessibilityEvent(event);
}
- public void maybeShowErrorDialogOnDisconnect(Call call) {
- Log.d(this, "maybeShowErrorDialogOnDisconnect: Call=" + call);
+ public void maybeShowErrorDialogOnDisconnect(Call.DisconnectCause cause) {
+ Log.d(this, "maybeShowErrorDialogOnDisconnect");
- if (!isFinishing() && call != null) {
- final int resId = getResIdForDisconnectCause(call.getDisconnectCause(),
- call.getSuppServNotification());
+ if (!isFinishing()) {
+ final int resId = getResIdForDisconnectCause(cause);
if (resId != INVALID_RES_ID) {
showErrorDialog(resId);
}
@@ -463,30 +462,11 @@ public class InCallActivity extends Activity {
mDialog.show();
}
- private int getResIdForDisconnectCause(Call.DisconnectCause cause,
- Call.SsNotification notification) {
+ private int getResIdForDisconnectCause(Call.DisconnectCause cause) {
int resId = INVALID_RES_ID;
- if (cause == Call.DisconnectCause.INCOMING_MISSED) {
- // If the network sends SVC Notification then this dialog will be displayed
- // in case of B when the incoming call at B is not answered and gets forwarded
- // to C
- if (notification != null && notification.notificationType == 1 &&
- notification.code ==
- Call.SsNotification.MT_CODE_ADDITIONAL_CALL_FORWARDED) {
- resId = R.string.callUnanswered_forwarded;
- }
- } else if (cause == Call.DisconnectCause.CALL_BARRED) {
- // When call is disconnected with this code then it can either be barring from
- // MO side or MT side.
- // In MT case, if network sends SVC Notification then this dialog will be
- // displayed when A is calling B & incoming is barred on B.
- if (notification != null && notification.notificationType == 0 &&
- notification.code == Call.SsNotification.MO_CODE_INCOMING_CALLS_BARRED) {
- resId = R.string.callFailed_incoming_cb_enabled;
- } else {
- resId = R.string.callFailed_cb_enabled;
- }
+ if (cause == Call.DisconnectCause.CALL_BARRED) {
+ resId = R.string.callFailed_cb_enabled;
} else if (cause == Call.DisconnectCause.FDN_BLOCKED) {
resId = R.string.callFailed_fdn_only;
} else if (cause == Call.DisconnectCause.CS_RESTRICTED) {