Skip to content

Commit

Permalink
Add missing deprecation for old track selection override getters.
Browse files Browse the repository at this point in the history
The setters in the Builder are already deprecated and using the
old getter is error-prone as they only return the overrides set
with the deprecated setters.

Issue: #9665
PiperOrigin-RevId: 408817640
  • Loading branch information
tonihei committed Nov 11, 2021
1 parent eec8d31 commit 5c6ee88
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,11 @@ public final boolean getRendererDisabled(int rendererIndex) {
* @param rendererIndex The renderer index.
* @param groups The {@link TrackGroupArray}.
* @return Whether there is an override.
* @deprecated Only works to retrieve the overrides set with the deprecated {@link
* ParametersBuilder#setSelectionOverride(int, TrackGroupArray, SelectionOverride)}. Use
* {@link TrackSelectionParameters#trackSelectionOverrides} instead.
*/
@Deprecated
public final boolean hasSelectionOverride(int rendererIndex, TrackGroupArray groups) {
Map<TrackGroupArray, @NullableType SelectionOverride> overrides =
selectionOverrides.get(rendererIndex);
Expand All @@ -1022,7 +1026,11 @@ public final boolean hasSelectionOverride(int rendererIndex, TrackGroupArray gro
* @param rendererIndex The renderer index.
* @param groups The {@link TrackGroupArray}.
* @return The override, or null if no override exists.
* @deprecated Only works to retrieve the overrides set with the deprecated {@link
* ParametersBuilder#setSelectionOverride(int, TrackGroupArray, SelectionOverride)}. Use
* {@link TrackSelectionParameters#trackSelectionOverrides} instead.
*/
@Deprecated
@Nullable
public final SelectionOverride getSelectionOverride(int rendererIndex, TrackGroupArray groups) {
Map<TrackGroupArray, @NullableType SelectionOverride> overrides =
Expand Down

0 comments on commit 5c6ee88

Please sign in to comment.