From c0d0810072f9afdffc4eb51e4d78b30879c2a6a7 Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Fri, 15 Aug 2014 15:57:23 -0700 Subject: Do not show error for a canceled call. Bug: 17067923 Change-Id: I89bcd3fd743da544957bc2af59126edf5a44548b --- InCallUI/src/com/android/incallui/CallList.java | 3 ++- InCallUI/src/com/android/incallui/InCallActivity.java | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java index 66103e6ff..59ac076dd 100644 --- a/InCallUI/src/com/android/incallui/CallList.java +++ b/InCallUI/src/com/android/incallui/CallList.java @@ -429,7 +429,8 @@ public class CallList implements InCallPhoneListener { break; case DisconnectCause.INCOMING_REJECTED: case DisconnectCause.INCOMING_MISSED: - // no delay for missed/rejected incoming calls + case DisconnectCause.OUTGOING_CANCELED: + // no delay for missed/rejected incoming calls and canceled outgoing calls. delay = 0; break; default: diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 1f7db588c..679c87c8d 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -657,12 +657,17 @@ public class InCallActivity extends Activity { case DisconnectCause.CS_RESTRICTED_NORMAL: return R.string.callFailed_dsac_restricted_normal; case DisconnectCause.OUTGOING_FAILURE: - case DisconnectCause.OUTGOING_CANCELED: // We couldn't successfully place the call; there was some // failure in the telephony layer. // TODO: Need UI spec for this failure case; for now just // show a generic error. return R.string.incall_error_call_failed; + case DisconnectCause.OUTGOING_CANCELED: + // We don't want to show any dialog for the canceled case since the call was + // either canceled by the user explicitly (end-call button pushed immediately) + // or some other app canceled the call and immediately issued a new CALL to + // replace it. + return INVALID_RES_ID; case DisconnectCause.POWER_OFF: // Radio is explictly powered off, presumably because the // device is in airplane mode. -- cgit v1.2.3