Index: talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java |
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java b/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java |
index f2b0aedb2a181142c634c110efef24961627e7e1..730df3553d1427082b57edba0d055c3985121d81 100644 |
--- a/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java |
+++ b/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java |
@@ -56,8 +56,24 @@ public class MediaConstraints { |
public String toString() { |
return key + ": " + value; |
} |
- } |
+ @Override |
+ public boolean equals(Object other) { |
+ if (this == other) { |
+ return true; |
+ } |
+ if (other == null || getClass() != other.getClass()) { |
+ return false; |
+ } |
+ KeyValuePair that = (KeyValuePair)other; |
+ return key.equals(that.key) && value.equals(that.value); |
+ } |
+ |
+ @Override |
+ public int hashCode() { |
+ return key.hashCode() + value.hashCode(); |
+ } |
+ } |
public final List<KeyValuePair> mandatory; |
public final List<KeyValuePair> optional; |