Skip to content

Commit

Permalink
Accept page index 0 for getChildren() in MediaLibraryServiceLegacyStub
Browse files Browse the repository at this point in the history
This is consistent with the new MediaSessionStub that accepts page index 0
and the JavaDoc of legacy and new service callbacks.

Issue: #32
PiperOrigin-RevId: 431390454
(cherry picked from commit 9821dd2)
  • Loading branch information
marcbaechinger authored and icbaker committed Mar 8, 2022
1 parent 405795c commit 291c95d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void onLoadChildren(
try {
int page = options.getInt(EXTRA_PAGE);
int pageSize = options.getInt(EXTRA_PAGE_SIZE);
if (page > 0 && pageSize > 0) {
if (page >= 0 && pageSize > 0) {
// Requesting the list of children through pagination.
@Nullable
LibraryParams params =
Expand All @@ -223,7 +223,7 @@ public void onLoadChildren(
parentId,
/* page= */ 0,
/* pageSize= */ Integer.MAX_VALUE,
/* extras= */ null);
/* params= */ null);
sendLibraryResultWithMediaItemsWhenReady(result, future);
});
}
Expand Down

0 comments on commit 291c95d

Please sign in to comment.