ThirdPartyPhone: DTMF & callerDisplayName plumbing DO NOT MERGE

Plumbing for callerDisplayName argument from TelephonyManager to
ThirdPartyPhone.

Also fixes issues with DTMF.

Change-Id: If1484a5196485cbcd098f863765bf579d0a3d6bf
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 05b2308..9ad47ac 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -38,7 +38,6 @@
 import android.telephony.ServiceState;
 import android.text.TextUtils;
 import android.util.Log;
-import android.util.Pair;
 
 import com.android.internal.telephony.DefaultPhoneNotifier;
 import com.android.internal.telephony.IccCard;
@@ -95,6 +94,19 @@
         }
     }
 
+    private static final class IncomingThirdPartyCallArgs {
+        public final ComponentName component;
+        public final String callId;
+        public final String callerDisplayName;
+
+        public IncomingThirdPartyCallArgs(ComponentName component, String callId,
+                String callerDisplayName) {
+            this.component = component;
+            this.callId = callId;
+            this.callerDisplayName = callerDisplayName;
+        }
+    }
+
     /**
      * A handler that processes messages on the main thread in the phone process. Since many
      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
@@ -178,11 +190,10 @@
                     break;
                 case CMD_NEW_INCOMING_THIRD_PARTY_CALL: {
                     request = (MainThreadRequest) msg.obj;
-                    Pair<ComponentName, String> pair =
-                            (Pair<ComponentName, String>) request.argument;
+                    IncomingThirdPartyCallArgs args = (IncomingThirdPartyCallArgs) request.argument;
                     ThirdPartyPhone thirdPartyPhone = (ThirdPartyPhone)
-                            PhoneUtils.getThirdPartyPhoneFromComponent(mCM, pair.first);
-                    thirdPartyPhone.takeIncomingCall(pair.first, pair.second);
+                            PhoneUtils.getThirdPartyPhoneFromComponent(mCM, args.component);
+                    thirdPartyPhone.takeIncomingCall(args.callId, args.callerDisplayName);
                     break;
                 }
 
@@ -756,13 +767,15 @@
     }
 
     @Override
-    public void newIncomingThirdPartyCall(ComponentName component, String callId) {
+    public void newIncomingThirdPartyCall(ComponentName component, String callId,
+            String callerDisplayName) {
         // TODO(sail): Enforce that the component belongs to the calling package.
         if (DBG) {
             log("newIncomingThirdPartyCall: component: " + component + " callId: " + callId);
         }
         enforceCallPermission();
-        sendRequestAsync(CMD_NEW_INCOMING_THIRD_PARTY_CALL, Pair.create(component, callId));
+        sendRequestAsync(CMD_NEW_INCOMING_THIRD_PARTY_CALL, new IncomingThirdPartyCallArgs(
+                component, callId, callerDisplayName));
     }
 
     //