Initial commit of basic call logging code in Telecomm
Add CallLogAsync and CallLogger helper classes, and populate
CallLogManager with initial skeleton code that will add call log
entries for failed outgoing calls and disconnected calls.
Change-Id: Iead39702c6b271a6449f7840162efde655dd1965
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 23de67b..6929b37 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -94,6 +94,7 @@
mSwitchboard = new Switchboard(this);
mInCallController = new InCallController(this);
mRinger = new Ringer();
+ mCallLogManager = new CallLogManager(TelecommApp.getInstance());
}
static CallsManager getInstance() {
@@ -186,6 +187,15 @@
}
/**
+ * Informs mCallLogManager about the outgoing call that failed, so that it can be logged.
+ *
+ * @param call The failed outgoing call.
+ */
+ void handleFailedOutgoingCall(Call call) {
+ mCallLogManager.logFailedOutgoingCall(call);
+ }
+
+ /**
* Instructs Telecomm to answer the specified call. Intended to be invoked by the in-call
* app through {@link InCallAdapter} after Telecomm notifies it of an incoming call followed by
* the user opting to answer said call.
@@ -291,6 +301,9 @@
if (mCalls.isEmpty()) {
mInCallController.unbind();
}
+
+ // Log the call in the call log.
+ mCallLogManager.logDisconnectedCall(call);
}
/**