diff options
author | Scott Lobdell <slobdell@google.com> | 2021-03-23 20:33:04 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-03-24 02:40:01 +0000 |
commit | 757dbb836469bbdd7eb8312deaf584fe0c99c17d (patch) | |
tree | a678b33ad5f0f024d0f942f127b91665f0616193 /telecomm/java/android/telecom/BluetoothCallQualityReport.java | |
parent | 7710a95746be8dba8c6ffe7172f9c01334a2ca81 (diff) | |
parent | f022dd1e6827ebf7c52b06aa40f2059a3f0f5cad (diff) |
Merge SP1A.210311.001
Change-Id: Id1a205bf3f0609c0b13e4bea377056c3b06299fa
Diffstat (limited to 'telecomm/java/android/telecom/BluetoothCallQualityReport.java')
-rw-r--r-- | telecomm/java/android/telecom/BluetoothCallQualityReport.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/BluetoothCallQualityReport.java b/telecomm/java/android/telecom/BluetoothCallQualityReport.java index 10339a818205..8703d84831ff 100644 --- a/telecomm/java/android/telecom/BluetoothCallQualityReport.java +++ b/telecomm/java/android/telecom/BluetoothCallQualityReport.java @@ -24,6 +24,8 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; +import java.util.Objects; + /** * This class represents the quality report that bluetooth framework sends * whenever there's a bad voice quality is detected from their side. @@ -145,6 +147,26 @@ public final class BluetoothCallQualityReport implements Parcelable { } }; + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BluetoothCallQualityReport that = (BluetoothCallQualityReport) o; + return mSentTimestampMillis == that.mSentTimestampMillis + && mChoppyVoice == that.mChoppyVoice && mRssiDbm == that.mRssiDbm + && mSnrDb == that.mSnrDb + && mRetransmittedPacketsCount == that.mRetransmittedPacketsCount + && mPacketsNotReceivedCount == that.mPacketsNotReceivedCount + && mNegativeAcknowledgementCount == that.mNegativeAcknowledgementCount; + } + + @Override + public int hashCode() { + return Objects.hash(mSentTimestampMillis, mChoppyVoice, mRssiDbm, mSnrDb, + mRetransmittedPacketsCount, mPacketsNotReceivedCount, + mNegativeAcknowledgementCount); + } + /** * Builder class for {@link ConnectionRequest} */ |