mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Use SessionError error codes to make lint happy
#cherrypick PiperOrigin-RevId: 686849343
This commit is contained in:
parent
38c27d45f1
commit
8681109d1f
2 changed files with 3 additions and 3 deletions
|
|
@ -278,12 +278,12 @@ public class MediaSessionProviderService extends Service {
|
|||
SessionCommand customCommand,
|
||||
Bundle args) {
|
||||
SessionResult sessionResult =
|
||||
new SessionResult(SessionResult.RESULT_ERROR_NOT_SUPPORTED);
|
||||
new SessionResult(SessionError.ERROR_NOT_SUPPORTED);
|
||||
if (customCommand.equals(playlistAddButton.sessionCommand)
|
||||
|| customCommand.equals(radioButton.sessionCommand)) {
|
||||
Bundle extras = new Bundle();
|
||||
String receivedMediaId = args.getString(MediaConstants.EXTRA_KEY_MEDIA_ID);
|
||||
@SessionResult.Code int resultCode = SessionResult.RESULT_ERROR_BAD_VALUE;
|
||||
@SessionResult.Code int resultCode = SessionError.ERROR_BAD_VALUE;
|
||||
if (receivedMediaId != null) {
|
||||
extras.putString(MediaConstants.EXTRA_KEY_MEDIA_ID, receivedMediaId);
|
||||
resultCode = SessionResult.RESULT_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ public class MockMediaLibraryService extends MediaLibraryService {
|
|||
getPaginatedResult(GET_CHILDREN_RESULT, page, pageSize), params))
|
||||
: Futures.immediateFuture(
|
||||
LibraryResult.ofError(
|
||||
LibraryResult.RESULT_ERROR_SESSION_AUTHENTICATION_EXPIRED,
|
||||
SessionError.ERROR_SESSION_AUTHENTICATION_EXPIRED,
|
||||
new LibraryParams.Builder().build()));
|
||||
} else if (Objects.equals(parentId, PARENT_ID_AUTH_EXPIRED_ERROR)
|
||||
|| Objects.equals(parentId, PARENT_ID_AUTH_EXPIRED_ERROR_DEPRECATED)
|
||||
|
|
|
|||
Loading…
Reference in a new issue