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

Commit 83b03309 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Remove Listener dependency in the telecom test app."

parents 7a6eec53 75d1dc36
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -79,17 +79,6 @@ public class TestConnectionService extends ConnectionService {

    private final class TestConference extends Conference {

        private final Connection.Listener mConnectionListener = new Connection.Listener() {
            @Override
            public void onDestroyed(Connection c) {
                removeConnection(c);
                if (getConnections().size() == 0) {
                    setDisconnected(new DisconnectCause(DisconnectCause.REMOTE));
                    destroy();
                }
            }
        };

        public TestConference(Connection a, Connection b) {
            super(null);
            setConnectionCapabilities(
@@ -100,9 +89,6 @@ public class TestConnectionService extends ConnectionService {
            addConnection(a);
            addConnection(b);

            a.addConnectionListener(mConnectionListener);
            b.addConnectionListener(mConnectionListener);

            a.setConference(this);
            b.setConference(this);

@@ -122,7 +108,6 @@ public class TestConnectionService extends ConnectionService {
            if (getConnections().contains(connection)) {
                connection.setConference(null);
                removeConnection(connection);
                connection.removeConnectionListener(mConnectionListener);
            }
        }