Use SessionError error codes to make lint happy

#cherrypick

PiperOrigin-RevId: 686849343
This commit is contained in:
bachinger 2024-10-17 03:41:13 -07:00 committed by Copybara-Service
parent 38c27d45f1
commit 8681109d1f
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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)