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

Commit a0a956bf authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Flag equals/hashCode changes in AudioMix" into 24D1-dev

parents bb73b66d dd4535d8
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -275,18 +275,24 @@ public class AudioMix implements Parcelable {
        if (o == null || getClass() != o.getClass()) return false;

        final AudioMix that = (AudioMix) o;
        boolean tokenMatch = android.media.audiopolicy.Flags.audioMixOwnership()
                ? Objects.equals(this.mToken, that.mToken)
                : true;
        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)
            && Objects.equals(this.mToken, that.mToken);
            && tokenMatch;
    }

    /** @hide */
    @Override
    public int hashCode() {
        if (android.media.audiopolicy.Flags.audioMixOwnership()) {
            return Objects.hash(mRouteFlags, mRule, mMixType, mFormat, mToken);
        }
        return Objects.hash(mRouteFlags, mRule, mMixType, mFormat);
    }

    @Override
    public int describeContents() {