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
483a350e
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: 342999390
parent
48d3d631
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
183 additions
and
23 deletions
demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/BitmapOverlayVideoProcessor.java
demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/VideoProcessingGLSurfaceView.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/DefaultMediaItemConverter.java
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerWrapper.java
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionCallback.java
library/common/src/main/java/com/google/android/exoplayer2/Format.java
library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java
library/common/src/main/java/com/google/android/exoplayer2/util/CodecSpecificDataUtil.java
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
library/core/src/main/java/com/google/android/exoplayer2/BasePlayer.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/FlacMetadataReader.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/Id3Peeker.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalGLSurfaceView.java
demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/BitmapOverlayVideoProcessor.java
View file @
483a350e
...
...
@@ -52,8 +52,14 @@ import javax.microedition.khronos.opengles.GL10;
private
final
Canvas
overlayCanvas
;
private
int
program
;
@Nullable
private
GlUtil
.
Attribute
[]
attributes
;
@Nullable
private
GlUtil
.
Uniform
[]
uniforms
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
GlUtil
.
Attribute
[]
attributes
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
GlUtil
.
Uniform
[]
uniforms
;
private
float
bitmapScaleX
;
private
float
bitmapScaleY
;
...
...
demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/VideoProcessingGLSurfaceView.java
View file @
483a350e
...
...
@@ -72,7 +72,10 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView {
@Nullable
private
SurfaceTexture
surfaceTexture
;
@Nullable
private
Surface
surface
;
@Nullable
private
Player
.
VideoComponent
videoComponent
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
Player
.
VideoComponent
videoComponent
;
/**
* Creates a new instance. Pass {@code true} for {@code requireSecureContext} if the {@link
...
...
@@ -151,6 +154,8 @@ public final class VideoProcessingGLSurfaceView extends GLSurfaceView {
*
* @param newVideoComponent The new video component, or {@code null} to detach this view.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
void
setVideoComponent
(
@Nullable
Player
.
VideoComponent
newVideoComponent
)
{
if
(
newVideoComponent
==
videoComponent
)
{
return
;
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java
View file @
483a350e
...
...
@@ -649,7 +649,10 @@ import java.util.Map;
return
lastVolumePercent
;
}
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
if
(
audioComponent
!=
null
)
{
return
(
int
)
(
audioComponent
.
getVolume
()
*
100
);
}
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
View file @
483a350e
...
...
@@ -107,7 +107,11 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader {
@Nullable
private
ImaSdkSettings
imaSdkSettings
;
@Nullable
private
AdErrorListener
adErrorListener
;
@Nullable
private
AdEventListener
adEventListener
;
@Nullable
private
VideoAdPlayer
.
VideoAdPlayerCallback
videoAdPlayerCallback
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
VideoAdPlayer
.
VideoAdPlayerCallback
videoAdPlayerCallback
;
@Nullable
private
List
<
String
>
adMediaMimeTypes
;
@Nullable
private
Set
<
UiElement
>
adUiElements
;
@Nullable
private
Collection
<
CompanionAdSlot
>
companionAdSlots
;
...
...
@@ -385,6 +389,8 @@ public final class ImaAdsLoader implements Player.EventListener, AdsLoader {
* Returns the underlying {@link com.google.ads.interactivemedia.v3.api.AdsLoader} wrapped by this
* instance, or {@code null} if ads have not been requested yet.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
com
.
google
.
ads
.
interactivemedia
.
v3
.
api
.
AdsLoader
getAdsLoader
()
{
return
adTagLoader
!=
null
?
adTagLoader
.
getAdsLoader
()
:
null
;
...
...
extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java
View file @
483a350e
...
...
@@ -92,12 +92,24 @@ import java.util.Set;
@Nullable
public
final
List
<
String
>
adMediaMimeTypes
;
@Nullable
public
final
Set
<
UiElement
>
adUiElements
;
@Nullable
public
final
Collection
<
CompanionAdSlot
>
companionAdSlots
;
@Nullable
public
final
AdErrorEvent
.
AdErrorListener
applicationAdErrorListener
;
@Nullable
public
final
AdEvent
.
AdEventListener
applicationAdEventListener
;
@Nullable
public
final
VideoAdPlayer
.
VideoAdPlayerCallback
applicationVideoAdPlayerCallback
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
final
AdErrorEvent
.
AdErrorListener
applicationAdErrorListener
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
final
AdEvent
.
AdEventListener
applicationAdEventListener
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
final
VideoAdPlayer
.
VideoAdPlayerCallback
applicationVideoAdPlayerCallback
;
@Nullable
public
final
ImaSdkSettings
imaSdkSettings
;
public
final
boolean
debugModeEnabled
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
Configuration
(
long
adPreloadTimeoutMs
,
int
vastLoadTimeoutMs
,
...
...
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/DefaultMediaItemConverter.java
View file @
483a350e
...
...
@@ -53,7 +53,10 @@ public class DefaultMediaItemConverter implements MediaItemConverter {
UriMediaItem
uriMediaItem
=
(
UriMediaItem
)
media2MediaItem
;
uri
=
uriMediaItem
.
getUri
();
}
@Nullable
androidx
.
media2
.
common
.
MediaMetadata
metadata
=
media2MediaItem
.
getMetadata
();
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
androidx
.
media2
.
common
.
MediaMetadata
metadata
=
media2MediaItem
.
getMetadata
();
if
(
metadata
!=
null
)
{
@Nullable
String
uriString
=
metadata
.
getString
(
METADATA_KEY_MEDIA_URI
);
mediaId
=
metadata
.
getString
(
METADATA_KEY_MEDIA_ID
);
...
...
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerWrapper.java
View file @
483a350e
...
...
@@ -83,6 +83,8 @@ import java.util.List;
void
onPlaybackEnded
();
/** Called when the player encounters an error. */
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
void
onError
(
@Nullable
androidx
.
media2
.
common
.
MediaItem
media2MediaItem
);
/** Called when the playlist is changed. */
...
...
@@ -138,7 +140,10 @@ import java.util.List;
controlDispatcher
=
new
DefaultControlDispatcher
();
componentListener
=
new
ComponentListener
();
player
.
addListener
(
componentListener
);
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
if
(
audioComponent
!=
null
)
{
audioComponent
.
addAudioListener
(
componentListener
);
}
...
...
@@ -295,6 +300,8 @@ import java.util.List;
return
player
.
getNextWindowIndex
();
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
androidx
.
media2
.
common
.
MediaItem
getCurrentMediaItem
()
{
int
index
=
getCurrentMediaItemIndex
();
...
...
@@ -381,7 +388,10 @@ import java.util.List;
}
public
AudioAttributesCompat
getAudioAttributes
()
{
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
return
Utils
.
getAudioAttributesCompat
(
audioComponent
!=
null
?
audioComponent
.
getAudioAttributes
()
:
AudioAttributes
.
DEFAULT
);
}
...
...
@@ -404,7 +414,10 @@ import java.util.List;
handler
.
removeCallbacks
(
pollBufferRunnable
);
player
.
removeListener
(
componentListener
);
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Player
.
AudioComponent
audioComponent
=
player
.
getAudioComponent
();
if
(
audioComponent
!=
null
)
{
audioComponent
.
removeAudioListener
(
componentListener
);
}
...
...
extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionCallback.java
View file @
483a350e
...
...
@@ -105,6 +105,8 @@ import java.util.concurrent.TimeoutException;
return
allowedCommandProvider
.
getAllowedCommands
(
session
,
controllerInfo
,
baseAllowedCommands
);
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onPostConnect
(
@NonNull
MediaSession
session
,
@NonNull
MediaSession
.
ControllerInfo
controller
)
{
...
...
@@ -174,6 +176,8 @@ import java.util.concurrent.TimeoutException;
return
SessionResult
.
RESULT_ERROR_NOT_SUPPORTED
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
int
onSkipBackward
(
@NonNull
MediaSession
session
,
@NonNull
MediaSession
.
ControllerInfo
controller
)
{
...
...
@@ -183,6 +187,8 @@ import java.util.concurrent.TimeoutException;
return
SessionResult
.
RESULT_ERROR_NOT_SUPPORTED
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
int
onSkipForward
(
@NonNull
MediaSession
session
,
@NonNull
MediaSession
.
ControllerInfo
controller
)
{
...
...
library/common/src/main/java/com/google/android/exoplayer2/Format.java
View file @
483a350e
...
...
@@ -149,7 +149,11 @@ public final class Format implements Parcelable {
private
float
frameRate
;
private
int
rotationDegrees
;
private
float
pixelWidthHeightRatio
;
@Nullable
private
byte
[]
projectionData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
byte
[]
projectionData
;
@C
.
StereoMode
private
int
stereoMode
;
@Nullable
private
ColorInfo
colorInfo
;
...
...
@@ -478,6 +482,8 @@ public final class Format implements Parcelable {
* @param projectionData The {@link Format#projectionData}.
* @return The builder.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
Builder
setProjectionData
(
@Nullable
byte
[]
projectionData
)
{
this
.
projectionData
=
projectionData
;
return
this
;
...
...
@@ -717,7 +723,10 @@ public final class Format implements Parcelable {
/** The width to height ratio of pixels in the video, or 1.0 if unknown or not applicable. */
public
final
float
pixelWidthHeightRatio
;
/** The projection data for 360/VR video, or null if not applicable. */
@Nullable
public
final
byte
[]
projectionData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
final
byte
[]
projectionData
;
/**
* The stereo layout for 360/3D/VR video, or {@link #NO_VALUE} if not applicable. Valid stereo
* modes are {@link C#STEREO_MODE_MONO}, {@link C#STEREO_MODE_TOP_BOTTOM}, {@link
...
...
@@ -863,6 +872,8 @@ public final class Format implements Parcelable {
}
/** @deprecated Use {@link Format.Builder}. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Deprecated
public
static
Format
createVideoSampleFormat
(
@Nullable
String
id
,
...
...
library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java
View file @
483a350e
...
...
@@ -72,7 +72,11 @@ public final class MediaItem {
private
boolean
drmPlayClearContentWithoutKey
;
private
boolean
drmForceDefaultLicenseUri
;
private
List
<
Integer
>
drmSessionForClearTypes
;
@Nullable
private
byte
[]
drmKeySetId
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
byte
[]
drmKeySetId
;
private
List
<
StreamKey
>
streamKeys
;
@Nullable
private
String
customCacheKey
;
private
List
<
Subtitle
>
subtitles
;
...
...
@@ -366,6 +370,8 @@ public final class MediaItem {
*
* <p>If no valid DRM configuration is specified, the key set ID is ignored.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
public
Builder
setDrmKeySetId
(
@Nullable
byte
[]
keySetId
)
{
this
.
drmKeySetId
=
keySetId
!=
null
?
Arrays
.
copyOf
(
keySetId
,
keySetId
.
length
)
:
null
;
return
this
;
...
...
@@ -635,8 +641,13 @@ public final class MediaItem {
/** The types of clear tracks for which to use a DRM session. */
public
final
List
<
Integer
>
sessionForClearTypes
;
@Nullable
private
final
byte
[]
keySetId
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
final
byte
[]
keySetId
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
DrmConfiguration
(
UUID
uuid
,
@Nullable
Uri
licenseUri
,
...
...
@@ -658,6 +669,8 @@ public final class MediaItem {
}
/** Returns the key set ID of the offline license. */
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
byte
[]
getKeySetId
()
{
return
keySetId
!=
null
?
Arrays
.
copyOf
(
keySetId
,
keySetId
.
length
)
:
null
;
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/CodecSpecificDataUtil.java
View file @
483a350e
...
...
@@ -109,6 +109,8 @@ public final class CodecSpecificDataUtil {
* @return The individual NAL units, or null if the input did not consist of NAL start code
* delimited units.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
public
static
byte
[][]
splitNalUnits
(
byte
[]
data
)
{
if
(!
isNalStartCode
(
data
,
0
))
{
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
View file @
483a350e
...
...
@@ -446,6 +446,8 @@ public final class Util {
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
* @throws IllegalStateException If the current thread doesn't have a {@link Looper}.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
static
Handler
createHandlerForCurrentLooper
(
@Nullable
Handler
.
@UnknownInitialization
Callback
callback
)
{
return
createHandler
(
Assertions
.
checkStateNotNull
(
Looper
.
myLooper
()),
callback
);
...
...
@@ -475,6 +477,8 @@ public final class Util {
* callback is required.
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
static
Handler
createHandlerForCurrentOrMainLooper
(
@Nullable
Handler
.
@UnknownInitialization
Callback
callback
)
{
return
createHandler
(
getCurrentOrMainLooper
(),
callback
);
...
...
@@ -492,7 +496,12 @@ public final class Util {
* callback is required.
* @return A {@link Handler} with the specified callback on the current {@link Looper} thread.
*/
@SuppressWarnings
({
"nullness:argument.type.incompatible"
,
"nullness:return.type.incompatible"
})
// nullness annotations are not applicable to outer types
@SuppressWarnings
({
"nullness:argument.type.incompatible"
,
"nullness:return.type.incompatible"
,
"nullness:nullness.on.outer"
})
public
static
Handler
createHandler
(
Looper
looper
,
@Nullable
Handler
.
@UnknownInitialization
Callback
callback
)
{
return
new
Handler
(
looper
,
callback
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/BasePlayer.java
View file @
483a350e
...
...
@@ -164,6 +164,8 @@ public abstract class BasePlayer implements Player {
if
(
timeline
.
isEmpty
())
{
return
null
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
MediaItem
.
PlaybackProperties
playbackProperties
=
timeline
.
getWindow
(
getCurrentWindowIndex
(),
window
).
mediaItem
.
playbackProperties
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
View file @
483a350e
...
...
@@ -137,7 +137,10 @@ public final class ExoPlaybackException extends Exception {
* The {@link MediaSource.MediaPeriodId} of the media associated with this error, or null if
* undetermined.
*/
@Nullable
public
final
MediaSource
.
MediaPeriodId
mediaPeriodId
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
final
MediaSource
.
MediaPeriodId
mediaPeriodId
;
/**
* Whether the error may be recoverable.
...
...
@@ -326,6 +329,8 @@ public final class ExoPlaybackException extends Exception {
isRecoverable
);
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
private
ExoPlaybackException
(
@Nullable
String
message
,
@Nullable
Throwable
cause
,
...
...
@@ -407,6 +412,8 @@ public final class ExoPlaybackException extends Exception {
* @param mediaPeriodId The {@link MediaSource.MediaPeriodId}.
* @return The copied exception.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@CheckResult
/* package */
ExoPlaybackException
copyWithMediaPeriodId
(
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java
View file @
483a350e
...
...
@@ -410,6 +410,8 @@ import java.util.Set;
// Internal methods to manage child sources.
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
MediaSource
.
MediaPeriodId
getMediaPeriodIdForChildMediaPeriodId
(
MediaSourceHolder
mediaSourceHolder
,
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -530,6 +532,8 @@ import java.util.Set;
// MediaSourceEventListener implementation
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onLoadStarted
(
int
windowIndex
,
...
...
@@ -541,6 +545,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onLoadCompleted
(
int
windowIndex
,
...
...
@@ -552,6 +558,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onLoadCanceled
(
int
windowIndex
,
...
...
@@ -563,6 +571,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onLoadError
(
int
windowIndex
,
...
...
@@ -576,6 +586,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onUpstreamDiscarded
(
int
windowIndex
,
...
...
@@ -586,6 +598,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDownstreamFormatChanged
(
int
windowIndex
,
...
...
@@ -598,6 +612,8 @@ import java.util.Set;
// DrmSessionEventListener implementation
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmSessionAcquired
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -606,6 +622,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmKeysLoaded
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -614,6 +632,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmSessionManagerError
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
,
Exception
error
)
{
...
...
@@ -622,6 +642,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmKeysRestored
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -630,6 +652,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmKeysRemoved
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -638,6 +662,8 @@ import java.util.Set;
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Override
public
void
onDrmSessionReleased
(
int
windowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
)
{
...
...
@@ -647,9 +673,14 @@ import java.util.Set;
}
/** Updates the event dispatcher and returns whether the event should be dispatched. */
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
private
boolean
maybeUpdateEventDispatcher
(
int
childWindowIndex
,
@Nullable
MediaSource
.
MediaPeriodId
childMediaPeriodId
)
{
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
=
null
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
MediaSource
.
MediaPeriodId
mediaPeriodId
=
null
;
if
(
childMediaPeriodId
!=
null
)
{
mediaPeriodId
=
getMediaPeriodIdForChildMediaPeriodId
(
id
,
childMediaPeriodId
);
if
(
mediaPeriodId
==
null
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java
View file @
483a350e
...
...
@@ -73,7 +73,10 @@ public final class Mp4WebvttDecoder extends SimpleSubtitleDecoder {
private
static
Cue
parseVttCueBox
(
ParsableByteArray
sampleData
,
int
remainingCueBoxBytes
)
throws
SubtitleDecoderException
{
@Nullable
Cue
.
Builder
cueBuilder
=
null
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Cue
.
Builder
cueBuilder
=
null
;
@Nullable
CharSequence
cueText
=
null
;
while
(
remainingCueBoxBytes
>
0
)
{
if
(
remainingCueBoxBytes
<
BOX_HEADER_SIZE
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java
View file @
483a350e
...
...
@@ -872,6 +872,8 @@ public final class WebvttCueParser {
}
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
Layout
.
Alignment
convertTextAlignment
(
@TextAlignment
int
textAlignment
)
{
switch
(
textAlignment
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
View file @
483a350e
...
...
@@ -538,7 +538,10 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
private
final
float
bandwidthFraction
;
private
final
long
reservedBandwidth
;
@Nullable
private
long
[][]
allocationCheckpoints
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
long
[][]
allocationCheckpoints
;
/* package */
DefaultBandwidthProvider
(
BandwidthMeter
bandwidthMeter
,
float
bandwidthFraction
,
long
reservedBandwidth
)
{
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java
View file @
483a350e
...
...
@@ -1805,6 +1805,8 @@ public class DefaultTrackSelector extends MappingTrackSelector {
* made.
* @throws ExoPlaybackException If an error occurs while selecting the tracks.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
protected
TrackSelection
.
Definition
selectVideoTrack
(
TrackGroupArray
groups
,
...
...
@@ -1826,6 +1828,8 @@ public class DefaultTrackSelector extends MappingTrackSelector {
return
definition
;
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
TrackSelection
.
Definition
selectAdaptiveVideoTrack
(
TrackGroupArray
groups
,
...
...
@@ -2042,6 +2046,8 @@ public class DefaultTrackSelector extends MappingTrackSelector {
||
(
minVideoBitrate
<=
format
.
bitrate
&&
format
.
bitrate
<=
maxVideoBitrate
));
}
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
static
TrackSelection
.
Definition
selectFixedVideoTrack
(
TrackGroupArray
groups
,
@Capabilities
int
[][]
formatSupport
,
Parameters
params
)
{
...
...
@@ -2286,6 +2292,8 @@ public class DefaultTrackSelector extends MappingTrackSelector {
* @return The {@link TrackSelection} for the renderer, or null if no selection was made.
* @throws ExoPlaybackException If an error occurs while selecting the tracks.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
protected
TrackSelection
.
Definition
selectOtherTrack
(
int
trackType
,
TrackGroupArray
groups
,
@Capabilities
int
[][]
formatSupport
,
Parameters
params
)
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/FlacMetadataReader.java
View file @
483a350e
...
...
@@ -63,6 +63,8 @@ public final class FlacMetadataReader {
@Nullable
public
static
Metadata
peekId3Metadata
(
ExtractorInput
input
,
boolean
parseData
)
throws
IOException
{
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
Id3Decoder
.
FramePredicate
id3FramePredicate
=
parseData
?
null
:
Id3Decoder
.
NO_FRAMES_PREDICATE
;
@Nullable
Metadata
id3Metadata
=
new
Id3Peeker
().
peekId3Data
(
input
,
id3FramePredicate
);
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/Id3Peeker.java
View file @
483a350e
...
...
@@ -44,6 +44,8 @@ public final class Id3Peeker {
* present in the input.
* @throws IOException If an error occurred peeking from the input.
*/
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
public
Metadata
peekId3Data
(
ExtractorInput
input
,
@Nullable
Id3Decoder
.
FramePredicate
id3FramePredicate
)
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java
View file @
483a350e
...
...
@@ -56,7 +56,10 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
// Used by other threads only
@C
.
StereoMode
private
volatile
int
defaultStereoMode
;
@C
.
StereoMode
private
int
lastStereoMode
;
@Nullable
private
byte
[]
lastProjectionData
;
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
@Nullable
private
byte
[]
lastProjectionData
;
// Methods called on any thread.
...
...
@@ -173,6 +176,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
* @param stereoMode A {@link C.StereoMode} value.
* @param timeNs When then new projection should be used.
*/
// nullness annotations are not applicable to primitive types
@SuppressWarnings
(
"nullness:nullness.on.primitive"
)
private
void
setProjection
(
@Nullable
byte
[]
projectionData
,
@C
.
StereoMode
int
stereoMode
,
long
timeNs
)
{
byte
[]
oldProjectionData
=
lastProjectionData
;
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalGLSurfaceView.java
View file @
483a350e
...
...
@@ -71,7 +71,11 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
private
final
SceneRenderer
scene
;
@Nullable
private
SurfaceTexture
surfaceTexture
;
@Nullable
private
Surface
surface
;
@Nullable
private
Player
.
VideoComponent
videoComponent
;
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
@Nullable
private
Player
.
VideoComponent
videoComponent
;
private
boolean
useSensorRotation
;
private
boolean
isStarted
;
private
boolean
isOrientationListenerRegistered
;
...
...
@@ -125,6 +129,8 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
}
/** Sets the {@link Player.VideoComponent} to use. */
// nullness annotations are not applicable to outer types
@SuppressWarnings
(
"nullness:nullness.on.outer"
)
public
void
setVideoComponent
(
@Nullable
Player
.
VideoComponent
newVideoComponent
)
{
if
(
newVideoComponent
==
videoComponent
)
{
return
;
...
...
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