diff options
author | Tyler Gunn <tgunn@google.com> | 2021-03-02 22:11:20 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-03-02 22:11:20 +0000 |
commit | 9882ff4bf8d10c2029c9a0279de4acac305bb84e (patch) | |
tree | 19f13afbf4753653cae3907756d7fdc7bc00f773 /telecomm/java/android/telecom/BluetoothCallQualityReport.java | |
parent | caff316b8a6de182f335a8007df1128b4d07b000 (diff) | |
parent | c90335033b3d20ddbac92c76b8e1d49150517f4b (diff) |
Merge "CallDiagnosticService API" am: c90335033b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607109
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I2958205678f4340e96ce6e845718e994a0231afc
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} */ |