Merge "Actually compare supported color modes." into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1df0020f2d
@@ -1227,6 +1227,33 @@ public final class Display {
|
|||||||
return mMinLuminance;
|
return mMinLuminance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object other) {
|
||||||
|
if (this == other) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(other instanceof HdrCapabilities)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
HdrCapabilities that = (HdrCapabilities) other;
|
||||||
|
|
||||||
|
return Arrays.equals(mSupportedHdrTypes, that.mSupportedHdrTypes)
|
||||||
|
&& mMaxLuminance == that.mMaxLuminance
|
||||||
|
&& mMaxAverageLuminance == that.mMaxAverageLuminance
|
||||||
|
&& mMinLuminance == that.mMinLuminance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 23;
|
||||||
|
hash = hash * 17 + Arrays.hashCode(mSupportedHdrTypes);
|
||||||
|
hash = hash * 17 + Float.floatToIntBits(mMaxLuminance);
|
||||||
|
hash = hash * 17 + Float.floatToIntBits(mMaxAverageLuminance);
|
||||||
|
hash = hash * 17 + Float.floatToIntBits(mMinLuminance);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
public static final Creator<HdrCapabilities> CREATOR = new Creator<HdrCapabilities>() {
|
public static final Creator<HdrCapabilities> CREATOR = new Creator<HdrCapabilities>() {
|
||||||
@Override
|
@Override
|
||||||
public HdrCapabilities createFromParcel(Parcel source) {
|
public HdrCapabilities createFromParcel(Parcel source) {
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public final class DisplayInfo implements Parcelable {
|
|||||||
&& modeId == other.modeId
|
&& modeId == other.modeId
|
||||||
&& defaultModeId == other.defaultModeId
|
&& defaultModeId == other.defaultModeId
|
||||||
&& colorMode == other.colorMode
|
&& colorMode == other.colorMode
|
||||||
&& Objects.equal(supportedColorModes, other.supportedColorModes)
|
&& Arrays.equals(supportedColorModes, other.supportedColorModes)
|
||||||
&& Objects.equal(hdrCapabilities, other.hdrCapabilities)
|
&& Objects.equal(hdrCapabilities, other.hdrCapabilities)
|
||||||
&& logicalDensityDpi == other.logicalDensityDpi
|
&& logicalDensityDpi == other.logicalDensityDpi
|
||||||
&& physicalXDpi == other.physicalXDpi
|
&& physicalXDpi == other.physicalXDpi
|
||||||
|
|||||||
Reference in New Issue
Block a user