Home | History | Annotate | Download | only in telephony

Lines Matching refs:connection

22 import android.telecom.Connection;
38 * say that we are in a conference call with {@link Connection#PROPERTY_GENERIC_CONFERENCE}.
51 private final Connection.Listener mConnectionListener = new Connection.Listener() {
53 public void onStateChanged(Connection c, int state) {
58 public void onDisconnected(Connection c, DisconnectCause disconnectCause) {
63 public void onDestroyed(Connection c) {
89 /** The CDMA conference connection object. */
92 void add(final CdmaConnection connection) {
93 if (mCdmaConnections.contains(connection)) {
95 Log.w(this, "add - connection already tracked; connection=%s", connection);
99 if (!mCdmaConnections.isEmpty() && connection.isOutgoing()) {
100 // There already exists a connection, so this will probably result in a conference once
101 // it is added. For outgoing connections which are added while another connection
106 connection.forceAsDialing(true);
117 connection.forceAsDialing(false);
118 addInternal(connection);
129 // ConnectionRequest) we can create a new connection it will trigger a call to
132 // so if we end up calling ConnectionService#addConference, the connection service will
133 // not yet know about the new connection, so it won't get added to the conference.
136 mHandler.post(() -> addInternal(connection));
140 private void addInternal(CdmaConnection connection) {
141 mCdmaConnections.add(connection);
142 connection.addConnectionListener(mConnectionListener);
146 void remove(CdmaConnection connection) {
147 if (!mCdmaConnections.contains(connection)) {
149 // when the original connection changes. It does this proactively.
150 Log.d(this, "remove - connection not tracked; connection=%s", connection);
154 connection.removeConnectionListener(mConnectionListener);
155 mCdmaConnections.remove(connection);
161 for (CdmaConnection connection : mCdmaConnections) {
163 if (!connection.isCallWaiting() &&
164 connection.getState() != Connection.STATE_DISCONNECTED) {
165 conferenceConnections.add(connection);
176 // 1) Create a new conference connection if it doesn't exist.
187 mConference.updateCapabilities(Connection.CAPABILITY_MERGE_CONFERENCE);
189 // If the most recently added connection was an incoming call, enable
191 mConference.updateCapabilities(Connection.CAPABILITY_SWAP_CONFERENCE);
195 List<Connection> existingChildConnections =
197 for (CdmaConnection connection : conferenceConnections) {
198 if (!existingChildConnections.contains(connection)) {
199 Log.i(this, "Adding connection to conference call: %s", connection);
200 mConference.addConnection(connection);
202 existingChildConnections.remove(connection);
206 for (Connection oldConnection : existingChildConnections) {
208 Log.i(this, "Removing connection from conference call: %s", oldConnection);
211 // 4) Add the conference to the connection service if it is new.
217 // There are no more connection so if we still have a conference, lets remove it.
219 Log.i(this, "Destroying the CDMA conference connection.");