mirror of
https://github.com/samsonjs/media.git
synced 2026-04-24 14:37:45 +00:00
Accept page index 0 for getChildren() in MediaLibraryServiceLegacyStub
This is consistent with the new MediaSessionStub that accepts page index 0
and the JavaDoc of legacy and new service callbacks.
Issue: androidx/media#32
PiperOrigin-RevId: 431390454
(cherry picked from commit 9821dd282c)
This commit is contained in:
parent
405795ca98
commit
291c95daa0
1 changed files with 2 additions and 2 deletions
|
|
@ -198,7 +198,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
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 =
|
||||
|
|
@ -223,7 +223,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
parentId,
|
||||
/* page= */ 0,
|
||||
/* pageSize= */ Integer.MAX_VALUE,
|
||||
/* extras= */ null);
|
||||
/* params= */ null);
|
||||
sendLibraryResultWithMediaItemsWhenReady(result, future);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue