Merge "Don't check program selector's type for equality." into pi-dev

am: a2015451a7

Change-Id: Id2bf66e26c54a2a8cc86b408b240d6984fb5b97b
This commit is contained in:
Tomasz Wasilczyk
2018-04-20 07:02:48 -07:00
committed by android-build-merger

View File

@@ -498,7 +498,7 @@ public final class ProgramSelector implements Parcelable {
@Override
public int hashCode() {
// secondaryIds and vendorIds are ignored for equality/hashing
return Objects.hash(mProgramType, mPrimaryId);
return mPrimaryId.hashCode();
}
@Override
@@ -507,7 +507,8 @@ public final class ProgramSelector implements Parcelable {
if (!(obj instanceof ProgramSelector)) return false;
ProgramSelector other = (ProgramSelector) obj;
// secondaryIds and vendorIds are ignored for equality/hashing
return other.getProgramType() == mProgramType && mPrimaryId.equals(other.getPrimaryId());
// programType can be inferred from primaryId, thus not checked
return mPrimaryId.equals(other.getPrimaryId());
}
private ProgramSelector(Parcel in) {