mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Use TrackGroup.equals when determining equality of BaseTrackSelection
PiperOrigin-RevId: 558150684
This commit is contained in:
parent
271bf7a56e
commit
7f1ee0b390
@ -201,9 +201,7 @@ public abstract class BaseTrackSelection implements ExoTrackSelection {
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
// Track groups are compared by identity not value, as distinct groups may have the same value.
|
||||
@Override
|
||||
@SuppressWarnings({"ReferenceEquality", "EqualsGetClass"})
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
@ -212,6 +210,6 @@ public abstract class BaseTrackSelection implements ExoTrackSelection {
|
||||
return false;
|
||||
}
|
||||
BaseTrackSelection other = (BaseTrackSelection) obj;
|
||||
return group == other.group && Arrays.equals(tracks, other.tracks);
|
||||
return group.equals(other.group) && Arrays.equals(tracks, other.tracks);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user