Pass onPostDialChar call back from Telephony to Telecom.

Add plumbing to alert Telecom every time a character is processed after
the post dial wait state (the processing happens in Telephony).

Bug: 18644688
Change-Id: I487d76aa9c959ca528c6377374aa35c2d0b4a803
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index f3b0586..a180f44 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -246,6 +246,7 @@
         public void onVideoStateChanged(Connection c, int videoState) {}
         public void onDisconnected(Connection c, DisconnectCause disconnectCause) {}
         public void onPostDialWait(Connection c, String remaining) {}
+        public void onPostDialChar(Connection c, char nextChar) {}
         public void onRingbackRequested(Connection c, boolean ringback) {}
         public void onDestroyed(Connection c) {}
         public void onConnectionCapabilitiesChanged(Connection c, int capabilities) {}
@@ -998,6 +999,23 @@
     }
 
     /**
+     * Informs listeners that this {@code Connection} has processed a character in the post-dial
+     * started state. This is done when (a) the {@code Connection} is issuing a DTMF sequence;
+     * (b) it has encountered a "wait" character; and (c) it wishes to signal Telecom to play
+     * the corresponding DTMF tone locally.
+     *
+     * @param nextChar The DTMF character that was just processed by the {@code Connection}.
+     *
+     * @hide
+     */
+    public final void setNextPostDialWaitChar(char nextChar) {
+        checkImmutable();
+        for (Listener l : mListeners) {
+            l.onPostDialChar(this, nextChar);
+        }
+    }
+
+    /**
      * Requests that the framework play a ringback tone. This is to be invoked by implementations
      * that do not play a ringback tone themselves in the connection's audio stream.
      *