Handle un-handled supplementary service failures.
The string resources were already present, just not wired up.
I used the test intent in the other CL to test that the correct messages
show up.
Test: Manual test using test harness
Bug: 37952234
Change-Id: I1366b9a927f8c6030f86fa3b971748f5a02bcf2d
diff --git a/src/com/android/phone/CallNotifier.java b/src/com/android/phone/CallNotifier.java
index b3d8ade..476ff06 100644
--- a/src/com/android/phone/CallNotifier.java
+++ b/src/com/android/phone/CallNotifier.java
@@ -528,14 +528,8 @@
/**
* Displays a notification when the phone receives a notice that a supplemental
* service has failed.
- * TODO: This is a NOOP if it isn't for conferences or resuming call failures right now.
*/
private void onSuppServiceFailed(AsyncResult r) {
- if (r.result != Phone.SuppService.CONFERENCE && r.result != Phone.SuppService.RESUME) {
- if (DBG) log("onSuppServiceFailed: not a merge or resume failure event");
- return;
- }
-
String mergeFailedString = "";
if (r.result == Phone.SuppService.CONFERENCE) {
if (DBG) log("onSuppServiceFailed: displaying merge failure message");
@@ -546,9 +540,30 @@
mergeFailedString = mApplication.getResources().getString(
R.string.incall_error_supp_service_switch);
} else if (r.result == Phone.SuppService.HOLD) {
+ if (DBG) log("onSuppServiceFailed: displaying hold failure message");
mergeFailedString = mApplication.getResources().getString(
R.string.incall_error_supp_service_hold);
+ } else if (r.result == Phone.SuppService.TRANSFER) {
+ if (DBG) log("onSuppServiceFailed: displaying transfer failure message");
+ mergeFailedString = mApplication.getResources().getString(
+ R.string.incall_error_supp_service_transfer);
+ } else if (r.result == Phone.SuppService.SEPARATE) {
+ if (DBG) log("onSuppServiceFailed: displaying separate failure message");
+ mergeFailedString = mApplication.getResources().getString(
+ R.string.incall_error_supp_service_separate);
+ } else if (r.result == Phone.SuppService.SWITCH) {
+ if (DBG) log("onSuppServiceFailed: displaying switch failure message");
+ mApplication.getResources().getString(
+ R.string.incall_error_supp_service_switch);
+ } else if (r.result == Phone.SuppService.REJECT) {
+ if (DBG) log("onSuppServiceFailed: displaying reject failure message");
+ mApplication.getResources().getString(
+ R.string.incall_error_supp_service_reject);
+ } else {
+ if (DBG) log("onSuppServiceFailed: unknown failure");
+ return;
}
+
PhoneDisplayMessage.displayErrorMessage(mApplication, mergeFailedString);
// start a timer that kills the dialog