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

Commit d2926a1e authored by Weilin Xu's avatar Weilin Xu Committed by Android (Google) Code Review
Browse files

Merge "Fix secondary ids comparison in strictEquals"

parents 8dd5c889 93fe39ef
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -279,7 +279,6 @@ public final class ProgramSelector implements Parcelable {
        mPrimaryId = Objects.requireNonNull(primaryId);
        mSecondaryIds = secondaryIds;
        mVendorIds = vendorIds;
        Arrays.sort(mSecondaryIds);
    }

    /**
@@ -525,7 +524,9 @@ public final class ProgramSelector implements Parcelable {
        // vendorIds are ignored for equality
        // programType can be inferred from primaryId, thus not checked
        return mPrimaryId.equals(other.getPrimaryId())
                && Arrays.equals(mSecondaryIds, other.mSecondaryIds);
                && mSecondaryIds.length == other.mSecondaryIds.length
                && Arrays.asList(mSecondaryIds).containsAll(
                        Arrays.asList(other.mSecondaryIds));
    }

    private ProgramSelector(Parcel in) {