Loading telecomm/java/android/telecom/Call.java +22 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.telecom; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; Loading Loading @@ -458,8 +459,14 @@ public final class Call { /** Call supports the deflect feature. */ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x01000000; /** * Call supports adding participants to the call via * {@link #addConferenceParticipants(List)}. * @hide */ public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000; //****************************************************************************************** // Next CAPABILITY value: 0x02000000 // Next CAPABILITY value: 0x04000000 //****************************************************************************************** /** Loading Loading @@ -689,6 +696,9 @@ public final class Call { if (can(capabilities, CAPABILITY_SUPPORT_DEFLECT)) { builder.append(" CAPABILITY_SUPPORT_DEFLECT"); } if (can(capabilities, CAPABILITY_ADD_PARTICIPANT)) { builder.append(" CAPABILITY_ADD_PARTICIPANT"); } builder.append("]"); return builder.toString(); } Loading Loading @@ -1702,6 +1712,17 @@ public final class Call { mInCallAdapter.swapConference(mTelecomCallId); } /** * Pulls participants to existing call by forming a conference call. * See {@link Details#CAPABILITY_ADD_PARTICIPANT}. * * @param participants participants to be pulled to existing call. * @hide */ public void addConferenceParticipants(@NonNull List<Uri> participants) { mInCallAdapter.addConferenceParticipants(mTelecomCallId, participants); } /** * Initiates a request to the {@link ConnectionService} to pull an external call to the local * device. Loading telecomm/java/android/telecom/Conference.java +7 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,13 @@ public abstract class Conference extends Conferenceable { */ public void onConnectionAdded(Connection connection) {} /** * Notifies the {@link Conference} of a request to add a new participants to the conference call * @param participants that will be added to this conference call * @hide */ public void onAddConferenceParticipants(@NonNull List<Uri> participants) {} /** * Notifies this Conference, which is in {@code STATE_RINGING}, of * a request to accept. Loading telecomm/java/android/telecom/Connection.java +18 −2 Original line number Diff line number Diff line Loading @@ -381,8 +381,14 @@ public abstract class Connection extends Conferenceable { /** Call supports the deflect feature. */ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x02000000; /** * When set, indicates that this {@link Connection} supports initiation of a conference call * by directly adding participants using {@link #onAddConferenceParticipants(List)}. * @hide */ public static final int CAPABILITY_ADD_PARTICIPANT = 0x04000000; //********************************************************************************************** // Next CAPABILITY value: 0x04000000 // Next CAPABILITY value: 0x08000000 //********************************************************************************************** /** Loading Loading @@ -958,7 +964,9 @@ public abstract class Connection extends Conferenceable { if ((capabilities & CAPABILITY_SUPPORT_DEFLECT) == CAPABILITY_SUPPORT_DEFLECT) { builder.append(isLong ? " CAPABILITY_SUPPORT_DEFLECT" : " sup_def"); } if ((capabilities & CAPABILITY_ADD_PARTICIPANT) == CAPABILITY_ADD_PARTICIPANT) { builder.append(isLong ? " CAPABILITY_ADD_PARTICIPANT" : " add_participant"); } builder.append("]"); return builder.toString(); } Loading Loading @@ -2974,6 +2982,14 @@ public abstract class Connection extends Conferenceable { */ public void onSeparate() {} /** * Supports initiation of a conference call by directly adding participants to an ongoing call. * * @param participants with which conference call will be formed. * @hide */ public void onAddConferenceParticipants(@NonNull List<Uri> participants) {} /** * Notifies this Connection of a request to abort. */ Loading telecomm/java/android/telecom/ConnectionService.java +41 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public abstract class ConnectionService extends Service { private static final String SESSION_SPLIT_CONFERENCE = "CS.sFC"; private static final String SESSION_MERGE_CONFERENCE = "CS.mC"; private static final String SESSION_SWAP_CONFERENCE = "CS.sC"; private static final String SESSION_ADD_PARTICIPANT = "CS.aP"; private static final String SESSION_POST_DIAL_CONT = "CS.oPDC"; private static final String SESSION_PULL_EXTERNAL_CALL = "CS.pEC"; private static final String SESSION_SEND_CALL_EVENT = "CS.sCE"; Loading Loading @@ -194,6 +195,7 @@ public abstract class ConnectionService extends Service { private static final int MSG_CREATE_CONFERENCE_COMPLETE = 36; private static final int MSG_CREATE_CONFERENCE_FAILED = 37; private static final int MSG_REJECT_WITH_REASON = 38; private static final int MSG_ADD_PARTICIPANT = 39; private static Connection sNullConnection; Loading Loading @@ -625,6 +627,21 @@ public abstract class ConnectionService extends Service { } } @Override public void addConferenceParticipants(String callId, List<Uri> participants, Session.Info sessionInfo) { Log.startSession(sessionInfo, SESSION_ADD_PARTICIPANT); try { SomeArgs args = SomeArgs.obtain(); args.arg1 = callId; args.arg2 = participants; args.arg3 = Log.createSubsession(); mHandler.obtainMessage(MSG_ADD_PARTICIPANT, args).sendToTarget(); } finally { Log.endSession(); } } @Override public void onPostDialContinue(String callId, boolean proceed, Session.Info sessionInfo) { Log.startSession(sessionInfo, SESSION_POST_DIAL_CONT); Loading Loading @@ -1223,6 +1240,19 @@ public abstract class ConnectionService extends Service { } break; } case MSG_ADD_PARTICIPANT: { SomeArgs args = (SomeArgs) msg.obj; try { Log.continueSession((Session) args.arg3, SESSION_HANDLER + SESSION_ADD_PARTICIPANT); addConferenceParticipants((String) args.arg1, (List<Uri>)args.arg2); } finally { args.recycle(); Log.endSession(); } break; } case MSG_ON_POST_DIAL_CONTINUE: { SomeArgs args = (SomeArgs) msg.obj; try { Loading Loading @@ -2151,6 +2181,17 @@ public abstract class ConnectionService extends Service { } } private void addConferenceParticipants(String callId, List<Uri> participants) { Log.d(this, "addConferenceParticipants(%s)", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "addConferenceParticipants") .onAddConferenceParticipants(participants); } else { findConferenceForAction(callId, "addConferenceParticipants") .onAddConferenceParticipants(participants); } } /** * Notifies a {@link Connection} of a request to pull an external call. * Loading telecomm/java/android/telecom/InCallAdapter.java +14 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,20 @@ public final class InCallAdapter { } } /** * Instructs Telecom to pull participants to existing call * * @param callId The unique ID of the call. * @param participants participants to be pulled to existing call. */ public void addConferenceParticipants(String callId, List<Uri> participants) { try { mAdapter.addConferenceParticipants(callId, participants); } catch (RemoteException ignored) { } } /** * Instructs Telecom to split the specified call from any conference call with which it may be * connected. Loading Loading
telecomm/java/android/telecom/Call.java +22 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.telecom; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; Loading Loading @@ -458,8 +459,14 @@ public final class Call { /** Call supports the deflect feature. */ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x01000000; /** * Call supports adding participants to the call via * {@link #addConferenceParticipants(List)}. * @hide */ public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000; //****************************************************************************************** // Next CAPABILITY value: 0x02000000 // Next CAPABILITY value: 0x04000000 //****************************************************************************************** /** Loading Loading @@ -689,6 +696,9 @@ public final class Call { if (can(capabilities, CAPABILITY_SUPPORT_DEFLECT)) { builder.append(" CAPABILITY_SUPPORT_DEFLECT"); } if (can(capabilities, CAPABILITY_ADD_PARTICIPANT)) { builder.append(" CAPABILITY_ADD_PARTICIPANT"); } builder.append("]"); return builder.toString(); } Loading Loading @@ -1702,6 +1712,17 @@ public final class Call { mInCallAdapter.swapConference(mTelecomCallId); } /** * Pulls participants to existing call by forming a conference call. * See {@link Details#CAPABILITY_ADD_PARTICIPANT}. * * @param participants participants to be pulled to existing call. * @hide */ public void addConferenceParticipants(@NonNull List<Uri> participants) { mInCallAdapter.addConferenceParticipants(mTelecomCallId, participants); } /** * Initiates a request to the {@link ConnectionService} to pull an external call to the local * device. Loading
telecomm/java/android/telecom/Conference.java +7 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,13 @@ public abstract class Conference extends Conferenceable { */ public void onConnectionAdded(Connection connection) {} /** * Notifies the {@link Conference} of a request to add a new participants to the conference call * @param participants that will be added to this conference call * @hide */ public void onAddConferenceParticipants(@NonNull List<Uri> participants) {} /** * Notifies this Conference, which is in {@code STATE_RINGING}, of * a request to accept. Loading
telecomm/java/android/telecom/Connection.java +18 −2 Original line number Diff line number Diff line Loading @@ -381,8 +381,14 @@ public abstract class Connection extends Conferenceable { /** Call supports the deflect feature. */ public static final int CAPABILITY_SUPPORT_DEFLECT = 0x02000000; /** * When set, indicates that this {@link Connection} supports initiation of a conference call * by directly adding participants using {@link #onAddConferenceParticipants(List)}. * @hide */ public static final int CAPABILITY_ADD_PARTICIPANT = 0x04000000; //********************************************************************************************** // Next CAPABILITY value: 0x04000000 // Next CAPABILITY value: 0x08000000 //********************************************************************************************** /** Loading Loading @@ -958,7 +964,9 @@ public abstract class Connection extends Conferenceable { if ((capabilities & CAPABILITY_SUPPORT_DEFLECT) == CAPABILITY_SUPPORT_DEFLECT) { builder.append(isLong ? " CAPABILITY_SUPPORT_DEFLECT" : " sup_def"); } if ((capabilities & CAPABILITY_ADD_PARTICIPANT) == CAPABILITY_ADD_PARTICIPANT) { builder.append(isLong ? " CAPABILITY_ADD_PARTICIPANT" : " add_participant"); } builder.append("]"); return builder.toString(); } Loading Loading @@ -2974,6 +2982,14 @@ public abstract class Connection extends Conferenceable { */ public void onSeparate() {} /** * Supports initiation of a conference call by directly adding participants to an ongoing call. * * @param participants with which conference call will be formed. * @hide */ public void onAddConferenceParticipants(@NonNull List<Uri> participants) {} /** * Notifies this Connection of a request to abort. */ Loading
telecomm/java/android/telecom/ConnectionService.java +41 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public abstract class ConnectionService extends Service { private static final String SESSION_SPLIT_CONFERENCE = "CS.sFC"; private static final String SESSION_MERGE_CONFERENCE = "CS.mC"; private static final String SESSION_SWAP_CONFERENCE = "CS.sC"; private static final String SESSION_ADD_PARTICIPANT = "CS.aP"; private static final String SESSION_POST_DIAL_CONT = "CS.oPDC"; private static final String SESSION_PULL_EXTERNAL_CALL = "CS.pEC"; private static final String SESSION_SEND_CALL_EVENT = "CS.sCE"; Loading Loading @@ -194,6 +195,7 @@ public abstract class ConnectionService extends Service { private static final int MSG_CREATE_CONFERENCE_COMPLETE = 36; private static final int MSG_CREATE_CONFERENCE_FAILED = 37; private static final int MSG_REJECT_WITH_REASON = 38; private static final int MSG_ADD_PARTICIPANT = 39; private static Connection sNullConnection; Loading Loading @@ -625,6 +627,21 @@ public abstract class ConnectionService extends Service { } } @Override public void addConferenceParticipants(String callId, List<Uri> participants, Session.Info sessionInfo) { Log.startSession(sessionInfo, SESSION_ADD_PARTICIPANT); try { SomeArgs args = SomeArgs.obtain(); args.arg1 = callId; args.arg2 = participants; args.arg3 = Log.createSubsession(); mHandler.obtainMessage(MSG_ADD_PARTICIPANT, args).sendToTarget(); } finally { Log.endSession(); } } @Override public void onPostDialContinue(String callId, boolean proceed, Session.Info sessionInfo) { Log.startSession(sessionInfo, SESSION_POST_DIAL_CONT); Loading Loading @@ -1223,6 +1240,19 @@ public abstract class ConnectionService extends Service { } break; } case MSG_ADD_PARTICIPANT: { SomeArgs args = (SomeArgs) msg.obj; try { Log.continueSession((Session) args.arg3, SESSION_HANDLER + SESSION_ADD_PARTICIPANT); addConferenceParticipants((String) args.arg1, (List<Uri>)args.arg2); } finally { args.recycle(); Log.endSession(); } break; } case MSG_ON_POST_DIAL_CONTINUE: { SomeArgs args = (SomeArgs) msg.obj; try { Loading Loading @@ -2151,6 +2181,17 @@ public abstract class ConnectionService extends Service { } } private void addConferenceParticipants(String callId, List<Uri> participants) { Log.d(this, "addConferenceParticipants(%s)", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "addConferenceParticipants") .onAddConferenceParticipants(participants); } else { findConferenceForAction(callId, "addConferenceParticipants") .onAddConferenceParticipants(participants); } } /** * Notifies a {@link Connection} of a request to pull an external call. * Loading
telecomm/java/android/telecom/InCallAdapter.java +14 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,20 @@ public final class InCallAdapter { } } /** * Instructs Telecom to pull participants to existing call * * @param callId The unique ID of the call. * @param participants participants to be pulled to existing call. */ public void addConferenceParticipants(String callId, List<Uri> participants) { try { mAdapter.addConferenceParticipants(callId, participants); } catch (RemoteException ignored) { } } /** * Instructs Telecom to split the specified call from any conference call with which it may be * connected. Loading