diff options
| author | Ravindra <c_rthat@codeaurora.org> | 2014-02-11 15:47:01 +0530 |
|---|---|---|
| committer | Ravindra <c_rthat@codeaurora.org> | 2014-02-13 13:00:40 +0530 |
| commit | db38496569861eb538710d159b645232f17c72d7 (patch) | |
| tree | 6219a02a4e14e7716e8bad199425017e7ac72a22 /src | |
| parent | 0ee8c61e84e0ac5a6eb91d25a76e63a7f8b5abf7 (diff) | |
| download | packages_apps_InCallUI-db38496569861eb538710d159b645232f17c72d7.tar.gz packages_apps_InCallUI-db38496569861eb538710d159b645232f17c72d7.tar.bz2 packages_apps_InCallUI-db38496569861eb538710d159b645232f17c72d7.zip | |
Display Conference call Failure to the user
When CallModeler receives SUPP_SERVICE_FAILED event
after RIL reports failure for any of the supplementary
service,User will be informed with a Error Dialog Message.
Currently,there is no indication presented to user when a
supplementary service operations fails.
Change-Id: If3bda2348468c9fb9230a5cc569a7015556a446e
CRs-Fixed: 610064
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/incallui/CallHandlerService.java | 12 | ||||
| -rw-r--r-- | src/com/android/incallui/InCallActivity.java | 57 | ||||
| -rw-r--r-- | src/com/android/incallui/InCallPresenter.java | 6 |
3 files changed, 74 insertions, 1 deletions
diff --git a/src/com/android/incallui/CallHandlerService.java b/src/com/android/incallui/CallHandlerService.java index 7a206317..f404b490 100644 --- a/src/com/android/incallui/CallHandlerService.java +++ b/src/com/android/incallui/CallHandlerService.java @@ -50,8 +50,9 @@ public class CallHandlerService extends Service { private static final int ON_DESTROY = 10; private static final int ON_ACTIVE_SUB_CHANGE = 11; private static final int ON_UNSOL_CALLMODIFY = 12; + private static final int ON_SUPP_SERVICE_FAIL = 13; - private static final int LARGEST_MSG_ID = ON_ACTIVE_SUB_CHANGE; + private static final int LARGEST_MSG_ID = ON_SUPP_SERVICE_FAIL; private CallList mCallList; @@ -204,6 +205,11 @@ public class CallHandlerService extends Service { mMainHandler.sendMessage(mMainHandler.obtainMessage(ON_ACTIVE_SUB_CHANGE, activeSub)); } + @Override + public void onSuppServiceFailed(int service) { + mMainHandler.sendMessage(mMainHandler.obtainMessage(ON_SUPP_SERVICE_FAIL, service)); + } + }; private void doStart(ICallCommandService service) { @@ -344,6 +350,10 @@ public class CallHandlerService extends Service { Log.i(TAG, "ON_ACTIVE_SUB_CHANGE: " + msg.obj); mCallList.onActiveSubChanged((Integer) msg.obj); break; + case ON_SUPP_SERVICE_FAIL: + Log.i(TAG, "ON_SUPP_SERVICE_FAIL: "); + mInCallPresenter.onSuppServiceFailed((Integer) msg.obj); + break; default: break; diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java index f1a7133a..54fe92e8 100644 --- a/src/com/android/incallui/InCallActivity.java +++ b/src/com/android/incallui/InCallActivity.java @@ -23,6 +23,7 @@ package com.android.incallui; import java.lang.reflect.Array; import java.util.ArrayList; +import com.android.internal.telephony.Phone; import com.android.services.telephony.common.Call; import com.android.services.telephony.common.Call.State; import com.android.services.telephony.common.CallDetails; @@ -611,6 +612,62 @@ public class InCallActivity extends Activity { } /** + * Handle a failure notification for a supplementary service + * (i.e. conference, switch, separate, transfer, etc.). + */ + void onSuppServiceFailed(int service) { + Log.d(this, "onSuppServiceFailed: " + service); + Phone.SuppService result = Phone.SuppService.values()[service]; + int errorMessageResId; + + switch (result) { + case SWITCH: + // Attempt to switch foreground and background/incoming calls failed + // ("Failed to switch calls") + errorMessageResId = R.string.incall_error_supp_service_switch; + break; + + case SEPARATE: + // Attempt to separate a call from a conference call + // failed ("Failed to separate out call") + errorMessageResId = R.string.incall_error_supp_service_separate; + break; + + case TRANSFER: + // Attempt to connect foreground and background calls to + // each other (and hanging up user's line) failed ("Call + // transfer failed") + errorMessageResId = R.string.incall_error_supp_service_transfer; + break; + + case CONFERENCE: + // Attempt to add a call to conference call failed + // ("Conference call failed") + errorMessageResId = R.string.incall_error_supp_service_conference; + break; + + case REJECT: + // Attempt to reject an incoming call failed + // ("Call rejection failed") + errorMessageResId = R.string.incall_error_supp_service_reject; + break; + + case HANGUP: + // Attempt to release a call failed ("Failed to release call(s)") + errorMessageResId = R.string.incall_error_supp_service_hangup; + break; + + case UNKNOWN: + default: + // Attempt to use a service we don't recognize or support + // ("Unsupported service" or "Selected service failed") + errorMessageResId = R.string.incall_error_supp_service_unknown; + break; + } + showErrorDialog(errorMessageResId); + } + + /** * Utility function to bring up a generic "error" dialog. */ private void showErrorDialog(int resId) { diff --git a/src/com/android/incallui/InCallPresenter.java b/src/com/android/incallui/InCallPresenter.java index 8ad32fd3..8f24a81d 100644 --- a/src/com/android/incallui/InCallPresenter.java +++ b/src/com/android/incallui/InCallPresenter.java @@ -860,6 +860,12 @@ public class InCallPresenter implements CallList.Listener { } } + public void onSuppServiceFailed(int service) { + if (mInCallActivity != null) { + mInCallActivity.onSuppServiceFailed(service); + } + } + /** * Private constructor. Must use getInstance() to get this singleton. */ |
