Merge "Implement CodecProfileLevel.{equals|hashCode}" into pi-dev

am: 89a2b6c560

Change-Id: I95389e92c7d0b9cae098997e6c6e7b9aa27a149e
This commit is contained in:
Wonsik Kim
2018-03-12 18:15:45 +00:00
committed by android-build-merger

View File

@@ -3078,6 +3078,23 @@ public final class MediaCodecInfo {
* {@link VideoCapabilities} to determine the codec capabilities.
*/
public int level;
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj instanceof CodecProfileLevel) {
CodecProfileLevel other = (CodecProfileLevel)obj;
return other.profile == profile && other.level == level;
}
return false;
}
@Override
public int hashCode() {
return Long.hashCode(((long)profile << Integer.SIZE) | level);
}
};
/**