am ab4f36c0: Merge "Pass onPostDialChar call back from Telephony to Telecom." into lmp-mr1-dev
* commit 'ab4f36c0df73bbe583a16eaa960401fd3f9c0db8': Pass onPostDialChar call back from Telephony to Telecom.
This commit is contained in:
@@ -246,6 +246,7 @@ public abstract class Connection implements IConferenceable {
|
|||||||
public void onVideoStateChanged(Connection c, int videoState) {}
|
public void onVideoStateChanged(Connection c, int videoState) {}
|
||||||
public void onDisconnected(Connection c, DisconnectCause disconnectCause) {}
|
public void onDisconnected(Connection c, DisconnectCause disconnectCause) {}
|
||||||
public void onPostDialWait(Connection c, String remaining) {}
|
public void onPostDialWait(Connection c, String remaining) {}
|
||||||
|
public void onPostDialChar(Connection c, char nextChar) {}
|
||||||
public void onRingbackRequested(Connection c, boolean ringback) {}
|
public void onRingbackRequested(Connection c, boolean ringback) {}
|
||||||
public void onDestroyed(Connection c) {}
|
public void onDestroyed(Connection c) {}
|
||||||
public void onConnectionCapabilitiesChanged(Connection c, int capabilities) {}
|
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
|
* 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.
|
* that do not play a ringback tone themselves in the connection's audio stream.
|
||||||
|
|||||||
@@ -483,6 +483,13 @@ public abstract class ConnectionService extends Service {
|
|||||||
mAdapter.onPostDialWait(id, remaining);
|
mAdapter.onPostDialWait(id, remaining);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPostDialChar(Connection c, char nextChar) {
|
||||||
|
String id = mIdByConnection.get(c);
|
||||||
|
Log.d(this, "Adapter onPostDialChar %s, %s", c, nextChar);
|
||||||
|
mAdapter.onPostDialChar(id, nextChar);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRingbackRequested(Connection c, boolean ringback) {
|
public void onRingbackRequested(Connection c, boolean ringback) {
|
||||||
String id = mIdByConnection.get(c);
|
String id = mIdByConnection.get(c);
|
||||||
|
|||||||
@@ -226,6 +226,15 @@ final class ConnectionServiceAdapter implements DeathRecipient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onPostDialChar(String callId, char nextChar) {
|
||||||
|
for (IConnectionServiceAdapter adapter : mAdapters) {
|
||||||
|
try {
|
||||||
|
adapter.onPostDialChar(callId, nextChar);
|
||||||
|
} catch (RemoteException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that a new conference call has been created.
|
* Indicates that a new conference call has been created.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ final class ConnectionServiceAdapterServant {
|
|||||||
private static final int MSG_SET_CALLER_DISPLAY_NAME = 19;
|
private static final int MSG_SET_CALLER_DISPLAY_NAME = 19;
|
||||||
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
|
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
|
||||||
private static final int MSG_ADD_EXISTING_CONNECTION = 21;
|
private static final int MSG_ADD_EXISTING_CONNECTION = 21;
|
||||||
|
private static final int MSG_ON_POST_DIAL_CHAR = 22;
|
||||||
|
|
||||||
private final IConnectionServiceAdapter mDelegate;
|
private final IConnectionServiceAdapter mDelegate;
|
||||||
|
|
||||||
@@ -143,6 +144,15 @@ final class ConnectionServiceAdapterServant {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MSG_ON_POST_DIAL_CHAR: {
|
||||||
|
SomeArgs args = (SomeArgs) msg.obj;
|
||||||
|
try {
|
||||||
|
mDelegate.onPostDialChar((String) args.arg1, (char) args.argi1);
|
||||||
|
} finally {
|
||||||
|
args.recycle();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MSG_QUERY_REMOTE_CALL_SERVICES:
|
case MSG_QUERY_REMOTE_CALL_SERVICES:
|
||||||
mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj);
|
mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj);
|
||||||
break;
|
break;
|
||||||
@@ -298,6 +308,14 @@ final class ConnectionServiceAdapterServant {
|
|||||||
mHandler.obtainMessage(MSG_ON_POST_DIAL_WAIT, args).sendToTarget();
|
mHandler.obtainMessage(MSG_ON_POST_DIAL_WAIT, args).sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPostDialChar(String connectionId, char nextChar) {
|
||||||
|
SomeArgs args = SomeArgs.obtain();
|
||||||
|
args.arg1 = connectionId;
|
||||||
|
args.argi1 = nextChar;
|
||||||
|
mHandler.obtainMessage(MSG_ON_POST_DIAL_CHAR, args).sendToTarget();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void queryRemoteConnectionServices(RemoteServiceCallback callback) {
|
public void queryRemoteConnectionServices(RemoteServiceCallback callback) {
|
||||||
mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget();
|
mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget();
|
||||||
|
|||||||
@@ -100,6 +100,15 @@ public final class RemoteConnection {
|
|||||||
*/
|
*/
|
||||||
public void onPostDialWait(RemoteConnection connection, String remainingPostDialSequence) {}
|
public void onPostDialWait(RemoteConnection connection, String remainingPostDialSequence) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when the post-dial sequence in the outgoing {@code Connection} has processed
|
||||||
|
* a character.
|
||||||
|
*
|
||||||
|
* @param connection The {@code RemoteConnection} invoking this method.
|
||||||
|
* @param nextChar The character being processed.
|
||||||
|
*/
|
||||||
|
public void onPostDialChar(RemoteConnection connection, char nextChar) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that the VOIP audio status of this {@code RemoteConnection} has changed.
|
* Indicates that the VOIP audio status of this {@code RemoteConnection} has changed.
|
||||||
* See {@link #isVoipAudioMode()}.
|
* See {@link #isVoipAudioMode()}.
|
||||||
@@ -726,7 +735,7 @@ public final class RemoteConnection {
|
|||||||
* of time.
|
* of time.
|
||||||
*
|
*
|
||||||
* If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, this
|
* If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, this
|
||||||
* {@code RemoteConnection} will pause playing the tones and notify callbackss via
|
* {@code RemoteConnection} will pause playing the tones and notify callbacks via
|
||||||
* {@link Callback#onPostDialWait(RemoteConnection, String)}. At this point, the in-call app
|
* {@link Callback#onPostDialWait(RemoteConnection, String)}. At this point, the in-call app
|
||||||
* should display to the user an indication of this state and an affordance to continue
|
* should display to the user an indication of this state and an affordance to continue
|
||||||
* the postdial sequence. When the user decides to continue the postdial sequence, the in-call
|
* the postdial sequence. When the user decides to continue the postdial sequence, the in-call
|
||||||
@@ -866,6 +875,15 @@ public final class RemoteConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
void onPostDialChar(char nextChar) {
|
||||||
|
for (Callback c : mCallbacks) {
|
||||||
|
c.onPostDialChar(this, nextChar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -222,6 +222,12 @@ final class RemoteConnectionService {
|
|||||||
.setPostDialWait(remaining);
|
.setPostDialWait(remaining);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPostDialChar(String callId, char nextChar) {
|
||||||
|
findConnectionForAction(callId, "onPostDialChar")
|
||||||
|
.onPostDialChar(nextChar);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void queryRemoteConnectionServices(RemoteServiceCallback callback) {
|
public void queryRemoteConnectionServices(RemoteServiceCallback callback) {
|
||||||
// Not supported from remote connection service.
|
// Not supported from remote connection service.
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ oneway interface IConnectionServiceAdapter {
|
|||||||
|
|
||||||
void onPostDialWait(String callId, String remaining);
|
void onPostDialWait(String callId, String remaining);
|
||||||
|
|
||||||
|
void onPostDialChar(String callId, char nextChar);
|
||||||
|
|
||||||
void queryRemoteConnectionServices(RemoteServiceCallback callback);
|
void queryRemoteConnectionServices(RemoteServiceCallback callback);
|
||||||
|
|
||||||
void setVideoProvider(String callId, IVideoProvider videoProvider);
|
void setVideoProvider(String callId, IVideoProvider videoProvider);
|
||||||
|
|||||||
Reference in New Issue
Block a user