Commit 95d9060a by olly Committed by Oliver Woodman

Suppress SwitchIntDef warning where it makes sense

In both cases it's deliberate that all excluded constants should use
the default branch. Furthermore, there are quite a lot of excluded
constants missing, so it's probably better to suppress the warning
than to include them all.

#minor-release

PiperOrigin-RevId: 355426749
parent 6bcc6791
...@@ -385,9 +385,25 @@ import java.util.concurrent.Callable; ...@@ -385,9 +385,25 @@ import java.util.concurrent.Callable;
case COMMAND_CODE_PLAYER_PAUSE: case COMMAND_CODE_PLAYER_PAUSE:
case COMMAND_CODE_PLAYER_PREPARE: case COMMAND_CODE_PLAYER_PREPARE:
return true; return true;
} case COMMAND_CODE_PLAYER_ADD_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_MOVE_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_REMOVE_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_REPLACE_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_SEEK_TO:
case COMMAND_CODE_PLAYER_SET_AUDIO_ATTRIBUTES:
case COMMAND_CODE_PLAYER_SET_MEDIA_ITEM:
case COMMAND_CODE_PLAYER_SET_PLAYLIST:
case COMMAND_CODE_PLAYER_SET_REPEAT_MODE:
case COMMAND_CODE_PLAYER_SET_SHUFFLE_MODE:
case COMMAND_CODE_PLAYER_SET_SPEED:
case COMMAND_CODE_PLAYER_SKIP_TO_NEXT_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_SKIP_TO_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_SKIP_TO_PREVIOUS_PLAYLIST_ITEM:
case COMMAND_CODE_PLAYER_UPDATE_LIST_METADATA:
default:
return false; return false;
} }
}
private static final class AsyncPlayerCommandResult { private static final class AsyncPlayerCommandResult {
@AsyncCommandCode public final int commandCode; @AsyncCommandCode public final int commandCode;
......
...@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.source.hls; ...@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.source.hls;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import android.annotation.SuppressLint;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
...@@ -143,6 +144,7 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory { ...@@ -143,6 +144,7 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
fileTypes.add(fileType); fileTypes.add(fileType);
} }
@SuppressLint("SwitchIntDef") // HLS only supports a small subset of the defined file types.
@Nullable @Nullable
private Extractor createExtractorByFileType( private Extractor createExtractorByFileType(
@FileTypes.Type int fileType, @FileTypes.Type int fileType,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment