From 67640dff0e76baef864e4b28d65f462a79ea0fcc Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 28 Oct 2021 12:29:01 +0100 Subject: [PATCH] Remove confusing @throws clauses from MediaLibrarySessionCallback These seem to be describing an exception being thrown based on a property of the value being returned from this method? Or is the expectation that every implementation of this interface throws the AssertionError themselves. Given AssertionError is unchecked, and shouldn't be explicitly caught anywhere, it seems easiest just to remove all this documentation? PiperOrigin-RevId: 406107606 --- .../java/androidx/media3/session/MediaLibraryService.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libraries/session/src/main/java/androidx/media3/session/MediaLibraryService.java b/libraries/session/src/main/java/androidx/media3/session/MediaLibraryService.java index 574a1db2de..1708aa7488 100644 --- a/libraries/session/src/main/java/androidx/media3/session/MediaLibraryService.java +++ b/libraries/session/src/main/java/androidx/media3/session/MediaLibraryService.java @@ -157,8 +157,6 @@ public abstract class MediaLibraryService extends MediaSessionService { * @param browser The browser information. * @param params The optional parameters passed by the browser. * @return A pending result that will be resolved with a root media item. - * @throws AssertionError if {@link LibraryResult#value} is {@code null} while {@link - * LibraryResult#resultCode} is {@link LibraryResult#RESULT_SUCCESS}. * @see SessionCommand#COMMAND_CODE_LIBRARY_GET_LIBRARY_ROOT */ default ListenableFuture> onGetLibraryRoot( @@ -211,9 +209,6 @@ public abstract class MediaLibraryService extends MediaSessionService { * @param pageSize The page size to get the paginated result. Will be greater than {@code 0}. * @param params The optional parameters passed by the browser. * @return A pending result that will be resolved with a list of media items. - * @throws AssertionError if {@link LibraryResult#value} is {@code null} or has size greater - * than the {@code pageSize} while {@link LibraryResult#resultCode} is {@link - * LibraryResult#RESULT_SUCCESS}. * @see SessionCommand#COMMAND_CODE_LIBRARY_GET_CHILDREN */ default ListenableFuture>> onGetChildren( @@ -341,9 +336,6 @@ public abstract class MediaLibraryService extends MediaSessionService { * @param pageSize The page size to get the paginated result. Will be greater than {@code 0}. * @param params The optional parameters passed by the browser. * @return A pending result that will be resolved with a list of media items. - * @throws AssertionError if {@link LibraryResult#value} is {@code null} or has size greater - * than the {@code pageSize} while {@link LibraryResult#resultCode} is {@link - * LibraryResult#RESULT_SUCCESS}. * @see SessionCommand#COMMAND_CODE_LIBRARY_GET_SEARCH_RESULT */ default ListenableFuture>> onGetSearchResult(