mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Use TrackGroup.equals when determining equality of BaseTrackSelection
PiperOrigin-RevId: 558150684
This commit is contained in:
parent
271bf7a56e
commit
7f1ee0b390
1 changed files with 1 additions and 3 deletions
|
|
@ -201,9 +201,7 @@ public abstract class BaseTrackSelection implements ExoTrackSelection {
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track groups are compared by identity not value, as distinct groups may have the same value.
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({"ReferenceEquality", "EqualsGetClass"})
|
|
||||||
public boolean equals(@Nullable Object obj) {
|
public boolean equals(@Nullable Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -212,6 +210,6 @@ public abstract class BaseTrackSelection implements ExoTrackSelection {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
BaseTrackSelection other = (BaseTrackSelection) obj;
|
BaseTrackSelection other = (BaseTrackSelection) obj;
|
||||||
return group == other.group && Arrays.equals(tracks, other.tracks);
|
return group.equals(other.group) && Arrays.equals(tracks, other.tracks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue