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

Commit 8462d63c authored by Chenjie Luo's avatar Chenjie Luo Committed by android-build-merger
Browse files

Add null pointer check in removeConnection am: e370b538 am: 58642e65

am: 7e745ec4

* commit '7e745ec4':
  Add null pointer check in removeConnection

Change-Id: Iba29d78be4b3cae05144e6c0b68cce5357114ddd
parents c4a41245 7e745ec4
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1367,13 +1367,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)) {