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

Commit e8bd225f authored by Jae Seo's avatar Jae Seo Committed by android-build-merger
Browse files

Merge "TIF: Remove the uniqueness check for track ID from notifyTracksChanged" into nyc-dev

am: d1fe7ea8

* commit 'd1fe7ea8':
  TIF: Remove the uniqueness check for track ID from notifyTracksChanged

Change-Id: I39d53fb179f836de9f74fdfeb3f1c88fe816e05f
parents f16c07d8 d1fe7ea8
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -401,20 +401,8 @@ public abstract class TvInputService extends Service {
         * with a different track ID.
         *
         * @param tracks A list which includes track information.
         * @throws IllegalArgumentException if {@code tracks} contains redundant tracks.
         */
        public void notifyTracksChanged(final List<TvTrackInfo> tracks) {
            Set<String> trackIdSet = new HashSet<>();
            for (TvTrackInfo track : tracks) {
                String trackId = track.getId();
                if (trackIdSet.contains(trackId)) {
                    throw new IllegalArgumentException("redundant track ID: " + trackId);
                }
                trackIdSet.add(trackId);
            }
            trackIdSet.clear();

            // TODO: Validate the track list.
            final List<TvTrackInfo> tracksCopy = new ArrayList<>(tracks);
            executeOrPostRunnableOnMainThread(new Runnable() {
                @MainThread