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
b8cdd7e4
authored
Apr 18, 2019
by
olly
Committed by
Oliver Woodman
Apr 18, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix lint warnings for 2.10
PiperOrigin-RevId: 244268855
parent
b30efe96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
View file @
b8cdd7e4
...
...
@@ -1089,17 +1089,26 @@ public final class MediaSessionConnector {
}
@Override
public
void
onSetShuffleMode
(
int
shuffleMode
)
{
public
void
onSetShuffleMode
(
@PlaybackStateCompat
.
ShuffleMode
int
shuffleMode
)
{
if
(
canDispatchPlaybackAction
(
PlaybackStateCompat
.
ACTION_SET_SHUFFLE_MODE
))
{
boolean
shuffleModeEnabled
=
shuffleMode
==
PlaybackStateCompat
.
SHUFFLE_MODE_ALL
||
shuffleMode
==
PlaybackStateCompat
.
SHUFFLE_MODE_GROUP
;
boolean
shuffleModeEnabled
;
switch
(
shuffleMode
)
{
case
PlaybackStateCompat
.
SHUFFLE_MODE_ALL
:
case
PlaybackStateCompat
.
SHUFFLE_MODE_GROUP
:
shuffleModeEnabled
=
true
;
break
;
case
PlaybackStateCompat
.
SHUFFLE_MODE_NONE
:
case
PlaybackStateCompat
.
SHUFFLE_MODE_INVALID
:
default
:
shuffleModeEnabled
=
false
;
break
;
}
controlDispatcher
.
dispatchSetShuffleModeEnabled
(
player
,
shuffleModeEnabled
);
}
}
@Override
public
void
onSetRepeatMode
(
int
mediaSessionRepeatMode
)
{
public
void
onSetRepeatMode
(
@PlaybackStateCompat
.
RepeatMode
int
mediaSessionRepeatMode
)
{
if
(
canDispatchPlaybackAction
(
PlaybackStateCompat
.
ACTION_SET_REPEAT_MODE
))
{
@RepeatModeUtil
.
RepeatToggleModes
int
repeatMode
;
switch
(
mediaSessionRepeatMode
)
{
...
...
@@ -1110,6 +1119,8 @@ public final class MediaSessionConnector {
case
PlaybackStateCompat
.
REPEAT_MODE_ONE
:
repeatMode
=
Player
.
REPEAT_MODE_ONE
;
break
;
case
PlaybackStateCompat
.
REPEAT_MODE_NONE
:
case
PlaybackStateCompat
.
REPEAT_MODE_INVALID
:
default
:
repeatMode
=
Player
.
REPEAT_MODE_OFF
;
break
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java
View file @
b8cdd7e4
...
...
@@ -17,7 +17,6 @@ package com.google.android.exoplayer2;
import
androidx.annotation.IntDef
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.VisibleForTesting
;
import
com.google.android.exoplayer2.source.MediaSource
;
import
com.google.android.exoplayer2.util.Assertions
;
import
java.io.IOException
;
...
...
@@ -103,7 +102,6 @@ public final class ExoPlaybackException extends Exception {
* @param cause The cause of the failure.
* @return The created instance.
*/
@VisibleForTesting
public
static
ExoPlaybackException
createForUnexpected
(
RuntimeException
cause
)
{
return
new
ExoPlaybackException
(
TYPE_UNEXPECTED
,
cause
,
/* rendererIndex= */
C
.
INDEX_UNSET
);
}
...
...
@@ -124,7 +122,6 @@ public final class ExoPlaybackException extends Exception {
* @param cause The cause of the failure.
* @return The created instance.
*/
@VisibleForTesting
public
static
ExoPlaybackException
createForOutOfMemoryError
(
OutOfMemoryError
cause
)
{
return
new
ExoPlaybackException
(
TYPE_OUT_OF_MEMORY
,
cause
,
/* rendererIndex= */
C
.
INDEX_UNSET
);
}
...
...
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