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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user