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
fdd5bcdf
authored
Apr 28, 2022
by
bachinger
Committed by
Ian Baker
May 09, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clean up MediaConstants
PiperOrigin-RevId: 445219759
parent
e7e466f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
libraries/session/src/main/java/androidx/media3/session/MediaConstants.java
libraries/session/src/main/java/androidx/media3/session/PlayerWrapper.java
libraries/session/src/main/java/androidx/media3/session/MediaConstants.java
View file @
fdd5bcdf
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
package
androidx
.
media3
.
session
;
package
androidx
.
media3
.
session
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.support.v4.media.session.PlaybackStateCompat
;
import
androidx.media3.session.MediaLibraryService.LibraryParams
;
/** Constants that can be shared between media session and controller. */
/** Constants that can be shared between media session and controller. */
public
final
class
MediaConstants
{
public
final
class
MediaConstants
{
...
@@ -116,27 +118,36 @@ public final class MediaConstants {
...
@@ -116,27 +118,36 @@ public final class MediaConstants {
/**
/**
* The extras key for the localized error resolution string.
* The extras key for the localized error resolution string.
*
*
* <p>See {@link
* <p>Use this key to populate the extras bundle of the {@link LibraryParams} when {@link
* androidx.media.utils.MediaConstants#PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL}.
* LibraryResult#ofError(int, LibraryParams) creating a LibraryResult} for an unsuccessful service
* call.
*
* @see
* androidx.media.utils.MediaConstants#PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL
*/
*/
public
static
final
String
EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL_COMPAT
=
public
static
final
String
EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL_COMPAT
=
"android.media.extras.ERROR_RESOLUTION_ACTION_LABEL"
;
"android.media.extras.ERROR_RESOLUTION_ACTION_LABEL"
;
/**
/**
* The extras key for the error resolution intent.
* The extras key for the error resolution intent.
*
*
* <p>See {@link
* <p>Use this key to populate the extras bundle of the {@link LibraryParams} when {@link
* androidx.media.utils.MediaConstants#PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT}.
* LibraryResult#ofError(int, LibraryParams) creating a LibraryResult} for an unsuccessful service
* call.
*
* @see
* androidx.media.utils.MediaConstants#PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT
*/
*/
public
static
final
String
EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT_COMPAT
=
public
static
final
String
EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT_COMPAT
=
"android.media.extras.ERROR_RESOLUTION_ACTION_INTENT"
;
"android.media.extras.ERROR_RESOLUTION_ACTION_INTENT"
;
/** The legacy status code for successful execution. */
public
static
final
int
STATUS_CODE_SUCCESS_COMPAT
=
-
1
;
/**
/**
* The legacy error code for expired authentication.
* The legacy error code for expired authentication.
*
*
* <p>See {@code PlaybackStateCompat#ERROR_CODE_AUTHENTICATION_EXPIRED}.
* <p>Use this error code to indicate an expired authentication when {@link
* LibraryResult#ofError(int, LibraryParams) creating a LibraryResult} for an unsuccessful service
* call.
*
* @see PlaybackStateCompat#ERROR_CODE_AUTHENTICATION_EXPIRED
*/
*/
public
static
final
int
ERROR_CODE_AUTHENTICATION_EXPIRED_COMPAT
=
3
;
public
static
final
int
ERROR_CODE_AUTHENTICATION_EXPIRED_COMPAT
=
3
;
...
...
libraries/session/src/main/java/androidx/media3/session/PlayerWrapper.java
View file @
fdd5bcdf
...
@@ -18,7 +18,6 @@ package androidx.media3.session;
...
@@ -18,7 +18,6 @@ package androidx.media3.session;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkNotNull
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkNotNull
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkState
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkState
;
import
static
androidx
.
media3
.
common
.
util
.
Util
.
postOrRun
;
import
static
androidx
.
media3
.
common
.
util
.
Util
.
postOrRun
;
import
static
androidx
.
media3
.
session
.
MediaConstants
.
STATUS_CODE_SUCCESS_COMPAT
;
import
android.media.AudioManager
;
import
android.media.AudioManager
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -55,6 +54,8 @@ import java.util.List;
...
@@ -55,6 +54,8 @@ import java.util.List;
*/
*/
/* package */
class
PlayerWrapper
extends
ForwardingPlayer
{
/* package */
class
PlayerWrapper
extends
ForwardingPlayer
{
private
static
final
int
STATUS_CODE_SUCCESS_COMPAT
=
-
1
;
private
int
legacyStatusCode
;
private
int
legacyStatusCode
;
@Nullable
private
String
legacyErrorMessage
;
@Nullable
private
String
legacyErrorMessage
;
@Nullable
private
Bundle
legacyErrorExtras
;
@Nullable
private
Bundle
legacyErrorExtras
;
...
...
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