Loading telecomm/java/android/telecom/Connection.java +23 −0 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,8 @@ public abstract class Connection extends Conferenceable { // The internal telecom call ID associated with this connection. private String mTelecomCallId; // The PhoneAccountHandle associated with this connection. private PhoneAccountHandle mPhoneAccountHandle; private int mState = STATE_NEW; private CallAudioState mCallAudioState; private Uri mAddress; Loading Loading @@ -3098,6 +3100,27 @@ public abstract class Connection extends Conferenceable { } } /** * Sets the {@link PhoneAccountHandle} associated with this connection. * * @hide */ public void setPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) { if (mPhoneAccountHandle != phoneAccountHandle) { mPhoneAccountHandle = phoneAccountHandle; notifyPhoneAccountChanged(phoneAccountHandle); } } /** * Returns the {@link PhoneAccountHandle} associated with this connection. * * @hide */ public PhoneAccountHandle getPhoneAccountHandle() { return mPhoneAccountHandle; } /** * Sends an event associated with this {@code Connection} with associated event extras to the * {@link InCallService}. Loading telecomm/java/android/telecom/ConnectionService.java +33 −3 Original line number Diff line number Diff line Loading @@ -1382,7 +1382,7 @@ public abstract class ConnectionService extends Service { connection.setTelecomCallId(callId); if (connection.getState() != Connection.STATE_DISCONNECTED) { addConnection(callId, connection); addConnection(request.getAccountHandle(), callId, connection); } Uri address = connection.getAddress(); Loading Loading @@ -1846,6 +1846,7 @@ public abstract class ConnectionService extends Service { mAdapter.setIsConferenced(connectionId, id); } } onConferenceAdded(conference); } } Loading Loading @@ -2055,6 +2056,30 @@ public abstract class ConnectionService extends Service { */ public void onConference(Connection connection1, Connection connection2) {} /** * Called when a connection is added. * @hide */ public void onConnectionAdded(Connection connection) {} /** * Called when a connection is removed. * @hide */ public void onConnectionRemoved(Connection connection) {} /** * Called when a conference is added. * @hide */ public void onConferenceAdded(Conference conference) {} /** * Called when a conference is removed. * @hide */ public void onConferenceRemoved(Conference conference) {} /** * Indicates that a remote conference has been created for existing {@link RemoteConnection}s. * When this method is invoked, this {@link ConnectionService} should create its own Loading Loading @@ -2122,16 +2147,18 @@ public abstract class ConnectionService extends Service { // prefix for a unique incremental call ID. id = handle.getComponentName().getClassName() + "@" + getNextCallId(); } addConnection(id, connection); addConnection(handle, id, connection); return id; } private void addConnection(String callId, Connection connection) { private void addConnection(PhoneAccountHandle handle, String callId, Connection connection) { connection.setTelecomCallId(callId); mConnectionById.put(callId, connection); mIdByConnection.put(connection, callId); connection.addConnectionListener(mConnectionListener); connection.setConnectionService(this); connection.setPhoneAccountHandle(handle); onConnectionAdded(connection); } /** {@hide} */ Loading @@ -2143,6 +2170,7 @@ public abstract class ConnectionService extends Service { mConnectionById.remove(id); mIdByConnection.remove(connection); mAdapter.removeCall(id); onConnectionRemoved(connection); } } Loading Loading @@ -2179,6 +2207,8 @@ public abstract class ConnectionService extends Service { mConferenceById.remove(id); mIdByConference.remove(conference); mAdapter.removeCall(id); onConferenceRemoved(conference); } } Loading Loading
telecomm/java/android/telecom/Connection.java +23 −0 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,8 @@ public abstract class Connection extends Conferenceable { // The internal telecom call ID associated with this connection. private String mTelecomCallId; // The PhoneAccountHandle associated with this connection. private PhoneAccountHandle mPhoneAccountHandle; private int mState = STATE_NEW; private CallAudioState mCallAudioState; private Uri mAddress; Loading Loading @@ -3098,6 +3100,27 @@ public abstract class Connection extends Conferenceable { } } /** * Sets the {@link PhoneAccountHandle} associated with this connection. * * @hide */ public void setPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) { if (mPhoneAccountHandle != phoneAccountHandle) { mPhoneAccountHandle = phoneAccountHandle; notifyPhoneAccountChanged(phoneAccountHandle); } } /** * Returns the {@link PhoneAccountHandle} associated with this connection. * * @hide */ public PhoneAccountHandle getPhoneAccountHandle() { return mPhoneAccountHandle; } /** * Sends an event associated with this {@code Connection} with associated event extras to the * {@link InCallService}. Loading
telecomm/java/android/telecom/ConnectionService.java +33 −3 Original line number Diff line number Diff line Loading @@ -1382,7 +1382,7 @@ public abstract class ConnectionService extends Service { connection.setTelecomCallId(callId); if (connection.getState() != Connection.STATE_DISCONNECTED) { addConnection(callId, connection); addConnection(request.getAccountHandle(), callId, connection); } Uri address = connection.getAddress(); Loading Loading @@ -1846,6 +1846,7 @@ public abstract class ConnectionService extends Service { mAdapter.setIsConferenced(connectionId, id); } } onConferenceAdded(conference); } } Loading Loading @@ -2055,6 +2056,30 @@ public abstract class ConnectionService extends Service { */ public void onConference(Connection connection1, Connection connection2) {} /** * Called when a connection is added. * @hide */ public void onConnectionAdded(Connection connection) {} /** * Called when a connection is removed. * @hide */ public void onConnectionRemoved(Connection connection) {} /** * Called when a conference is added. * @hide */ public void onConferenceAdded(Conference conference) {} /** * Called when a conference is removed. * @hide */ public void onConferenceRemoved(Conference conference) {} /** * Indicates that a remote conference has been created for existing {@link RemoteConnection}s. * When this method is invoked, this {@link ConnectionService} should create its own Loading Loading @@ -2122,16 +2147,18 @@ public abstract class ConnectionService extends Service { // prefix for a unique incremental call ID. id = handle.getComponentName().getClassName() + "@" + getNextCallId(); } addConnection(id, connection); addConnection(handle, id, connection); return id; } private void addConnection(String callId, Connection connection) { private void addConnection(PhoneAccountHandle handle, String callId, Connection connection) { connection.setTelecomCallId(callId); mConnectionById.put(callId, connection); mIdByConnection.put(connection, callId); connection.addConnectionListener(mConnectionListener); connection.setConnectionService(this); connection.setPhoneAccountHandle(handle); onConnectionAdded(connection); } /** {@hide} */ Loading @@ -2143,6 +2170,7 @@ public abstract class ConnectionService extends Service { mConnectionById.remove(id); mIdByConnection.remove(connection); mAdapter.removeCall(id); onConnectionRemoved(connection); } } Loading Loading @@ -2179,6 +2207,8 @@ public abstract class ConnectionService extends Service { mConferenceById.remove(id); mIdByConference.remove(conference); mAdapter.removeCall(id); onConferenceRemoved(conference); } } Loading