mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
This commit is contained in:
parent
3e9dfaa586
commit
9821dd282c
1 changed files with 2 additions and 2 deletions
|
|
@ -198,7 +198,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
try {
|
try {
|
||||||
int page = options.getInt(EXTRA_PAGE);
|
int page = options.getInt(EXTRA_PAGE);
|
||||||
int pageSize = options.getInt(EXTRA_PAGE_SIZE);
|
int pageSize = options.getInt(EXTRA_PAGE_SIZE);
|
||||||
if (page > 0 && pageSize > 0) {
|
if (page >= 0 && pageSize > 0) {
|
||||||
// Requesting the list of children through pagination.
|
// Requesting the list of children through pagination.
|
||||||
@Nullable
|
@Nullable
|
||||||
LibraryParams params =
|
LibraryParams params =
|
||||||
|
|
@ -223,7 +223,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
parentId,
|
parentId,
|
||||||
/* page= */ 0,
|
/* page= */ 0,
|
||||||
/* pageSize= */ Integer.MAX_VALUE,
|
/* pageSize= */ Integer.MAX_VALUE,
|
||||||
/* extras= */ null);
|
/* params= */ null);
|
||||||
sendLibraryResultWithMediaItemsWhenReady(result, future);
|
sendLibraryResultWithMediaItemsWhenReady(result, future);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue