Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3c91ba14
authored
Nov 18, 2020
by
olly
Committed by
Ian Baker
Nov 18, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 343003559
parent
755f5b7d
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
176 additions
and
27 deletions
extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java
extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacDecoderJni.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
extensions/opus/src/main/java/com/google/android/exoplayer2/ext/opus/OpusDecoder.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java
library/common/src/main/java/com/google/android/exoplayer2/decoder/CryptoInfo.java
library/common/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
library/common/src/main/java/com/google/android/exoplayer2/metadata/Metadata.java
library/common/src/main/java/com/google/android/exoplayer2/metadata/emsg/EventMessage.java
library/common/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
library/common/src/main/java/com/google/android/exoplayer2/video/ColorInfo.java
library/core/src/main/java/com/google/android/exoplayer2/source/mediaparser/OutputConsumerAdapterV30.java
library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java
library/core/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java
library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java
library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java
library/core/src/main/java/com/google/android/exoplayer2/util/Clock.java
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
library/core/src/main/java/com/google/android/exoplayer2/video/spherical/CameraMotionRenderer.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/PlayerEmsgHandler.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp3/XingSeeker.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java
extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java
View file @
3c91ba14
...
...
@@ -42,7 +42,11 @@ import java.util.List;
// LINT.ThenChange(../../../../../../../jni/ffmpeg_jni.cc)
private
final
String
codecName
;
@Nullable
private
final
byte
[]
extraData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
final
byte
[]
extraData
;
private
final
@C
.
Encoding
int
encoding
;
private
final
int
outputBufferSize
;
...
...
@@ -163,6 +167,8 @@ import java.util.List;
* Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if
* not required.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
static
@Nullable
byte
[]
getExtraData
(
String
mimeType
,
List
<
byte
[]>
initializationData
)
{
switch
(
mimeType
)
{
case
MimeTypes
.
AUDIO_AAC
:
...
...
@@ -209,6 +215,8 @@ import java.util.List;
return
extraData
;
}
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
native
long
ffmpegInitialize
(
String
codecName
,
@Nullable
byte
[]
extraData
,
...
...
@@ -223,6 +231,8 @@ import java.util.List;
private
native
int
ffmpegGetSampleRate
(
long
context
);
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
native
long
ffmpegReset
(
long
context
,
@Nullable
byte
[]
extraData
);
private
native
void
ffmpegRelease
(
long
context
);
...
...
extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacDecoderJni.java
View file @
3c91ba14
...
...
@@ -50,7 +50,11 @@ import java.nio.ByteBuffer;
@Nullable
private
ByteBuffer
byteBufferData
;
@Nullable
private
ExtractorInput
extractorInput
;
@Nullable
private
byte
[]
tempBuffer
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
byte
[]
tempBuffer
;
private
boolean
endOfExtractorInput
;
public
FlacDecoderJni
()
throws
FlacDecoderException
{
...
...
@@ -226,6 +230,8 @@ import java.nio.ByteBuffer;
* @return The corresponding {@link SeekMap.SeekPoints} obtained from the seek table, or {@code
* null} if the stream doesn't have a seek table.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
SeekMap
.
SeekPoints
getSeekPoints
(
long
timeUs
)
{
long
[]
seekPoints
=
new
long
[
4
];
...
...
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
View file @
3c91ba14
...
...
@@ -384,6 +384,8 @@ public final class MediaSessionConnector {
* @param player The player connected to the media session.
* @return The custom action to be included in the session playback state or {@code null}.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
PlaybackStateCompat
.
CustomAction
getCustomAction
(
Player
player
);
}
...
...
@@ -737,6 +739,8 @@ public final class MediaSessionConnector {
Map
<
String
,
CustomActionProvider
>
currentActions
=
new
HashMap
<>();
for
(
CustomActionProvider
customActionProvider
:
customActionProviders
)
{
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
PlaybackStateCompat
.
CustomAction
customAction
=
customActionProvider
.
getCustomAction
(
player
);
if
(
customAction
!=
null
)
{
...
...
extensions/opus/src/main/java/com/google/android/exoplayer2/ext/opus/OpusDecoder.java
View file @
3c91ba14
...
...
@@ -237,6 +237,8 @@ import java.util.List;
int
inputSize
,
SimpleOutputBuffer
outputBuffer
);
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
native
int
opusSecureDecode
(
long
decoder
,
long
timeUs
,
...
...
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
View file @
3c91ba14
...
...
@@ -207,6 +207,8 @@ import java.nio.ByteBuffer;
private
native
long
vpxClose
(
long
context
);
private
native
long
vpxDecode
(
long
context
,
ByteBuffer
encoded
,
int
length
);
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
native
long
vpxSecureDecode
(
long
context
,
ByteBuffer
encoded
,
...
...
library/common/src/main/java/com/google/android/exoplayer2/audio/AudioAttributes.java
View file @
3c91ba14
...
...
@@ -100,7 +100,10 @@ public final class AudioAttributes {
public
final
@C
.
AudioUsage
int
usage
;
public
final
@C
.
AudioAllowedCapturePolicy
int
allowedCapturePolicy
;
@Nullable
private
android
.
media
.
AudioAttributes
audioAttributesV21
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
android
.
media
.
AudioAttributes
audioAttributesV21
;
private
AudioAttributes
(
@C
.
AudioContentType
int
contentType
,
...
...
library/common/src/main/java/com/google/android/exoplayer2/decoder/CryptoInfo.java
View file @
3c91ba14
...
...
@@ -32,13 +32,19 @@ public final class CryptoInfo {
*
* @see android.media.MediaCodec.CryptoInfo#iv
*/
@Nullable
public
byte
[]
iv
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
byte
[]
iv
;
/**
* The 16 byte key id.
*
* @see android.media.MediaCodec.CryptoInfo#key
*/
@Nullable
public
byte
[]
key
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
byte
[]
key
;
/**
* The type of encryption that has been applied. Must be one of the {@link C.CryptoMode} values.
*
...
...
@@ -51,14 +57,20 @@ public final class CryptoInfo {
*
* @see android.media.MediaCodec.CryptoInfo#numBytesOfClearData
*/
@Nullable
public
int
[]
numBytesOfClearData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
int
[]
numBytesOfClearData
;
/**
* The number of trailing encrypted bytes in each sub-sample. If null, all bytes are treated as
* clear and {@link #numBytesOfClearData} must be specified.
*
* @see android.media.MediaCodec.CryptoInfo#numBytesOfEncryptedData
*/
@Nullable
public
int
[]
numBytesOfEncryptedData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
int
[]
numBytesOfEncryptedData
;
/**
* The number of subSamples that make up the buffer's contents.
*
...
...
library/common/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
View file @
3c91ba14
...
...
@@ -291,7 +291,10 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
/** The mimeType of {@link #data}. */
public
final
String
mimeType
;
/** The initialization data. May be null for scheme support checks only. */
@Nullable
public
final
byte
[]
data
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
final
byte
[]
data
;
/**
* @param uuid The {@link UUID} of the DRM scheme, or {@link C#UUID_NIL} if the data is
...
...
@@ -299,6 +302,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
* @param mimeType See {@link #mimeType}.
* @param data See {@link #data}.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
SchemeData
(
UUID
uuid
,
String
mimeType
,
@Nullable
byte
[]
data
)
{
this
(
uuid
,
/* licenseServerUrl= */
null
,
mimeType
,
data
);
}
...
...
@@ -310,6 +315,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
* @param mimeType See {@link #mimeType}.
* @param data See {@link #data}.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
SchemeData
(
UUID
uuid
,
@Nullable
String
licenseServerUrl
,
String
mimeType
,
@Nullable
byte
[]
data
)
{
this
.
uuid
=
Assertions
.
checkNotNull
(
uuid
);
...
...
@@ -358,6 +365,8 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
* @param data The data to include in the copy.
* @return The new instance.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
SchemeData
copyWithData
(
@Nullable
byte
[]
data
)
{
return
new
SchemeData
(
uuid
,
licenseServerUrl
,
mimeType
,
data
);
}
...
...
library/common/src/main/java/com/google/android/exoplayer2/metadata/Metadata.java
View file @
3c91ba14
...
...
@@ -44,6 +44,8 @@ public final class Metadata implements Parcelable {
* Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain
* wrapped metadata.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
default
byte
[]
getWrappedMetadataBytes
()
{
return
null
;
...
...
library/common/src/main/java/com/google/android/exoplayer2/metadata/emsg/EventMessage.java
View file @
3c91ba14
...
...
@@ -118,6 +118,8 @@ public final class EventMessage implements Metadata.Entry {
}
}
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Override
@Nullable
public
byte
[]
getWrappedMetadataBytes
()
{
...
...
library/common/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java
View file @
3c91ba14
...
...
@@ -40,7 +40,11 @@ public final class DataSpec {
@Nullable
private
Uri
uri
;
private
long
uriPositionOffset
;
@HttpMethod
private
int
httpMethod
;
@Nullable
private
byte
[]
httpBody
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
byte
[]
httpBody
;
private
Map
<
String
,
String
>
httpRequestHeaders
;
private
long
position
;
private
long
length
;
...
...
@@ -123,6 +127,8 @@ public final class DataSpec {
* @param httpBody The {@link DataSpec#httpBody}.
* @return The builder.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
Builder
setHttpBody
(
@Nullable
byte
[]
httpBody
)
{
this
.
httpBody
=
httpBody
;
return
this
;
...
...
@@ -324,7 +330,10 @@ public final class DataSpec {
* The HTTP request body, null otherwise. If the body is non-null, then {@code httpBody.length}
* will be non-zero.
*/
@Nullable
public
final
byte
[]
httpBody
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
final
byte
[]
httpBody
;
/**
* Additional HTTP headers to use when requesting the data.
...
...
@@ -529,7 +538,8 @@ public final class DataSpec {
* @param key {@link #key}.
* @param flags {@link #flags}.
*/
@SuppressWarnings
(
"deprecation"
)
// nullness annotations are not applicable to primitive types
@SuppressWarnings
({
"deprecation"
,
"nullness:nullness.on.primitive"
})
@Deprecated
public
DataSpec
(
Uri
uri
,
...
...
@@ -563,7 +573,8 @@ public final class DataSpec {
* @param key {@link #key}.
* @param flags {@link #flags}.
*/
@SuppressWarnings
(
"deprecation"
)
// nullness annotations are not applicable to primitive types
@SuppressWarnings
({
"deprecation"
,
"nullness:nullness.on.primitive"
})
@Deprecated
public
DataSpec
(
Uri
uri
,
...
...
@@ -600,6 +611,8 @@ public final class DataSpec {
* @param flags {@link #flags}.
* @param httpRequestHeaders {@link #httpRequestHeaders}.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Deprecated
public
DataSpec
(
Uri
uri
,
...
...
@@ -624,7 +637,8 @@ public final class DataSpec {
/* customData= */
null
);
}
@SuppressWarnings
(
"deprecation"
)
// nullness annotations are not applicable to primitive types
@SuppressWarnings
({
"deprecation"
,
"nullness:nullness.on.primitive"
})
private
DataSpec
(
Uri
uri
,
long
uriPositionOffset
,
...
...
library/common/src/main/java/com/google/android/exoplayer2/video/ColorInfo.java
View file @
3c91ba14
...
...
@@ -50,7 +50,10 @@ public final class ColorInfo implements Parcelable {
@C
.
ColorTransfer
public
final
int
colorTransfer
;
/** HdrStaticInfo as defined in CTA-861.3, or null if none specified. */
@Nullable
public
final
byte
[]
hdrStaticInfo
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
final
byte
[]
hdrStaticInfo
;
// Lazily initialized hashcode.
private
int
hashCode
;
...
...
@@ -63,6 +66,8 @@ public final class ColorInfo implements Parcelable {
* @param colorTransfer The color transfer characteristics of the video.
* @param hdrStaticInfo HdrStaticInfo as defined in CTA-861.3, or null if none specified.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
ColorInfo
(
@C
.
ColorSpace
int
colorSpace
,
@C
.
ColorRange
int
colorRange
,
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/mediaparser/OutputConsumerAdapterV30.java
View file @
3c91ba14
...
...
@@ -101,8 +101,15 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
@Nullable
private
final
Format
primaryTrackManifestFormat
;
private
ExtractorOutput
extractorOutput
;
@Nullable
private
MediaParser
.
SeekMap
dummySeekMap
;
@Nullable
private
MediaParser
.
SeekMap
lastSeekMap
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
MediaParser
.
SeekMap
dummySeekMap
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
MediaParser
.
SeekMap
lastSeekMap
;
@Nullable
private
String
containerMimeType
;
@Nullable
private
ChunkIndex
lastChunkIndex
;
@Nullable
private
TimestampAdjuster
timestampAdjuster
;
...
...
@@ -194,6 +201,8 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
* {@link MediaParser.SeekPoint#timeMicros} matches the requested timestamp, and {@link
* MediaParser.SeekPoint#position} is 0.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
MediaParser
.
SeekMap
getDummySeekMap
()
{
return
dummySeekMap
;
...
...
@@ -316,6 +325,8 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
scratchDataReaderAdapter
,
(
int
)
sampleData
.
getLength
(),
/* allowEndOfInput= */
true
);
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onSampleCompleted
(
int
trackIndex
,
...
...
@@ -523,6 +534,8 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
return
formatBuilder
.
build
();
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
DrmInitData
toExoPlayerDrmInitData
(
@Nullable
String
schemeType
,
@Nullable
android
.
media
.
DrmInitData
drmInitData
)
{
...
...
@@ -580,6 +593,8 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
private
static
ColorInfo
getColorInfo
(
MediaFormat
mediaFormat
)
{
@Nullable
ByteBuffer
hdrStaticInfoByteBuffer
=
mediaFormat
.
getByteBuffer
(
MediaFormat
.
KEY_HDR_STATIC_INFO
);
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
byte
[]
hdrStaticInfo
=
hdrStaticInfoByteBuffer
!=
null
?
getArray
(
hdrStaticInfoByteBuffer
)
:
null
;
...
...
@@ -681,7 +696,10 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
private
static
final
class
DataReaderAdapter
implements
DataReader
{
@Nullable
public
MediaParser
.
InputReader
input
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
MediaParser
.
InputReader
input
;
@Override
public
int
read
(
byte
[]
target
,
int
offset
,
int
length
)
throws
IOException
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/Cue.java
View file @
3c91ba14
...
...
@@ -565,6 +565,8 @@ public final class Cue {
*
* @see Cue#textAlignment
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
Builder
setTextAlignment
(
@Nullable
Layout
.
Alignment
textAlignment
)
{
this
.
textAlignment
=
textAlignment
;
return
this
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java
View file @
3c91ba14
...
...
@@ -625,6 +625,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
/** Draws a pixel data sub-block, as defined by ETSI EN 300 743 7.2.5.1, into a canvas. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
static
void
paintPixelDataSubBlock
(
byte
[]
pixelData
,
int
[]
clutEntries
,
...
...
@@ -636,9 +638,18 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
ParsableBitArray
data
=
new
ParsableBitArray
(
pixelData
);
int
column
=
horizontalAddress
;
int
line
=
verticalAddress
;
@Nullable
byte
[]
clutMapTable2To4
=
null
;
@Nullable
byte
[]
clutMapTable2To8
=
null
;
@Nullable
byte
[]
clutMapTable4To8
=
null
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
byte
[]
clutMapTable2To4
=
null
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
byte
[]
clutMapTable2To8
=
null
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
byte
[]
clutMapTable4To8
=
null
;
while
(
data
.
bitsLeft
()
!=
0
)
{
int
dataType
=
data
.
readBits
(
8
);
...
...
@@ -693,6 +704,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
/** Paint a 2-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
static
int
paint2BitPixelCodeString
(
ParsableBitArray
data
,
int
[]
clutEntries
,
...
...
@@ -745,6 +758,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
/** Paint a 4-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
static
int
paint4BitPixelCodeString
(
ParsableBitArray
data
,
int
[]
clutEntries
,
...
...
@@ -803,6 +818,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
/** Paint an 8-bit/pixel code string, as defined by ETSI EN 300 743 7.2.5.2, to a canvas. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
static
int
paint8BitPixelCodeString
(
ParsableBitArray
data
,
int
[]
clutEntries
,
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java
View file @
3c91ba14
...
...
@@ -180,7 +180,10 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
*/
private
static
Map
<
String
,
SsaStyle
>
parseStyles
(
ParsableByteArray
data
)
{
Map
<
String
,
SsaStyle
>
styles
=
new
LinkedHashMap
<>();
@Nullable
SsaStyle
.
Format
formatInfo
=
null
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
SsaStyle
.
Format
formatInfo
=
null
;
@Nullable
String
currentLine
;
while
((
currentLine
=
data
.
readLine
())
!=
null
&&
(
data
.
bytesLeft
()
==
0
||
data
.
peekUnsignedByte
()
!=
'['
))
{
...
...
@@ -329,6 +332,8 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
return
cue
.
build
();
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
Layout
.
Alignment
toTextAlignment
(
@SsaStyle
.
SsaAlignment
int
alignment
)
{
switch
(
alignment
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java
View file @
3c91ba14
...
...
@@ -84,7 +84,11 @@ import java.lang.annotation.RetentionPolicy;
@Nullable
private
String
id
;
@RubyType
private
int
rubyType
;
@RubySpan
.
Position
private
int
rubyPosition
;
@Nullable
private
Layout
.
Alignment
textAlign
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
Layout
.
Alignment
textAlign
;
@OptionalBoolean
private
int
textCombine
;
public
TtmlStyle
()
{
...
...
@@ -279,11 +283,15 @@ import java.lang.annotation.RetentionPolicy;
return
rubyPosition
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
Layout
.
Alignment
getTextAlign
()
{
return
textAlign
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
TtmlStyle
setTextAlign
(
@Nullable
Layout
.
Alignment
textAlign
)
{
this
.
textAlign
=
textAlign
;
return
this
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/crypto/AesCipherDataSink.java
View file @
3c91ba14
...
...
@@ -31,7 +31,10 @@ public final class AesCipherDataSink implements DataSink {
private
final
DataSink
wrappedDataSink
;
private
final
byte
[]
secretKey
;
@Nullable
private
final
byte
[]
scratch
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
final
byte
[]
scratch
;
@Nullable
private
AesFlushingCipher
cipher
;
...
...
@@ -59,6 +62,8 @@ public final class AesCipherDataSink implements DataSink {
* cipher calls will be required to complete the operation. If {@code null} then encryption
* will overwrite the input {@code data}.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
AesCipherDataSink
(
byte
[]
secretKey
,
DataSink
wrappedDataSink
,
@Nullable
byte
[]
scratch
)
{
this
.
wrappedDataSink
=
wrappedDataSink
;
this
.
secretKey
=
secretKey
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/util/Clock.java
View file @
3c91ba14
...
...
@@ -52,5 +52,7 @@ public interface Clock {
*
* @see Handler#Handler(Looper, Handler.Callback)
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
HandlerWrapper
createHandler
(
Looper
looper
,
@Nullable
Handler
.
Callback
callback
);
}
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
View file @
3c91ba14
...
...
@@ -50,7 +50,11 @@ public class VideoDecoderOutputBuffer extends OutputBuffer {
/** YUV planes for YUV mode. */
@Nullable
public
ByteBuffer
[]
yuvPlanes
;
@Nullable
public
int
[]
yuvStrides
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
int
[]
yuvStrides
;
public
int
colorspace
;
/**
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/spherical/CameraMotionRenderer.java
View file @
3c91ba14
...
...
@@ -106,7 +106,10 @@ public final class CameraMotionRenderer extends BaseRenderer {
}
buffer
.
flip
();
@Nullable
float
[]
rotation
=
parseMetadata
(
Util
.
castNonNull
(
buffer
.
data
));
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
float
[]
rotation
=
parseMetadata
(
Util
.
castNonNull
(
buffer
.
data
));
if
(
rotation
==
null
)
{
continue
;
}
...
...
@@ -125,6 +128,8 @@ public final class CameraMotionRenderer extends BaseRenderer {
return
true
;
}
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
float
[]
parseMetadata
(
ByteBuffer
data
)
{
if
(
data
.
remaining
()
!=
16
)
{
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/PlayerEmsgHandler.java
View file @
3c91ba14
...
...
@@ -236,6 +236,8 @@ public final class PlayerEmsgHandler implements Handler.Callback {
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
private
@Nullable
Map
.
Entry
<
Long
,
Long
>
ceilingExpiryEntryForPublishTime
(
long
publishTimeMs
)
{
return
manifestPublishTimeToExpiryTimeUs
.
ceilingEntry
(
publishTimeMs
);
}
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp3/XingSeeker.java
View file @
3c91ba14
...
...
@@ -92,7 +92,10 @@ import com.google.android.exoplayer2.util.Util;
* Entries are in the range [0, 255], but are stored as long integers for convenience. Null if the
* table of contents was missing from the header, in which case seeking is not be supported.
*/
@Nullable
private
final
long
[]
tableOfContents
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
final
long
[]
tableOfContents
;
private
XingSeeker
(
long
dataStartPosition
,
int
xingFrameSize
,
long
durationUs
)
{
this
(
...
...
@@ -103,6 +106,8 @@ import com.google.android.exoplayer2.util.Util;
/* tableOfContents= */
null
);
}
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
XingSeeker
(
long
dataStartPosition
,
int
xingFrameSize
,
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java
View file @
3c91ba14
...
...
@@ -170,6 +170,8 @@ public final class PesReader implements TsPayloadReader {
* @param targetLength The target length of the read.
* @return Whether the target length has been reached.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
boolean
continueRead
(
ParsableByteArray
source
,
@Nullable
byte
[]
target
,
int
targetLength
)
{
int
bytesToRead
=
min
(
source
.
bytesLeft
(),
targetLength
-
bytesRead
);
...
...
library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java
View file @
3c91ba14
...
...
@@ -159,7 +159,10 @@ public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
// Generating an incomplete segment list is allowed. Advance to the next media playlist.
continue
;
}
@Nullable
HlsMediaPlaylist
.
Segment
lastInitSegment
=
null
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
HlsMediaPlaylist
.
Segment
lastInitSegment
=
null
;
List
<
HlsMediaPlaylist
.
Segment
>
hlsSegments
=
mediaPlaylist
.
segments
;
for
(
int
i
=
0
;
i
<
hlsSegments
.
size
();
i
++)
{
HlsMediaPlaylist
.
Segment
segment
=
hlsSegments
.
get
(
i
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment