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

Commit 417a9568 authored by Yuncheol Heo's avatar Yuncheol Heo
Browse files

CEC: Fix a bug in HdmiPortInfo.createFromParcel().

- Added equals() for the testing.

Bug: 18376178
Change-Id: Icc7d5fe78b3132bf51754fc3bb0d5a40e0d3b20a
parent d0d23c80
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -136,7 +136,7 @@ public final class HdmiPortInfo implements Parcelable {
                    boolean cec = (source.readInt() == 1);
                    boolean cec = (source.readInt() == 1);
                    boolean arc = (source.readInt() == 1);
                    boolean arc = (source.readInt() == 1);
                    boolean mhl = (source.readInt() == 1);
                    boolean mhl = (source.readInt() == 1);
                    return new HdmiPortInfo(id, type, address, cec, arc, mhl);
                    return new HdmiPortInfo(id, type, address, cec, mhl, arc);
                }
                }


                @Override
                @Override
@@ -172,4 +172,15 @@ public final class HdmiPortInfo implements Parcelable {
        s.append("mhl: ").append(mMhlSupported);
        s.append("mhl: ").append(mMhlSupported);
        return s.toString();
        return s.toString();
    }
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof HdmiPortInfo)) {
            return false;
        }
        final HdmiPortInfo other = (HdmiPortInfo) o;
        return mId == other.mId && mType == other.mType && mAddress == other.mAddress
                && mCecSupported == other.mCecSupported && mArcSupported == other.mArcSupported
                && mMhlSupported == other.mMhlSupported;
    }
}
}