Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4235fe55 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "Fix AudioMix.equals()" into udc-dev am: 3a53c550

parents dc017d90 3a53c550
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -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 (mRouteFlags == that.mRouteFlags)
                && (mMixType == that.mMixType)
                && Objects.equals(mRule, that.mRule)
                && Objects.equals(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;