am 3d33314e: Merge "Frameworks/base: Use equals for Integer comparison"

* commit '3d33314e03c24758e3b3bbd9e23e40199a259b80':
  Frameworks/base: Use equals for Integer comparison
This commit is contained in:
Andreas Gampe
2015-03-16 19:22:00 +00:00
committed by Android Git Automerger
3 changed files with 7 additions and 5 deletions

View File

@@ -1974,7 +1974,7 @@ public final class MediaCodecInfo {
(Integer)map.get(MediaFormat.KEY_FLAC_COMPRESSION_LEVEL);
if (complexity == null) {
complexity = flacComplexity;
} else if (flacComplexity != null && complexity != flacComplexity) {
} else if (flacComplexity != null && !complexity.equals(flacComplexity)) {
throw new IllegalArgumentException(
"conflicting values for complexity and " +
"flac-compression-level");
@@ -1987,7 +1987,7 @@ public final class MediaCodecInfo {
Integer aacProfile = (Integer)map.get(MediaFormat.KEY_AAC_PROFILE);
if (profile == null) {
profile = aacProfile;
} else if (aacProfile != null && aacProfile != profile) {
} else if (aacProfile != null && !aacProfile.equals(profile)) {
throw new IllegalArgumentException(
"conflicting values for profile and aac-profile");
}

View File

@@ -587,14 +587,14 @@ public final class MediaFormat {
* Sets the value of an integer key.
*/
public final void setInteger(String name, int value) {
mMap.put(name, new Integer(value));
mMap.put(name, Integer.valueOf(value));
}
/**
* Sets the value of a long key.
*/
public final void setLong(String name, long value) {
mMap.put(name, new Long(value));
mMap.put(name, Long.valueOf(value));
}
/**

View File

@@ -433,7 +433,9 @@ class TextTrackCue extends SubtitleTrack.Cue {
mRegionId.equals(cue.mRegionId) &&
mSnapToLines == cue.mSnapToLines &&
mAutoLinePosition == cue.mAutoLinePosition &&
(mAutoLinePosition || mLinePosition == cue.mLinePosition) &&
(mAutoLinePosition ||
((mLinePosition != null && mLinePosition.equals(cue.mLinePosition)) ||
(mLinePosition == null && cue.mLinePosition == null))) &&
mTextPosition == cue.mTextPosition &&
mSize == cue.mSize &&
mAlignment == cue.mAlignment &&