summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Marin Shalamanov <shalamanov@google.com> 2020-04-24 14:55:37 +0200
committer Marin Shalamanov <shalamanov@google.com> 2020-04-24 13:02:35 +0000
commit90fd0b19f85dac018dc02533ae5f8b52f66c93de (patch)
treeb9f8d693fd7eec75e54caee68ffeced89db8d8e3
parent443c4d047afb779f574639314e133d781d28c355 (diff)
Use Arrays.hashCode in DeviceProductInfo
Using arrays in Objects.hash() is error prone. Instead we call Arrays.hashCode(). Test: m services Bug: 154302664 Change-Id: Icf00fbaa465ef60951998659ae0333b2faf7042b
-rw-r--r--core/java/android/hardware/display/DeviceProductInfo.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/hardware/display/DeviceProductInfo.java b/core/java/android/hardware/display/DeviceProductInfo.java
index 94c5dd884eab..f8d36758d1b1 100644
--- a/core/java/android/hardware/display/DeviceProductInfo.java
+++ b/core/java/android/hardware/display/DeviceProductInfo.java
@@ -139,7 +139,7 @@ public final class DeviceProductInfo implements Parcelable {
@Override
public int hashCode() {
return Objects.hash(mName, mManufacturerPnpId, mProductId, mModelYear, mManufactureDate,
- mRelativeAddress);
+ Arrays.hashCode(mRelativeAddress));
}
public static final Creator<DeviceProductInfo> CREATOR =