mirror of
https://github.com/androidx/media.git
synced 2025-05-07 15:40:37 +08:00
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
This commit is contained in:
parent
6bcc6791b6
commit
95d9060a30
@ -385,8 +385,24 @@ 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 {
|
||||||
|
@ -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 {
|
|||||||
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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user