diff options
author | Yuncheol Heo <ycheo@google.com> | 2014-11-14 06:43:31 +0900 |
---|---|---|
committer | Yuncheol Heo <ycheo@google.com> | 2014-11-14 06:43:31 +0900 |
commit | 417a95685eaad8790d4639ef6fa1bf6d61ce5ac6 (patch) | |
tree | 4cda8832712c3eb03fc4ed01fe21b2b04b8ceb37 /core/java/android/hardware | |
parent | d0d23c80dae34a126c8024748554a5d07bf3291c (diff) | |
download | frameworks_base-417a95685eaad8790d4639ef6fa1bf6d61ce5ac6.zip frameworks_base-417a95685eaad8790d4639ef6fa1bf6d61ce5ac6.tar.gz frameworks_base-417a95685eaad8790d4639ef6fa1bf6d61ce5ac6.tar.bz2 |
CEC: Fix a bug in HdmiPortInfo.createFromParcel().
- Added equals() for the testing.
Bug: 18376178
Change-Id: Icc7d5fe78b3132bf51754fc3bb0d5a40e0d3b20a
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r-- | core/java/android/hardware/hdmi/HdmiPortInfo.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/java/android/hardware/hdmi/HdmiPortInfo.java b/core/java/android/hardware/hdmi/HdmiPortInfo.java index e52baed..1f0f45a 100644 --- a/core/java/android/hardware/hdmi/HdmiPortInfo.java +++ b/core/java/android/hardware/hdmi/HdmiPortInfo.java @@ -136,7 +136,7 @@ public final class HdmiPortInfo implements Parcelable { boolean cec = (source.readInt() == 1); boolean arc = (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 @@ -172,4 +172,15 @@ public final class HdmiPortInfo implements Parcelable { s.append("mhl: ").append(mMhlSupported); 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; + } } |