Loading api/current.txt +8 −6 Original line number Diff line number Diff line Loading @@ -28231,17 +28231,19 @@ package android.telecomm { public abstract class Conference { ctor public Conference(android.telecomm.PhoneAccountHandle); method public boolean addConnection(android.telecomm.Connection); method public void destroy(); method public final boolean addConnection(android.telecomm.Connection); method public final void destroy(); method public final int getCapabilities(); method public final java.util.List<android.telecomm.Connection> getConnections(); method public final android.telecomm.PhoneAccountHandle getPhoneAccount(); method public final int getState(); method public void onDisconnect(); method public void onHold(); method public void onMerge(); method public void onSeparate(android.telecomm.Connection); method public void onSwap(); method public void onUnhold(); method public void removeConnection(android.telecomm.Connection); method public final void removeConnection(android.telecomm.Connection); method public final void setActive(); method public final void setCapabilities(int); method public final void setDisconnected(int, java.lang.String); Loading Loading @@ -28392,13 +28394,13 @@ package android.telecomm { method public static java.lang.String toString(int); field public static final int ADD_CALL = 16; // 0x10 field public static final int ALL = 255; // 0xff field public static final int GENERIC_CONFERENCE = 128; // 0x80 field public static final int HOLD = 1; // 0x1 field public static final int MERGE_CALLS = 4; // 0x4 field public static final int MANAGE_CONFERENCE = 128; // 0x80 field public static final int MERGE_CONFERENCE = 4; // 0x4 field public static final int MUTE = 64; // 0x40 field public static final int RESPOND_VIA_TEXT = 32; // 0x20 field public static final int SUPPORT_HOLD = 2; // 0x2 field public static final int SWAP_CALLS = 8; // 0x8 field public static final int SWAP_CONFERENCE = 8; // 0x8 } public class PropertyPresentation { telecomm/java/android/telecomm/Call.java +14 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,20 @@ public final class Call { mInCallAdapter.splitFromConference(mTelecommCallId); } /** * Merges the calls within this conference. See {@link PhoneCapabilities#MERGE_CONFERENCE}. */ public void mergeConference() { mInCallAdapter.mergeConference(mTelecommCallId); } /** * Swaps the calls within this conference. See {@link PhoneCapabilities#SWAP_CONFERENCE}. */ public void swapConference() { mInCallAdapter.swapConference(mTelecommCallId); } /** * Obtains the parent of this {@code Call} in a conference, if any. * Loading telecomm/java/android/telecomm/Conference.java +15 −3 Original line number Diff line number Diff line Loading @@ -92,6 +92,18 @@ public abstract class Conference { */ public void onUnhold() {} /** * Invoked when the child calls should be merged. Only invoked if the conference contains the * capability {@link PhoneCapabilities#MERGE_CONFERENCE}. */ public void onMerge() {} /** * Invoked when the child calls should be swapped. Only invoked if the conference contains the * capability {@link PhoneCapabilities#SWAP_CONFERENCE}. */ public void onSwap() {} /** * Sets state to be on hold. */ Loading Loading @@ -141,7 +153,7 @@ public abstract class Conference { * @param connection The connection to add. * @return True if the connection was successfully added. */ public boolean addConnection(Connection connection) { public final boolean addConnection(Connection connection) { if (connection != null && !mChildConnections.contains(connection)) { if (connection.setConference(this)) { mChildConnections.add(connection); Loading @@ -160,7 +172,7 @@ public abstract class Conference { * @param connection The connection to remove. * @return True if the connection was successfully removed. */ public void removeConnection(Connection connection) { public final void removeConnection(Connection connection) { Log.d(this, "removing %s from %s", connection, mChildConnections); if (connection != null && mChildConnections.remove(connection)) { connection.resetConference(); Loading @@ -173,7 +185,7 @@ public abstract class Conference { /** * Tears down the conference object and any of it's current connections. */ public void destroy() { public final void destroy() { Log.d(this, "destroying conference : %s", this); // Tear down the children. for (Connection connection : mChildConnections) { Loading telecomm/java/android/telecomm/Connection.java +1 −1 Original line number Diff line number Diff line Loading @@ -1068,10 +1068,10 @@ public abstract class Connection { if (mState != state) { Log.d(this, "setState: %s", stateToString(state)); mState = state; onSetState(state); for (Listener l : mListeners) { l.onStateChanged(this, state); } onSetState(state); } } Loading telecomm/java/android/telecomm/ConnectionService.java +34 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ public abstract class ConnectionService extends Service { private static final int MSG_ON_PHONE_ACCOUNT_CLICKED = 15; private static final int MSG_REMOVE_CONNECTION_SERVICE_ADAPTER = 16; private static final int MSG_ANSWER_VIDEO = 17; private static final int MSG_MERGE_CONFERENCE = 18; private static final int MSG_SWAP_CONFERENCE = 19; private static Connection sNullConnection; Loading Loading @@ -181,6 +183,16 @@ public abstract class ConnectionService extends Service { mHandler.obtainMessage(MSG_SPLIT_FROM_CONFERENCE, callId).sendToTarget(); } @Override public void mergeConference(String callId) { mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget(); } @Override public void swapConference(String callId) { mHandler.obtainMessage(MSG_SWAP_CONFERENCE, callId).sendToTarget(); } @Override public void onPostDialContinue(String callId, boolean proceed) { SomeArgs args = SomeArgs.obtain(); Loading Loading @@ -298,6 +310,12 @@ public abstract class ConnectionService extends Service { case MSG_SPLIT_FROM_CONFERENCE: splitFromConference((String) msg.obj); break; case MSG_MERGE_CONFERENCE: mergeConference((String) msg.obj); break; case MSG_SWAP_CONFERENCE: swapConference((String) msg.obj); break; case MSG_ON_POST_DIAL_CONTINUE: { SomeArgs args = (SomeArgs) msg.obj; try { Loading Loading @@ -639,6 +657,22 @@ public abstract class ConnectionService extends Service { } } private void mergeConference(String callId) { Log.d(this, "mergeConference(%s)", callId); Conference conference = findConferenceForAction(callId, "mergeConference"); if (conference != null) { conference.onMerge(); } } private void swapConference(String callId) { Log.d(this, "swapConference(%s)", callId); Conference conference = findConferenceForAction(callId, "swapConference"); if (conference != null) { conference.onSwap(); } } private void onPostDialContinue(String callId, boolean proceed) { Log.d(this, "onPostDialContinue(%s)", callId); findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed); Loading Loading
api/current.txt +8 −6 Original line number Diff line number Diff line Loading @@ -28231,17 +28231,19 @@ package android.telecomm { public abstract class Conference { ctor public Conference(android.telecomm.PhoneAccountHandle); method public boolean addConnection(android.telecomm.Connection); method public void destroy(); method public final boolean addConnection(android.telecomm.Connection); method public final void destroy(); method public final int getCapabilities(); method public final java.util.List<android.telecomm.Connection> getConnections(); method public final android.telecomm.PhoneAccountHandle getPhoneAccount(); method public final int getState(); method public void onDisconnect(); method public void onHold(); method public void onMerge(); method public void onSeparate(android.telecomm.Connection); method public void onSwap(); method public void onUnhold(); method public void removeConnection(android.telecomm.Connection); method public final void removeConnection(android.telecomm.Connection); method public final void setActive(); method public final void setCapabilities(int); method public final void setDisconnected(int, java.lang.String); Loading Loading @@ -28392,13 +28394,13 @@ package android.telecomm { method public static java.lang.String toString(int); field public static final int ADD_CALL = 16; // 0x10 field public static final int ALL = 255; // 0xff field public static final int GENERIC_CONFERENCE = 128; // 0x80 field public static final int HOLD = 1; // 0x1 field public static final int MERGE_CALLS = 4; // 0x4 field public static final int MANAGE_CONFERENCE = 128; // 0x80 field public static final int MERGE_CONFERENCE = 4; // 0x4 field public static final int MUTE = 64; // 0x40 field public static final int RESPOND_VIA_TEXT = 32; // 0x20 field public static final int SUPPORT_HOLD = 2; // 0x2 field public static final int SWAP_CALLS = 8; // 0x8 field public static final int SWAP_CONFERENCE = 8; // 0x8 } public class PropertyPresentation {
telecomm/java/android/telecomm/Call.java +14 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,20 @@ public final class Call { mInCallAdapter.splitFromConference(mTelecommCallId); } /** * Merges the calls within this conference. See {@link PhoneCapabilities#MERGE_CONFERENCE}. */ public void mergeConference() { mInCallAdapter.mergeConference(mTelecommCallId); } /** * Swaps the calls within this conference. See {@link PhoneCapabilities#SWAP_CONFERENCE}. */ public void swapConference() { mInCallAdapter.swapConference(mTelecommCallId); } /** * Obtains the parent of this {@code Call} in a conference, if any. * Loading
telecomm/java/android/telecomm/Conference.java +15 −3 Original line number Diff line number Diff line Loading @@ -92,6 +92,18 @@ public abstract class Conference { */ public void onUnhold() {} /** * Invoked when the child calls should be merged. Only invoked if the conference contains the * capability {@link PhoneCapabilities#MERGE_CONFERENCE}. */ public void onMerge() {} /** * Invoked when the child calls should be swapped. Only invoked if the conference contains the * capability {@link PhoneCapabilities#SWAP_CONFERENCE}. */ public void onSwap() {} /** * Sets state to be on hold. */ Loading Loading @@ -141,7 +153,7 @@ public abstract class Conference { * @param connection The connection to add. * @return True if the connection was successfully added. */ public boolean addConnection(Connection connection) { public final boolean addConnection(Connection connection) { if (connection != null && !mChildConnections.contains(connection)) { if (connection.setConference(this)) { mChildConnections.add(connection); Loading @@ -160,7 +172,7 @@ public abstract class Conference { * @param connection The connection to remove. * @return True if the connection was successfully removed. */ public void removeConnection(Connection connection) { public final void removeConnection(Connection connection) { Log.d(this, "removing %s from %s", connection, mChildConnections); if (connection != null && mChildConnections.remove(connection)) { connection.resetConference(); Loading @@ -173,7 +185,7 @@ public abstract class Conference { /** * Tears down the conference object and any of it's current connections. */ public void destroy() { public final void destroy() { Log.d(this, "destroying conference : %s", this); // Tear down the children. for (Connection connection : mChildConnections) { Loading
telecomm/java/android/telecomm/Connection.java +1 −1 Original line number Diff line number Diff line Loading @@ -1068,10 +1068,10 @@ public abstract class Connection { if (mState != state) { Log.d(this, "setState: %s", stateToString(state)); mState = state; onSetState(state); for (Listener l : mListeners) { l.onStateChanged(this, state); } onSetState(state); } } Loading
telecomm/java/android/telecomm/ConnectionService.java +34 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ public abstract class ConnectionService extends Service { private static final int MSG_ON_PHONE_ACCOUNT_CLICKED = 15; private static final int MSG_REMOVE_CONNECTION_SERVICE_ADAPTER = 16; private static final int MSG_ANSWER_VIDEO = 17; private static final int MSG_MERGE_CONFERENCE = 18; private static final int MSG_SWAP_CONFERENCE = 19; private static Connection sNullConnection; Loading Loading @@ -181,6 +183,16 @@ public abstract class ConnectionService extends Service { mHandler.obtainMessage(MSG_SPLIT_FROM_CONFERENCE, callId).sendToTarget(); } @Override public void mergeConference(String callId) { mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget(); } @Override public void swapConference(String callId) { mHandler.obtainMessage(MSG_SWAP_CONFERENCE, callId).sendToTarget(); } @Override public void onPostDialContinue(String callId, boolean proceed) { SomeArgs args = SomeArgs.obtain(); Loading Loading @@ -298,6 +310,12 @@ public abstract class ConnectionService extends Service { case MSG_SPLIT_FROM_CONFERENCE: splitFromConference((String) msg.obj); break; case MSG_MERGE_CONFERENCE: mergeConference((String) msg.obj); break; case MSG_SWAP_CONFERENCE: swapConference((String) msg.obj); break; case MSG_ON_POST_DIAL_CONTINUE: { SomeArgs args = (SomeArgs) msg.obj; try { Loading Loading @@ -639,6 +657,22 @@ public abstract class ConnectionService extends Service { } } private void mergeConference(String callId) { Log.d(this, "mergeConference(%s)", callId); Conference conference = findConferenceForAction(callId, "mergeConference"); if (conference != null) { conference.onMerge(); } } private void swapConference(String callId) { Log.d(this, "swapConference(%s)", callId); Conference conference = findConferenceForAction(callId, "swapConference"); if (conference != null) { conference.onSwap(); } } private void onPostDialContinue(String callId, boolean proceed) { Log.d(this, "onPostDialContinue(%s)", callId); findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed); Loading