Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 768cf076 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Finalize MEP functionality." into nyc-mr1-dev

parents e31d6f76 c96b5e08
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1551,6 +1551,8 @@ public abstract class Connection extends Conferenceable {
                return "RINGING";
            case STATE_DIALING:
                return "DIALING";
            case STATE_PULLING_CALL:
                return "PULLING_CALL";
            case STATE_ACTIVE:
                return "ACTIVE";
            case STATE_HOLDING:
+3 −0
Original line number Diff line number Diff line
@@ -556,6 +556,9 @@ public abstract class ConnectionService extends Service {
                case Connection.STATE_DIALING:
                    mAdapter.setDialing(id);
                    break;
                case Connection.STATE_PULLING_CALL:
                    mAdapter.setPulling(id);
                    break;
                case Connection.STATE_DISCONNECTED:
                    // Handled in onDisconnected()
                    break;
+15 −0
Original line number Diff line number Diff line
@@ -142,6 +142,21 @@ final class ConnectionServiceAdapter implements DeathRecipient {
        }
    }

    /**
     * Sets a call's state to pulling (e.g. a call with {@link Connection#PROPERTY_IS_EXTERNAL_CALL}
     * is being pulled to the local device.
     *
     * @param callId The unique ID of the call whose state is changing to dialing.
     */
    void setPulling(String callId) {
        for (IConnectionServiceAdapter adapter : mAdapters) {
            try {
                adapter.setPulling(callId);
            } catch (RemoteException e) {
            }
        }
    }

    /**
     * Sets a call's state to disconnected.
     *
+9 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ final class ConnectionServiceAdapterServant {
    private static final int MSG_REMOVE_EXTRAS = 25;
    private static final int MSG_ON_CONNECTION_EVENT = 26;
    private static final int MSG_SET_CONNECTION_PROPERTIES = 27;
    private static final int MSG_SET_PULLING = 28;

    private final IConnectionServiceAdapter mDelegate;

@@ -101,6 +102,9 @@ final class ConnectionServiceAdapterServant {
                case MSG_SET_DIALING:
                    mDelegate.setDialing((String) msg.obj);
                    break;
                case MSG_SET_PULLING:
                    mDelegate.setPulling((String) msg.obj);
                    break;
                case MSG_SET_DISCONNECTED: {
                    SomeArgs args = (SomeArgs) msg.obj;
                    try {
@@ -298,6 +302,11 @@ final class ConnectionServiceAdapterServant {
            mHandler.obtainMessage(MSG_SET_DIALING, connectionId).sendToTarget();
        }

        @Override
        public void setPulling(String connectionId) {
            mHandler.obtainMessage(MSG_SET_PULLING, connectionId).sendToTarget();
        }

        @Override
        public void setDisconnected(
                String connectionId, DisconnectCause disconnectCause) {
+6 −0
Original line number Diff line number Diff line
@@ -117,6 +117,12 @@ final class RemoteConnectionService {
                    .setState(Connection.STATE_DIALING);
        }

        @Override
        public void setPulling(String callId) {
            findConnectionForAction(callId, "setPulling")
                    .setState(Connection.STATE_PULLING_CALL);
        }

        @Override
        public void setDisconnected(String callId, DisconnectCause disconnectCause) {
            if (mConnectionById.containsKey(callId)) {
Loading