Loading core/java/android/hardware/radio/ProgramSelector.java +13 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public final class ProgramSelector implements Parcelable { mPrimaryId = Objects.requireNonNull(primaryId); mSecondaryIds = secondaryIds; mVendorIds = vendorIds; Arrays.sort(mSecondaryIds); } /** Loading Loading @@ -512,10 +513,22 @@ public final class ProgramSelector implements Parcelable { return mPrimaryId.equals(other.getPrimaryId()); } /** @hide */ public boolean strictEquals(@Nullable Object obj) { if (this == obj) return true; if (!(obj instanceof ProgramSelector)) return false; ProgramSelector other = (ProgramSelector) obj; // vendorIds are ignored for equality // programType can be inferred from primaryId, thus not checked return mPrimaryId.equals(other.getPrimaryId()) && Arrays.equals(mSecondaryIds, other.mSecondaryIds); } private ProgramSelector(Parcel in) { mProgramType = in.readInt(); mPrimaryId = in.readTypedObject(Identifier.CREATOR); mSecondaryIds = in.createTypedArray(Identifier.CREATOR); Arrays.sort(mSecondaryIds); if (Stream.of(mSecondaryIds).anyMatch(id -> id == null)) { throw new IllegalArgumentException("secondaryIds list must not contain nulls"); } Loading core/java/android/hardware/radio/RadioManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1690,7 +1690,7 @@ public class RadioManager { if (!(obj instanceof ProgramInfo)) return false; ProgramInfo other = (ProgramInfo) obj; if (!Objects.equals(mSelector, other.mSelector)) return false; if (!mSelector.strictEquals(other.mSelector)) return false; if (!Objects.equals(mLogicallyTunedTo, other.mLogicallyTunedTo)) return false; if (!Objects.equals(mPhysicallyTunedTo, other.mPhysicallyTunedTo)) return false; if (!Objects.equals(mRelatedContent, other.mRelatedContent)) return false; Loading Loading
core/java/android/hardware/radio/ProgramSelector.java +13 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public final class ProgramSelector implements Parcelable { mPrimaryId = Objects.requireNonNull(primaryId); mSecondaryIds = secondaryIds; mVendorIds = vendorIds; Arrays.sort(mSecondaryIds); } /** Loading Loading @@ -512,10 +513,22 @@ public final class ProgramSelector implements Parcelable { return mPrimaryId.equals(other.getPrimaryId()); } /** @hide */ public boolean strictEquals(@Nullable Object obj) { if (this == obj) return true; if (!(obj instanceof ProgramSelector)) return false; ProgramSelector other = (ProgramSelector) obj; // vendorIds are ignored for equality // programType can be inferred from primaryId, thus not checked return mPrimaryId.equals(other.getPrimaryId()) && Arrays.equals(mSecondaryIds, other.mSecondaryIds); } private ProgramSelector(Parcel in) { mProgramType = in.readInt(); mPrimaryId = in.readTypedObject(Identifier.CREATOR); mSecondaryIds = in.createTypedArray(Identifier.CREATOR); Arrays.sort(mSecondaryIds); if (Stream.of(mSecondaryIds).anyMatch(id -> id == null)) { throw new IllegalArgumentException("secondaryIds list must not contain nulls"); } Loading
core/java/android/hardware/radio/RadioManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1690,7 +1690,7 @@ public class RadioManager { if (!(obj instanceof ProgramInfo)) return false; ProgramInfo other = (ProgramInfo) obj; if (!Objects.equals(mSelector, other.mSelector)) return false; if (!mSelector.strictEquals(other.mSelector)) return false; if (!Objects.equals(mLogicallyTunedTo, other.mLogicallyTunedTo)) return false; if (!Objects.equals(mPhysicallyTunedTo, other.mPhysicallyTunedTo)) return false; if (!Objects.equals(mRelatedContent, other.mRelatedContent)) return false; Loading