Loading telecomm/java/android/telecom/Connection.java +18 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,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 onCallPropertiesChanged(Connection c, int callProperties) {} Loading Loading @@ -1125,6 +1126,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. Loading telecomm/java/android/telecom/ConnectionService.java +7 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,13 @@ public abstract class ConnectionService extends Service { 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 public void onRingbackRequested(Connection c, boolean ringback) { String id = mIdByConnection.get(c); Loading telecomm/java/android/telecom/ConnectionServiceAdapter.java +9 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,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. * Loading telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +24 −6 Original line number Diff line number Diff line Loading @@ -58,12 +58,13 @@ final class ConnectionServiceAdapterServant { private static final int MSG_SET_ADDRESS = 18; 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_DISCONNECTED_WITH_SUPP_NOTIFICATION = 21; private static final int MSG_SET_PHONE_ACCOUNT = 22; private static final int MSG_SET_CALL_SUBSTATE = 23; private static final int MSG_SET_EXTRAS = 24; private static final int MSG_ADD_EXISTING_CONNECTION = 25; private static final int MSG_SET_CALL_PROPERTIES = 26; private static final int MSG_ADD_EXISTING_CONNECTION = 21; private static final int MSG_ON_POST_DIAL_CHAR = 22; private static final int MSG_SET_DISCONNECTED_WITH_SUPP_NOTIFICATION = 23; private static final int MSG_SET_PHONE_ACCOUNT = 24; private static final int MSG_SET_CALL_SUBSTATE = 25; private static final int MSG_SET_EXTRAS = 26; private static final int MSG_SET_CALL_PROPERTIES = 27; private final IConnectionServiceAdapter mDelegate; Loading Loading @@ -162,6 +163,15 @@ final class ConnectionServiceAdapterServant { } 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: mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj); break; Loading Loading @@ -345,6 +355,14 @@ final class ConnectionServiceAdapterServant { 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 public void queryRemoteConnectionServices(RemoteServiceCallback callback) { mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget(); Loading telecomm/java/android/telecom/RemoteConnection.java +10 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ public final class RemoteConnection { */ public void onPostDialWait(RemoteConnection connection, String remainingPostDialSequence) {} //FIXME L-MR1-INTERNAL /** * Invoked when the post-dial sequence in the outgoing {@code Connection} has processed * a character. Loading @@ -119,7 +118,6 @@ public final class RemoteConnection { */ public void onPostDialChar(RemoteConnection connection, char nextChar) {} /** * Indicates that the VOIP audio status of this {@code RemoteConnection} has changed. * See {@link #isVoipAudioMode()}. Loading Loading @@ -788,7 +786,7 @@ public final class RemoteConnection { * of time. * * 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 * 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 Loading Loading @@ -938,6 +936,15 @@ public final class RemoteConnection { } } /** * @hide */ void onPostDialChar(char nextChar) { for (Callback c : mCallbacks) { c.onPostDialChar(this, nextChar); } } /** * @hide */ Loading Loading
telecomm/java/android/telecom/Connection.java +18 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,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 onCallPropertiesChanged(Connection c, int callProperties) {} Loading Loading @@ -1125,6 +1126,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. Loading
telecomm/java/android/telecom/ConnectionService.java +7 −0 Original line number Diff line number Diff line Loading @@ -578,6 +578,13 @@ public abstract class ConnectionService extends Service { 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 public void onRingbackRequested(Connection c, boolean ringback) { String id = mIdByConnection.get(c); Loading
telecomm/java/android/telecom/ConnectionServiceAdapter.java +9 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,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. * Loading
telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +24 −6 Original line number Diff line number Diff line Loading @@ -58,12 +58,13 @@ final class ConnectionServiceAdapterServant { private static final int MSG_SET_ADDRESS = 18; 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_DISCONNECTED_WITH_SUPP_NOTIFICATION = 21; private static final int MSG_SET_PHONE_ACCOUNT = 22; private static final int MSG_SET_CALL_SUBSTATE = 23; private static final int MSG_SET_EXTRAS = 24; private static final int MSG_ADD_EXISTING_CONNECTION = 25; private static final int MSG_SET_CALL_PROPERTIES = 26; private static final int MSG_ADD_EXISTING_CONNECTION = 21; private static final int MSG_ON_POST_DIAL_CHAR = 22; private static final int MSG_SET_DISCONNECTED_WITH_SUPP_NOTIFICATION = 23; private static final int MSG_SET_PHONE_ACCOUNT = 24; private static final int MSG_SET_CALL_SUBSTATE = 25; private static final int MSG_SET_EXTRAS = 26; private static final int MSG_SET_CALL_PROPERTIES = 27; private final IConnectionServiceAdapter mDelegate; Loading Loading @@ -162,6 +163,15 @@ final class ConnectionServiceAdapterServant { } 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: mDelegate.queryRemoteConnectionServices((RemoteServiceCallback) msg.obj); break; Loading Loading @@ -345,6 +355,14 @@ final class ConnectionServiceAdapterServant { 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 public void queryRemoteConnectionServices(RemoteServiceCallback callback) { mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget(); Loading
telecomm/java/android/telecom/RemoteConnection.java +10 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,6 @@ public final class RemoteConnection { */ public void onPostDialWait(RemoteConnection connection, String remainingPostDialSequence) {} //FIXME L-MR1-INTERNAL /** * Invoked when the post-dial sequence in the outgoing {@code Connection} has processed * a character. Loading @@ -119,7 +118,6 @@ public final class RemoteConnection { */ public void onPostDialChar(RemoteConnection connection, char nextChar) {} /** * Indicates that the VOIP audio status of this {@code RemoteConnection} has changed. * See {@link #isVoipAudioMode()}. Loading Loading @@ -788,7 +786,7 @@ public final class RemoteConnection { * of time. * * 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 * 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 Loading Loading @@ -938,6 +936,15 @@ public final class RemoteConnection { } } /** * @hide */ void onPostDialChar(char nextChar) { for (Callback c : mCallbacks) { c.onPostDialChar(this, nextChar); } } /** * @hide */ Loading