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

Commit a8fb8aba authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add missing null checks on Conference and Connection.

Also add missing bundle passing for Connection Events.

Bug: 27850430
Change-Id: I0f79635929cbe5da18b528b6c1119c7ce4d8e32b
parent dee56a8a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -665,7 +665,7 @@ public abstract class Conference extends Conferenceable {
        if (mPreviousExtraKeys != null) {
            List<String> toRemove = new ArrayList<String>();
            for (String oldKey : mPreviousExtraKeys) {
                if (!extras.containsKey(oldKey)) {
                if (extras == null || !extras.containsKey(oldKey)) {
                    toRemove.add(oldKey);
                }
            }
@@ -681,8 +681,10 @@ public abstract class Conference extends Conferenceable {
            mPreviousExtraKeys = new ArraySet<String>();
        }
        mPreviousExtraKeys.clear();
        if (extras != null) {
            mPreviousExtraKeys.addAll(extras.keySet());
        }
    }

    /**
     * Adds some extras to this {@link Conference}.  Existing keys are replaced and new ones are
+5 −3
Original line number Diff line number Diff line
@@ -1821,7 +1821,7 @@ public abstract class Connection extends Conferenceable {
        if (mPreviousExtraKeys != null) {
            List<String> toRemove = new ArrayList<String>();
            for (String oldKey : mPreviousExtraKeys) {
                if (!extras.containsKey(oldKey)) {
                if (extras == null || !extras.containsKey(oldKey)) {
                    toRemove.add(oldKey);
                }
            }
@@ -1836,8 +1836,10 @@ public abstract class Connection extends Conferenceable {
            mPreviousExtraKeys = new ArraySet<String>();
        }
        mPreviousExtraKeys.clear();
        if (extras != null) {
            mPreviousExtraKeys.addAll(extras.keySet());
        }
    }

    /**
     * Adds some extras to this {@code Connection}.  Existing keys are replaced and new ones are
@@ -2251,7 +2253,7 @@ public abstract class Connection extends Conferenceable {
     */
    public void sendConnectionEvent(String event, Bundle extras) {
        for (Listener l : mListeners) {
            l.onConnectionEvent(this, event, null);
            l.onConnectionEvent(this, event, extras);
        }
    }
}