mirror of
https://github.com/androidx/media.git
synced 2025-05-16 20:19:57 +08:00
Suppress warnings emitted by Checker Framework version 2.11.1
More information: https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing Tested: TAP train for global presubmit queue http://test/OCL:278152710:BASE:278144052:1572760370662:22459c12 PiperOrigin-RevId: 278241536
This commit is contained in:
parent
7e070683a3
commit
880b879e8c
@ -647,6 +647,8 @@ public final class MediaSessionConnector {
|
|||||||
* @param customActionProviders The custom action providers, or null to remove all existing custom
|
* @param customActionProviders The custom action providers, or null to remove all existing custom
|
||||||
* action providers.
|
* action providers.
|
||||||
*/
|
*/
|
||||||
|
// incompatible types in assignment.
|
||||||
|
@SuppressWarnings("nullness:assignment.type.incompatible")
|
||||||
public void setCustomActionProviders(@Nullable CustomActionProvider... customActionProviders) {
|
public void setCustomActionProviders(@Nullable CustomActionProvider... customActionProviders) {
|
||||||
this.customActionProviders =
|
this.customActionProviders =
|
||||||
customActionProviders == null ? new CustomActionProvider[0] : customActionProviders;
|
customActionProviders == null ? new CustomActionProvider[0] : customActionProviders;
|
||||||
|
@ -25,7 +25,10 @@ import java.util.Arrays;
|
|||||||
* An {@link AudioProcessor} that applies a mapping from input channels onto specified output
|
* An {@link AudioProcessor} that applies a mapping from input channels onto specified output
|
||||||
* channels. This can be used to reorder, duplicate or discard channels.
|
* channels. This can be used to reorder, duplicate or discard channels.
|
||||||
*/
|
*/
|
||||||
/* package */ final class ChannelMappingAudioProcessor extends BaseAudioProcessor {
|
/* package */
|
||||||
|
// the constructor does not initialize fields: pendingOutputChannels, outputChannels
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
|
final class ChannelMappingAudioProcessor extends BaseAudioProcessor {
|
||||||
|
|
||||||
@Nullable private int[] pendingOutputChannels;
|
@Nullable private int[] pendingOutputChannels;
|
||||||
|
|
||||||
|
@ -326,6 +326,8 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
|
|||||||
new DefaultLoadErrorHandlingPolicy(initialDrmRequestRetryCount));
|
new DefaultLoadErrorHandlingPolicy(initialDrmRequestRetryCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the constructor does not initialize fields: offlineLicenseKeySetId
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
private DefaultDrmSessionManager(
|
private DefaultDrmSessionManager(
|
||||||
UUID uuid,
|
UUID uuid,
|
||||||
ExoMediaDrm.Provider<T> exoMediaDrmProvider,
|
ExoMediaDrm.Provider<T> exoMediaDrmProvider,
|
||||||
|
@ -129,6 +129,8 @@ public final class Track {
|
|||||||
: sampleDescriptionEncryptionBoxes[sampleDescriptionIndex];
|
: sampleDescriptionEncryptionBoxes[sampleDescriptionIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// incompatible types in argument.
|
||||||
|
@SuppressWarnings("nullness:argument.type.incompatible")
|
||||||
public Track copyWithFormat(Format format) {
|
public Track copyWithFormat(Format format) {
|
||||||
return new Track(
|
return new Track(
|
||||||
id,
|
id,
|
||||||
|
@ -943,6 +943,8 @@ public final class MediaCodecUtil {
|
|||||||
|
|
||||||
@Nullable private android.media.MediaCodecInfo[] mediaCodecInfos;
|
@Nullable private android.media.MediaCodecInfo[] mediaCodecInfos;
|
||||||
|
|
||||||
|
// the constructor does not initialize fields: mediaCodecInfos
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
public MediaCodecListCompatV21(boolean includeSecure, boolean includeTunneling) {
|
public MediaCodecListCompatV21(boolean includeSecure, boolean includeTunneling) {
|
||||||
codecKind =
|
codecKind =
|
||||||
includeSecure || includeTunneling
|
includeSecure || includeTunneling
|
||||||
@ -956,6 +958,8 @@ public final class MediaCodecUtil {
|
|||||||
return mediaCodecInfos.length;
|
return mediaCodecInfos.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// incompatible types in return.
|
||||||
|
@SuppressWarnings("nullness:return.type.incompatible")
|
||||||
@Override
|
@Override
|
||||||
public android.media.MediaCodecInfo getCodecInfoAt(int index) {
|
public android.media.MediaCodecInfo getCodecInfoAt(int index) {
|
||||||
ensureMediaCodecInfosInitialized();
|
ensureMediaCodecInfosInitialized();
|
||||||
|
@ -302,6 +302,8 @@ public final class DefaultDownloadIndex implements WritableDownloadIndex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// incompatible types in argument.
|
||||||
|
@SuppressWarnings("nullness:argument.type.incompatible")
|
||||||
private Cursor getCursor(String selection, @Nullable String[] selectionArgs)
|
private Cursor getCursor(String selection, @Nullable String[] selectionArgs)
|
||||||
throws DatabaseIOException {
|
throws DatabaseIOException {
|
||||||
try {
|
try {
|
||||||
|
@ -383,6 +383,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
|
|
||||||
@Nullable private byte[] sampleData;
|
@Nullable private byte[] sampleData;
|
||||||
|
|
||||||
|
// the constructor does not initialize fields: sampleData
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
|
public SourceLoadable(DataSpec dataSpec, DataSource dataSource) {
|
||||||
this.dataSpec = dataSpec;
|
this.dataSpec = dataSpec;
|
||||||
this.dataSource = new StatsDataSource(dataSource);
|
this.dataSource = new StatsDataSource(dataSource);
|
||||||
|
@ -609,13 +609,18 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
|
|||||||
|
|
||||||
@Nullable private long[][] allocationCheckpoints;
|
@Nullable private long[][] allocationCheckpoints;
|
||||||
|
|
||||||
/* package */ DefaultBandwidthProvider(
|
/* package */
|
||||||
|
// the constructor does not initialize fields: allocationCheckpoints
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
|
DefaultBandwidthProvider(
|
||||||
BandwidthMeter bandwidthMeter, float bandwidthFraction, long reservedBandwidth) {
|
BandwidthMeter bandwidthMeter, float bandwidthFraction, long reservedBandwidth) {
|
||||||
this.bandwidthMeter = bandwidthMeter;
|
this.bandwidthMeter = bandwidthMeter;
|
||||||
this.bandwidthFraction = bandwidthFraction;
|
this.bandwidthFraction = bandwidthFraction;
|
||||||
this.reservedBandwidth = reservedBandwidth;
|
this.reservedBandwidth = reservedBandwidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unboxing a possibly-null reference allocationCheckpoints[nextIndex][0]
|
||||||
|
@SuppressWarnings("nullness:unboxing.of.nullable")
|
||||||
@Override
|
@Override
|
||||||
public long getAllocatedBandwidth() {
|
public long getAllocatedBandwidth() {
|
||||||
long totalBandwidth = (long) (bandwidthMeter.getBitrateEstimate() * bandwidthFraction);
|
long totalBandwidth = (long) (bandwidthMeter.getBitrateEstimate() * bandwidthFraction);
|
||||||
|
@ -36,6 +36,8 @@ public final class DataSchemeDataSource extends BaseDataSource {
|
|||||||
private int endPosition;
|
private int endPosition;
|
||||||
private int readPosition;
|
private int readPosition;
|
||||||
|
|
||||||
|
// the constructor does not initialize fields: data
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
public DataSchemeDataSource() {
|
public DataSchemeDataSource() {
|
||||||
super(/* isNetwork= */ false);
|
super(/* isNetwork= */ false);
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
|
|
||||||
// Methods called on any thread.
|
// Methods called on any thread.
|
||||||
|
|
||||||
|
// the constructor does not initialize fields: lastProjectionData
|
||||||
|
@SuppressWarnings("nullness:initialization.fields.uninitialized")
|
||||||
public SceneRenderer() {
|
public SceneRenderer() {
|
||||||
frameAvailable = new AtomicBoolean();
|
frameAvailable = new AtomicBoolean();
|
||||||
resetRotationAtNextFrame = new AtomicBoolean(true);
|
resetRotationAtNextFrame = new AtomicBoolean(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user