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
This commit is contained in:
Nancy Chen
2014-12-15 16:12:50 -08:00
parent 1f28a6a571
commit 27d1c2d148
7 changed files with 79 additions and 1 deletions

View File

@@ -246,6 +246,7 @@ public abstract class Connection implements IConferenceable {
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) {}
@@ -997,6 +998,23 @@ public abstract class Connection implements IConferenceable {
}
}
/**
* 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.