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

Commit 58642e65 authored by Chenjie Luo's avatar Chenjie Luo Committed by android-build-merger
Browse files

Add null pointer check in removeConnection

am: e370b538

* commit 'e370b538':
  Add null pointer check in removeConnection

Change-Id: I7b615a8f7c7a89617c4f748ad74007ec73db6784
parents e7e49b48 e370b538
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1193,13 +1193,15 @@ public abstract class ConnectionService extends Service {

    /** {@hide} */
    protected void removeConnection(Connection connection) {
        String id = mIdByConnection.get(connection);
        connection.unsetConnectionService(this);
        connection.removeConnectionListener(mConnectionListener);
        mConnectionById.remove(mIdByConnection.get(connection));
        String id = mIdByConnection.get(connection);
        if (id != null) {
            mConnectionById.remove(id);
            mIdByConnection.remove(connection);
            mAdapter.removeCall(id);
        }
    }

    private String addConferenceInternal(Conference conference) {
        if (mIdByConference.containsKey(conference)) {