Add missing null checks on Conference and Connection.

Also add missing bundle passing for Connection Events.

Bug: 27850430
Change-Id: I0f79635929cbe5da18b528b6c1119c7ce4d8e32b
This commit is contained in:
Tyler Gunn
2016-03-29 10:24:22 -07:00
parent dee56a8a79
commit a8fb8aba7c
2 changed files with 9 additions and 5 deletions

View File

@@ -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,7 +681,9 @@ public abstract class Conference extends Conferenceable {
mPreviousExtraKeys = new ArraySet<String>();
}
mPreviousExtraKeys.clear();
mPreviousExtraKeys.addAll(extras.keySet());
if (extras != null) {
mPreviousExtraKeys.addAll(extras.keySet());
}
}
/**

View File

@@ -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,7 +1836,9 @@ public abstract class Connection extends Conferenceable {
mPreviousExtraKeys = new ArraySet<String>();
}
mPreviousExtraKeys.clear();
mPreviousExtraKeys.addAll(extras.keySet());
if (extras != null) {
mPreviousExtraKeys.addAll(extras.keySet());
}
}
/**
@@ -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);
}
}
}