diff options
| author | Danny Baumann <dannybaumann@web.de> | 2014-08-10 13:23:55 +0200 |
|---|---|---|
| committer | Danny Baumann <dannybaumann@web.de> | 2014-08-19 17:35:26 +0200 |
| commit | fe7947b5c1b36b0f9f7ae83a44bf93e1502dfdef (patch) | |
| tree | 2fab5aa196e736d0a714d792242eb60fa2180fc7 /src | |
| parent | 1e5ab915ecab69685329fe203f6f3ef90e5aa5c6 (diff) | |
| download | packages_apps_InCallUI-fe7947b5c1b36b0f9f7ae83a44bf93e1502dfdef.tar.gz packages_apps_InCallUI-fe7947b5c1b36b0f9f7ae83a44bf93e1502dfdef.tar.bz2 packages_apps_InCallUI-fe7947b5c1b36b0f9f7ae83a44bf93e1502dfdef.zip | |
Cleanup and fix CAF SSN handling code.
Use boolean flags in the call object instead of parsing supplementary
service notification objects.
Change-Id: I62828eac871453bf485e23c6455ccd85574da718
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/incallui/InCallActivity.java | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java index 56ad26da..1541de83 100644 --- a/src/com/android/incallui/InCallActivity.java +++ b/src/com/android/incallui/InCallActivity.java @@ -671,8 +671,7 @@ public class InCallActivity extends Activity { Log.d(this, "maybeShowErrorDialogOnDisconnect: Call=" + call); if (!isFinishing() && call != null) { - final int resId = getResIdForDisconnectCause(call.getDisconnectCause(), - call.getSuppServNotification()); + final int resId = getResIdForDisconnectCause(call); if (resId != INVALID_RES_ID) { showErrorDialog(resId); } @@ -775,26 +774,18 @@ public class InCallActivity extends Activity { mDialog.show(); } - private int getResIdForDisconnectCause(Call.DisconnectCause cause, - Call.SsNotification notification) { + private int getResIdForDisconnectCause(Call call) { + Call.DisconnectCause cause = call.getDisconnectCause(); 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) { + if (call.wasAdditionalCallForwarded()) { 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) { + if (call.isRemoteIncomingCallBarringEnabled()) { resId = R.string.callFailed_incoming_cb_enabled; } else { resId = R.string.callFailed_cb_enabled; |
