Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d33314e authored by Andreas Gampe's avatar Andreas Gampe Committed by Gerrit Code Review
Browse files

Merge "Frameworks/base: Use equals for Integer comparison"

parents 6878ee57 5c597898
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");
                }
+2 −2
Original line number Diff line number Diff line
@@ -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));
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -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 &&