Add CallsManagerListener
Also contains some minor bug fixes:
- add an incoming field to Call
- correcty log failed outgoing calls (previously these were mostly dropped)
- log missed incoming calls
Change-Id: I72dc39efd519302c1f765f4f9c9d04c5095e45a6
diff --git a/src/com/android/telecomm/Switchboard.java b/src/com/android/telecomm/Switchboard.java
index af8d380..8a3fc81 100644
--- a/src/com/android/telecomm/Switchboard.java
+++ b/src/com/android/telecomm/Switchboard.java
@@ -22,6 +22,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
+import android.telecomm.CallInfo;
import android.telecomm.CallServiceDescriptor;
import android.telecomm.TelecommConstants;
@@ -208,9 +209,10 @@
* Handles the case where an outgoing call could not be proceed by any of the
* selector/call-service implementations, see {@link OutgoingCallProcessor}.
*/
- void handleFailedOutgoingCall(Call call) {
+ void handleFailedOutgoingCall(Call call, boolean isAborted) {
Log.d(this, "handleFailedOutgoingCall");
+ mCallsManager.handleUnsuccessfulOutgoingCall(call, isAborted);
finalizeOutgoingCall(call);
}
@@ -219,10 +221,10 @@
* resulting call to {@link CallsManager} as the final step in the incoming sequence. At that
* point, {@link CallsManager} should bring up the incoming-call UI.
*/
- void handleSuccessfulIncomingCall(Call call) {
+ void handleSuccessfulIncomingCall(Call call, CallInfo callInfo) {
Log.d(this, "handleSuccessfulIncomingCall");
- mCallsManager.handleSuccessfulIncomingCall(call);
+ mCallsManager.handleSuccessfulIncomingCall(call, callInfo);
mBinderDeallocator.releaseUsePermit();
}
@@ -241,6 +243,8 @@
mBinderDeallocator.releaseUsePermit();
+ mCallsManager.handleUnsuccessfulIncomingCall(call);
+
// At the moment there is nothing more to do if an incoming call is not retrieved. We may at
// a future date bind to the in-call app optimistically during the incoming-call sequence
// and this method could tell {@link CallsManager} to unbind from the in-call app if the