Add gateway support to Telecomm

Add OutgoingCallIntentBroadcaster into the outgoing call flow.
This class allows third party apps to intercept and modify
outgoing phone calls, and also allows for the ability to extract
gateway information from outgoing call intents to allow for calls
to be made via gateway providers.

Bug: 13477768

Change-Id: Iee6a466b3ae7380136c3d7feba48602a14bc8507
diff --git a/src/com/android/telecomm/CallLogManager.java b/src/com/android/telecomm/CallLogManager.java
index 7862afd..99eb845 100644
--- a/src/com/android/telecomm/CallLogManager.java
+++ b/src/com/android/telecomm/CallLogManager.java
@@ -101,15 +101,13 @@
      *     {@link android.provider.CallLog.Calls#MISSED_TYPE}
      */
     private void logCall(Call call, int callLogType) {
-        Uri number = call.getHandle();
         final long creationTime = call.getCreationTimeInMilliseconds();
         final long age = call.getAgeInMilliseconds();
 
         final ContactInfo contactInfo = call.getContactInfo();  // May be null.
         final String logNumber = getLogNumber(call);
 
-        Log.d(TAG, "logNumber set to:" + Log.pii(logNumber) + ", number set to: "
-                + Log.pii(number));
+        Log.d(TAG, "logNumber set to: %s", Log.pii(logNumber));
 
         final int presentation = getPresentation(call, contactInfo);
 
@@ -164,7 +162,7 @@
      * @return the phone number to be logged.
      */
     private String getLogNumber(Call call) {
-        Uri handle = call.getHandle();
+        Uri handle = call.getOriginalHandle();
 
         if (handle == null) {
             return null;