Home
last modified time | relevance | path

Searched refs:pageSize (Results 1 – 25 of 35) sorted by relevance

12

/packages/modules/IntentResolver/java/src/com/android/intentresolver/util/cursor/
DPagedCursor.kt24 val pageSize: Int constant
28 fun <E> CursorView<E>.paged(pageSize: Int): PagedCursor<E> = in paged()
32 check(pageSize > 0) { "pageSize must be greater than 0" } in paged()
35 override val pageSize: Int = pageSize in paged() constant
38 this@paged.count.let { it / pageSize + minOf(1, it % pageSize) } in paged()
41 (this@paged.position / pageSize).let { if (this@paged.position < 0) it - 1 else it } in paged()
48 this@paged.moveToPosition(position * pageSize) in paged()
51 this@paged.startAt(position * pageSize).limit(pageSize).asSequence() in paged()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/viewmodel/
DPickerViewModelPaginationTest.java158 int pageSize = 4; in test_getItems_noItemsPresent() local
168 pageSize, /*dateBeforeMs*/ Long.MIN_VALUE, /* rowId*/ -1)); in test_getItems_noItemsPresent()
188 int pageSize = 4; in test_getCategoryItems_noItemsPresent() local
203 pageSize, /*dateBeforeMs*/ Long.MIN_VALUE, /* rowId*/ -1)); in test_getCategoryItems_noItemsPresent()
224 int pageSize = 4; in test_getItems_correctItemsReturned() local
236 pageSize, /*dateBeforeMs*/ Long.MIN_VALUE, /* rowId*/ -1)); in test_getItems_correctItemsReturned()
240 assertThat(testItems.getValue().getItems().size()).isEqualTo(pageSize); in test_getItems_correctItemsReturned()
247 assertThat(testItems.getValue().getItems().size()).isEqualTo(2 * pageSize); in test_getItems_correctItemsReturned()
274 int pageSize = 4; in test_differentCategories_getCategoryItems() local
296 pageSize, /*dateBeforeMs*/ Long.MIN_VALUE, /* rowId*/ -1)); in test_differentCategories_getCategoryItems()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/changelog/
DChangeLogsRequest.java38 private ChangeLogsRequest(@NonNull String token, int pageSize) { in ChangeLogsRequest() argument
42 mPageSize = pageSize; in ChangeLogsRequest()
109 public Builder setPageSize(@IntRange(from = 1, to = 5000) int pageSize) { in setPageSize()
110 if (pageSize > MAXIMUM_PAGE_SIZE) { in setPageSize()
112 "Maximum page size: " + MAXIMUM_PAGE_SIZE + ", requested: " + pageSize); in setPageSize()
114 if (pageSize < 1) { in setPageSize()
115 throw new IllegalArgumentException("Minimum page size: 1, requested: " + pageSize); in setPageSize()
117 mPageSize = pageSize; in setPageSize()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/storage/datatypehelpers/
DRecordHelperTest.java136 int pageSize = 1; in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults() local
161 .setLimit(pageSize + 1); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
165 cursor, pageSize, PageTokenWrapper.ofAscending(isAscending)); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
166 assertThat(page1.first).hasSize(pageSize); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
179 .setLimit(pageSize + 1 + expectedOffset); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
182 helper.getNextInternalRecordsPageAndToken(cursor, pageSize, expectedPageToken); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
183 assertThat(page2.first).hasSize(pageSize); in getNextInternalRecordsPageAndToken_zeroOffsetDesc_correctResults()
192 int pageSize = 3; in getNextInternalRecordsPageAndToken_sameStartTimeAsc_correctResults() local
242 .setPageSize(pageSize) in getNextInternalRecordsPageAndToken_sameStartTimeAsc_correctResults()
249 cursor, pageSize, PageTokenWrapper.ofAscending(isAscending)); in getNextInternalRecordsPageAndToken_sameStartTimeAsc_correctResults()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/
DReadRecordsRequestUsingFilters.java57 int pageSize, in ReadRecordsRequestUsingFilters() argument
64 mPageSize = pageSize; in ReadRecordsRequestUsingFilters()
166 public Builder<T> setPageSize(@IntRange(from = 1, to = 5000) int pageSize) { in setPageSize()
167 if (pageSize < MINIMUM_PAGE_SIZE || pageSize > MAXIMUM_PAGE_SIZE) { in setPageSize()
174 + pageSize); in setPageSize()
176 mPageSize = pageSize; in setPageSize()
DReadMedicalResourcesRequest.java52 @IntRange(from = MINIMUM_PAGE_SIZE, to = MAXIMUM_PAGE_SIZE) int pageSize, in ReadMedicalResourcesRequest()
55 requireInRange(pageSize, MINIMUM_PAGE_SIZE, MAXIMUM_PAGE_SIZE, "pageSize"); in ReadMedicalResourcesRequest()
58 mPageSize = pageSize; in ReadMedicalResourcesRequest()
204 @IntRange(from = MINIMUM_PAGE_SIZE, to = MAXIMUM_PAGE_SIZE) int pageSize) { in setPageSize()
205 requireInRange(pageSize, MINIMUM_PAGE_SIZE, MAXIMUM_PAGE_SIZE, "pageSize"); in setPageSize()
206 mPageSize = pageSize; in setPageSize()
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/contentpreview/payloadtoggle/domain/interactor/
DCursorPreviewsInteractorTest.kt54 pageSize: Int = 16, in <lambda>()
63 this.pageSize = pageSize in <lambda>()
128 pageSize = 2, in <lambda>()
168 pageSize = 16, in <lambda>()
201 pageSize = 16, in <lambda>()
233 pageSize = 16, in <lambda>()
255 pageSize = 16, in <lambda>()
DFetchPreviewsInteractorTest.kt57 pageSize: Int = 16, in runTest()
79 this.pageSize = pageSize in runTest()
191 pageSize = 16, in loadMoreLeft_evictRight()
227 pageSize = 16, in loadMoreRight_evictLeft()
258 pageSize = 16, in noMoreRight_appendUnclaimedFromInitialSelection()
279 pageSize = 16, in noMoreLeft_appendUnclaimedFromInitialSelection()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DPickerProviderMediaGenerator.java101 long generation, String albumId, String[] mimeTypes, long sizeBytes, int pageSize) { in getMedia() argument
102 return getMedia(generation, albumId, mimeTypes, sizeBytes, null, pageSize); in getMedia()
111 int pageSize) { in getMedia() argument
128 pageSize > -1)); in getMedia()
324 final int pageSize = 5; in getCursor() local
340 int startPosition = (pageSize * page); in getCursor()
342 int endPosition = startPosition + pageSize; in getCursor()
375 final int pageSize = 5; in getCursor() local
383 int startPosition = (pageSize * page); in getCursor()
385 int endPosition = startPosition + pageSize; in getCursor()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DCloudProviderQueryExtras.java87 boolean isLocalOnly, int pageSize, long dateTakenBeforeMs, int rowId, in CloudProviderQueryExtras() argument
99 mPageSize = pageSize; in CloudProviderQueryExtras()
130 final int pageSize = INT_DEFAULT; in fromMediaStoreBundle() local
141 generation, limit, isFavorite, isVideo, isLocalOnly, pageSize, dateTakenBeforeMs, in fromMediaStoreBundle()
167 final int pageSize = bundle.getInt(CloudMediaProviderContract.EXTRA_PAGE_SIZE, INT_DEFAULT); in fromCloudMediaBundle() local
176 generation, limit, isFavorite, isVideo, isLocalOnly, pageSize, dateTakenBeforeMs, in fromCloudMediaBundle()
DPaginationParameters.java54 public PaginationParameters(int pageSize, long dateBeforeMs, int rowId) { in PaginationParameters() argument
55 mPageSize = pageSize; in PaginationParameters()
DExternalDbFacade.java297 public Cursor queryMedia(long generation, String albumId, String[] mimeTypes, int pageSize,
321 /* having */ null, orderBy, String.valueOf(pageSize));
325 if (cursor.getCount() > 0 && pageSize != INT_DEFAULT) {
329 cursor.setExtras(getCursorExtras(generation, albumId, pageSize, nextPageToken));
374 private Bundle getCursorExtras(long generation, String albumId, int pageSize,
386 if (pageSize > INT_DEFAULT) {
/packages/modules/IntentResolver/java/src/com/android/intentresolver/contentpreview/payloadtoggle/domain/interactor/
DCursorPreviewsInteractor.kt62 @PageSize private val pageSize: Int, in <lambda>() constant in com.android.intentresolver.contentpreview.payloadtoggle.domain.interactor.CursorPreviewsInteractor
67 check(pageSize > 0) { "pageSize must be greater than zero" } in <lambda>()
80 val pagedCursor: PagedCursor<CursorRow?> = uriCursor.paged(pageSize) in <lambda>()
177 val startPageIdx = startPosition / pageSize in <lambda>()
252 val totalIndices = numLoadedPages * pageSize in <lambda>()
254 val halfPage = pageSize / 2 in <lambda>()
358 @Provides @PageSize fun pageSize(): Int = 16 in getPageRows() method
/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/data/paging/
DAlbumPagingSourceTest.kt71 val pageSize = 10 in <lambda>() constant
75 loadSize = pageSize, in <lambda>()
83 .fetchAlbums(pageKey, pageSize, contentResolver, emptyList(), intent) in <lambda>()
DMediaPagingSourceTest.kt71 val pageSize: Int = 10 in <lambda>() constant
75 loadSize = pageSize, in <lambda>()
83 .fetchMedia(pageKey, pageSize, contentResolver, emptyList(), intent) in <lambda>()
DAlbumMediaPagingSourceTest.kt76 val pageSize = 10 in <lambda>() constant
80 loadSize = pageSize, in <lambda>()
92 pageSize, in <lambda>()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/data/entries/api/
DLoadEntriesHelper.kt76 pageSize: Int = 1000 in <lambda>()
80 data, timeFilterRange, packageName, ascending, pageSize) in <lambda>()
111 dataType, timeFilterRange, input.packageName, ascending = false, pageSize = 1) in <lambda>()
233 pageSize: Int = 1000 in <lambda>()
238 .setPageSize(pageSize) in <lambda>()
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/data/
DMediaProviderClient.kt131 pageSize: Int, in <lambda>()
140 MediaQuery.PAGE_SIZE.key to pageSize, in <lambda>()
177 pageSize: Int, in <lambda>()
186 MediaQuery.PAGE_SIZE.key to pageSize, in <lambda>()
225 pageSize: Int, in <lambda>()
235 MediaQuery.PAGE_SIZE.key to pageSize, in <lambda>()
/packages/modules/IntentResolver/tests/shared/src/com/android/intentresolver/contentpreview/payloadtoggle/domain/interactor/
DPayloadToggleInteractorKosmos.kt41 var Kosmos.pageSize: Int by Fixture { 16 } in <lambda>() variable
54 pageSize = pageSize,
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/v2/model/
DVideoMediaQuery.java32 public VideoMediaQuery(@NonNull Bundle queryArgs, int pageSize) { in VideoMediaQuery() argument
35 mPageSize = pageSize; in VideoMediaQuery()
DFavoritesMediaQuery.java38 int pageSize) { in FavoritesMediaQuery() argument
41 mPageSize = pageSize; in FavoritesMediaQuery()
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/data/paging/
DMediaPagingSource.kt52 val pageSize = params.loadSize in load() constant
61 pageSize, in load()
DAlbumPagingSource.kt52 val pageSize = params.loadSize in load() constant
61 pageSize, in load()
DAlbumMediaPagingSource.kt54 val pageSize = params.loadSize in load() constant
66 pageSize, in load()
/packages/providers/MediaProvider/photopicker/src/com/android/photopicker/features/photogrid/
DPhotoGridViewModel.kt78 pageSize = PHOTO_GRID_PAGE_SIZE,
86 PagingConfig(pageSize = PHOTO_GRID_PAGE_SIZE, maxSize = PHOTO_GRID_MAX_ITEMS_IN_MEMORY)

12