am 3d33314e: Merge "Frameworks/base: Use equals for Integer comparison"
* commit '3d33314e03c24758e3b3bbd9e23e40199a259b80': Frameworks/base: Use equals for Integer comparison
This commit is contained in:
@@ -1974,7 +1974,7 @@ public final class MediaCodecInfo {
|
|||||||
(Integer)map.get(MediaFormat.KEY_FLAC_COMPRESSION_LEVEL);
|
(Integer)map.get(MediaFormat.KEY_FLAC_COMPRESSION_LEVEL);
|
||||||
if (complexity == null) {
|
if (complexity == null) {
|
||||||
complexity = flacComplexity;
|
complexity = flacComplexity;
|
||||||
} else if (flacComplexity != null && complexity != flacComplexity) {
|
} else if (flacComplexity != null && !complexity.equals(flacComplexity)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"conflicting values for complexity and " +
|
"conflicting values for complexity and " +
|
||||||
"flac-compression-level");
|
"flac-compression-level");
|
||||||
@@ -1987,7 +1987,7 @@ public final class MediaCodecInfo {
|
|||||||
Integer aacProfile = (Integer)map.get(MediaFormat.KEY_AAC_PROFILE);
|
Integer aacProfile = (Integer)map.get(MediaFormat.KEY_AAC_PROFILE);
|
||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
profile = aacProfile;
|
profile = aacProfile;
|
||||||
} else if (aacProfile != null && aacProfile != profile) {
|
} else if (aacProfile != null && !aacProfile.equals(profile)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"conflicting values for profile and aac-profile");
|
"conflicting values for profile and aac-profile");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -587,14 +587,14 @@ public final class MediaFormat {
|
|||||||
* Sets the value of an integer key.
|
* Sets the value of an integer key.
|
||||||
*/
|
*/
|
||||||
public final void setInteger(String name, int value) {
|
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.
|
* Sets the value of a long key.
|
||||||
*/
|
*/
|
||||||
public final void setLong(String name, long value) {
|
public final void setLong(String name, long value) {
|
||||||
mMap.put(name, new Long(value));
|
mMap.put(name, Long.valueOf(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -433,7 +433,9 @@ class TextTrackCue extends SubtitleTrack.Cue {
|
|||||||
mRegionId.equals(cue.mRegionId) &&
|
mRegionId.equals(cue.mRegionId) &&
|
||||||
mSnapToLines == cue.mSnapToLines &&
|
mSnapToLines == cue.mSnapToLines &&
|
||||||
mAutoLinePosition == cue.mAutoLinePosition &&
|
mAutoLinePosition == cue.mAutoLinePosition &&
|
||||||
(mAutoLinePosition || mLinePosition == cue.mLinePosition) &&
|
(mAutoLinePosition ||
|
||||||
|
((mLinePosition != null && mLinePosition.equals(cue.mLinePosition)) ||
|
||||||
|
(mLinePosition == null && cue.mLinePosition == null))) &&
|
||||||
mTextPosition == cue.mTextPosition &&
|
mTextPosition == cue.mTextPosition &&
|
||||||
mSize == cue.mSize &&
|
mSize == cue.mSize &&
|
||||||
mAlignment == cue.mAlignment &&
|
mAlignment == cue.mAlignment &&
|
||||||
|
|||||||
Reference in New Issue
Block a user