Merge "Fix AudioMix.equals()" am: e86d8d8b43

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2487755

Change-Id: I1ca3fbdc4e8fabfc68b255be4c4b43691317f638
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Eric Laurent
2023-04-26 08:09:23 +00:00
committed by Automerger Merge Worker

View File

@@ -25,6 +25,8 @@ import android.media.AudioFormat;
import android.media.AudioSystem;
import android.os.Build;
import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -252,10 +254,10 @@ public class AudioMix {
if (o == null || getClass() != o.getClass()) return false;
final AudioMix that = (AudioMix) o;
return (this.mRouteFlags == that.mRouteFlags)
&& (this.mRule == that.mRule)
&& (this.mMixType == that.mMixType)
&& (this.mFormat == that.mFormat);
return Objects.equals(this.mRouteFlags, that.mRouteFlags)
&& Objects.equals(this.mRule, that.mRule)
&& Objects.equals(this.mMixType, that.mMixType)
&& Objects.equals(this.mFormat, that.mFormat);
}
/** @hide */
@@ -340,7 +342,8 @@ public class AudioMix {
* @param address
* @return the same Builder instance.
*/
Builder setDevice(int deviceType, String address) {
@VisibleForTesting
public Builder setDevice(int deviceType, String address) {
mDeviceSystemType = deviceType;
mDeviceAddress = address;
return this;