Use @C.DataType intdef in HlsDataSourceFactory.createDataSource

PiperOrigin-RevId: 449973324
This commit is contained in:
ibaker 2022-05-20 14:41:06 +01:00 committed by Ian Baker
parent 994c33f56f
commit b6711af334
2 changed files with 4 additions and 4 deletions

View File

@ -15,6 +15,7 @@
*/
package androidx.media3.exoplayer.hls;
import androidx.media3.common.C;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.datasource.DataSource;
@ -32,7 +33,7 @@ public final class DefaultHlsDataSourceFactory implements HlsDataSourceFactory {
}
@Override
public DataSource createDataSource(int dataType) {
public DataSource createDataSource(@C.DataType int dataType) {
return dataSourceFactory.createDataSource();
}
}

View File

@ -26,9 +26,8 @@ public interface HlsDataSourceFactory {
/**
* Creates a {@link DataSource} for the given data type.
*
* @param dataType The data type for which the {@link DataSource} will be used. One of {@link C}
* {@code .DATA_TYPE_*} constants.
* @param dataType The {@link C.DataType} for which the {@link DataSource} will be used.
* @return A {@link DataSource} for the given data type.
*/
DataSource createDataSource(int dataType);
DataSource createDataSource(@C.DataType int dataType);
}