Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -28073,14 +28073,18 @@ package android.telecom { ctor public Conference(android.telecom.PhoneAccountHandle); method public final boolean addConnection(android.telecom.Connection); method public final void destroy(); method public final android.telecom.AudioState getAudioState(); method public final int getCapabilities(); method public final java.util.List<android.telecom.Connection> getConnections(); method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle(); method public final int getState(); method public void onAudioStateChanged(android.telecom.AudioState); method public void onDisconnect(); method public void onHold(); method public void onMerge(); method public void onPlayDtmfTone(char); method public void onSeparate(android.telecom.Connection); method public void onStopDtmfTone(); method public void onSwap(); method public void onUnhold(); method public final void removeConnection(android.telecom.Connection); telecomm/java/android/telecom/Conference.java +41 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public abstract class Conference { Collections.unmodifiableList(mChildConnections); private PhoneAccountHandle mPhoneAccount; private AudioState mAudioState; private int mState = Connection.STATE_NEW; private DisconnectCause mDisconnectCause; private int mCapabilities; Loading Loading @@ -93,6 +94,15 @@ public abstract class Conference { return mCapabilities; } /** * @return The audio state of the conference, describing how its audio is currently * being routed by the system. This is {@code null} if this Conference * does not directly know about its audio state. */ public final AudioState getAudioState() { return mAudioState; } /** * Invoked when the Conference and all it's {@link Connection}s should be disconnected. */ Loading Loading @@ -127,6 +137,25 @@ public abstract class Conference { */ public void onSwap() {} /** * Notifies this conference of a request to play a DTMF tone. * * @param c A DTMF character. */ public void onPlayDtmfTone(char c) {} /** * Notifies this conference of a request to stop any currently playing DTMF tones. */ public void onStopDtmfTone() {} /** * Notifies this conference that the {@link #getAudioState()} property has a new value. * * @param state The new call audio state. */ public void onAudioStateChanged(AudioState state) {} /** * Sets state to be on hold. */ Loading Loading @@ -251,6 +280,18 @@ public abstract class Conference { return this; } /** * Inform this Conference that the state of its audio output has been changed externally. * * @param state The new audio state. * @hide */ final void setAudioState(AudioState state) { Log.d(this, "setAudioState %s", state); mAudioState = state; onAudioStateChanged(state); } private void setState(int newState) { if (newState != Connection.STATE_ACTIVE && newState != Connection.STATE_HOLDING && Loading telecomm/java/android/telecom/ConnectionService.java +15 −3 Original line number Diff line number Diff line Loading @@ -607,17 +607,29 @@ public abstract class ConnectionService extends Service { private void onAudioStateChanged(String callId, AudioState audioState) { Log.d(this, "onAudioStateChanged %s %s", callId, audioState); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "onAudioStateChanged").setAudioState(audioState); } else { findConferenceForAction(callId, "onAudioStateChanged").setAudioState(audioState); } } private void playDtmfTone(String callId, char digit) { Log.d(this, "playDtmfTone %s %c", callId, digit); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit); } else { findConferenceForAction(callId, "playDtmfTone").onPlayDtmfTone(digit); } } private void stopDtmfTone(String callId) { Log.d(this, "stopDtmfTone %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "stopDtmfTone").onStopDtmfTone(); } else { findConferenceForAction(callId, "stopDtmfTone").onStopDtmfTone(); } } private void conference(String callId1, String callId2) { Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -28073,14 +28073,18 @@ package android.telecom { ctor public Conference(android.telecom.PhoneAccountHandle); method public final boolean addConnection(android.telecom.Connection); method public final void destroy(); method public final android.telecom.AudioState getAudioState(); method public final int getCapabilities(); method public final java.util.List<android.telecom.Connection> getConnections(); method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle(); method public final int getState(); method public void onAudioStateChanged(android.telecom.AudioState); method public void onDisconnect(); method public void onHold(); method public void onMerge(); method public void onPlayDtmfTone(char); method public void onSeparate(android.telecom.Connection); method public void onStopDtmfTone(); method public void onSwap(); method public void onUnhold(); method public final void removeConnection(android.telecom.Connection);
telecomm/java/android/telecom/Conference.java +41 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public abstract class Conference { Collections.unmodifiableList(mChildConnections); private PhoneAccountHandle mPhoneAccount; private AudioState mAudioState; private int mState = Connection.STATE_NEW; private DisconnectCause mDisconnectCause; private int mCapabilities; Loading Loading @@ -93,6 +94,15 @@ public abstract class Conference { return mCapabilities; } /** * @return The audio state of the conference, describing how its audio is currently * being routed by the system. This is {@code null} if this Conference * does not directly know about its audio state. */ public final AudioState getAudioState() { return mAudioState; } /** * Invoked when the Conference and all it's {@link Connection}s should be disconnected. */ Loading Loading @@ -127,6 +137,25 @@ public abstract class Conference { */ public void onSwap() {} /** * Notifies this conference of a request to play a DTMF tone. * * @param c A DTMF character. */ public void onPlayDtmfTone(char c) {} /** * Notifies this conference of a request to stop any currently playing DTMF tones. */ public void onStopDtmfTone() {} /** * Notifies this conference that the {@link #getAudioState()} property has a new value. * * @param state The new call audio state. */ public void onAudioStateChanged(AudioState state) {} /** * Sets state to be on hold. */ Loading Loading @@ -251,6 +280,18 @@ public abstract class Conference { return this; } /** * Inform this Conference that the state of its audio output has been changed externally. * * @param state The new audio state. * @hide */ final void setAudioState(AudioState state) { Log.d(this, "setAudioState %s", state); mAudioState = state; onAudioStateChanged(state); } private void setState(int newState) { if (newState != Connection.STATE_ACTIVE && newState != Connection.STATE_HOLDING && Loading
telecomm/java/android/telecom/ConnectionService.java +15 −3 Original line number Diff line number Diff line Loading @@ -607,17 +607,29 @@ public abstract class ConnectionService extends Service { private void onAudioStateChanged(String callId, AudioState audioState) { Log.d(this, "onAudioStateChanged %s %s", callId, audioState); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "onAudioStateChanged").setAudioState(audioState); } else { findConferenceForAction(callId, "onAudioStateChanged").setAudioState(audioState); } } private void playDtmfTone(String callId, char digit) { Log.d(this, "playDtmfTone %s %c", callId, digit); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit); } else { findConferenceForAction(callId, "playDtmfTone").onPlayDtmfTone(digit); } } private void stopDtmfTone(String callId) { Log.d(this, "stopDtmfTone %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "stopDtmfTone").onStopDtmfTone(); } else { findConferenceForAction(callId, "stopDtmfTone").onStopDtmfTone(); } } private void conference(String callId1, String callId2) { Loading