Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ap...@google.com <ap...@google.com> #3
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit c7505aeb858ee828b9cb386f9923b576eb5cd740
Author: Clara Fok <clarafok@google.com>
Date: Tue Dec 12 16:05:24 2023
Refactor event processing for Append and Prepend
First CL to move DifferCallback duties for Append/Prepend PageEvents out of PagingDataPresenter.
AsyncPagingDataDiffer which implements PagingDataPresenter overrides presentPagingDataEvent method to handle PageEvents for Append and Prepend, which includes calculating callback states and invoking RecyclerView's ListUpdateCallback.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:jvmTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Bug: 315214786
Change-Id: Ibc544339c04c1426930e355da4ce647d9d7fdeba
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/ContiguousPagedList.jvm.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedList.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/NullPaddedList.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
A paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageFetcherSnapshotStateTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-common/src/jvmTest/kotlin/androidx/paging/ContiguousPagedListTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/NullPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
https://android-review.googlesource.com/2871512
Branch: androidx-main
commit c7505aeb858ee828b9cb386f9923b576eb5cd740
Author: Clara Fok <clarafok@google.com>
Date: Tue Dec 12 16:05:24 2023
Refactor event processing for Append and Prepend
First CL to move DifferCallback duties for Append/Prepend PageEvents out of PagingDataPresenter.
AsyncPagingDataDiffer which implements PagingDataPresenter overrides presentPagingDataEvent method to handle PageEvents for Append and Prepend, which includes calculating callback states and invoking RecyclerView's ListUpdateCallback.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:jvmTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Bug: 315214786
Change-Id: Ibc544339c04c1426930e355da4ce647d9d7fdeba
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/ContiguousPagedList.jvm.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedList.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/NullPaddedList.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
A paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageFetcherSnapshotStateTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-common/src/jvmTest/kotlin/androidx/paging/ContiguousPagedListTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/NullPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 949e051393841ca6c132098efaf6de16c320d7fc
Author: Clara Fok <clarafok@google.com>
Date: Wed Dec 20 13:57:23 2023
Remove transform lastAccessedIndex after refresh
Transform lastAccessedIndex fulfills two roles - trigger prefetch and trigger load if new list is empty.
We still need to trigger new loads if refreshed page is empty, so we will still send an intial hint on empty refresh. However, we can rely on UI accessing items to update lastAccessedIndex. This delays prefetch by a frame but it is preferable over Refreshes requiring UI to return a transformed index.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I97ffed3e0f63a4551bc1196349157d2c30e8408b
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/commonTest/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
https://android-review.googlesource.com/2886314
Branch: androidx-main
commit 949e051393841ca6c132098efaf6de16c320d7fc
Author: Clara Fok <clarafok@google.com>
Date: Wed Dec 20 13:57:23 2023
Remove transform lastAccessedIndex after refresh
Transform lastAccessedIndex fulfills two roles - trigger prefetch and trigger load if new list is empty.
We still need to trigger new loads if refreshed page is empty, so we will still send an intial hint on empty refresh. However, we can rely on UI accessing items to update lastAccessedIndex. This delays prefetch by a frame but it is preferable over Refreshes requiring UI to return a transformed index.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I97ffed3e0f63a4551bc1196349157d2c30e8408b
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/commonTest/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 8f41702e894c758cf7833e6841acf167d0cb8013
Author: Clara Fok <clarafok@google.com>
Date: Thu Dec 21 10:24:38 2023
Refactor event processing for Refresh
Upon refresh, PagingDataPresenter now sends a PagingDataEvent.Refresh to the front end. paging-runtime, paging-compose, and paging-testing refactored to handle this new type of refresh events.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:jvmTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Test: ./gradlew paging:paging-testing:cC
Bug: 315214786
Change-Id: I71d8caeb0819b5a0a3d6a0159ace399a77972c1f
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/NullPaddedList.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/NullPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
https://android-review.googlesource.com/2889226
Branch: androidx-main
commit 8f41702e894c758cf7833e6841acf167d0cb8013
Author: Clara Fok <clarafok@google.com>
Date: Thu Dec 21 10:24:38 2023
Refactor event processing for Refresh
Upon refresh, PagingDataPresenter now sends a PagingDataEvent.Refresh to the front end. paging-runtime, paging-compose, and paging-testing refactored to handle this new type of refresh events.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:jvmTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Test: ./gradlew paging:paging-testing:cC
Bug: 315214786
Change-Id: I71d8caeb0819b5a0a3d6a0159ace399a77972c1f
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/NullPaddedList.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/NullPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/NullPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit ac036c36ad2263f33694046c1a2ba4b85957547a
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 03 14:18:09 2024
Refactor LoadStateUpdates for Drop Events
LoadStateUpdate from Drop events are now sent from PagingDataPresenter instead of sent to the callback passed to PageStore.
Removed obselete LoadState assertions in PageStoreTest because state updates are now separate from PageStore. Existing tests in PagingDataDifferTest asserts that drop events emit the correct LoadStateUpdates.
Also removed redundant dispatchLoadState helper function so that loadstates are now dispatched directly with MutableCombinedLoadStateCollection set() methods.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I3d62b14b48c572b215309514856dd5478b36e66b
M paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
https://android-review.googlesource.com/2895998
Branch: androidx-main
commit ac036c36ad2263f33694046c1a2ba4b85957547a
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 03 14:18:09 2024
Refactor LoadStateUpdates for Drop Events
LoadStateUpdate from Drop events are now sent from PagingDataPresenter instead of sent to the callback passed to PageStore.
Removed obselete LoadState assertions in PageStoreTest because state updates are now separate from PageStore. Existing tests in PagingDataDifferTest asserts that drop events emit the correct LoadStateUpdates.
Also removed redundant dispatchLoadState helper function so that loadstates are now dispatched directly with MutableCombinedLoadStateCollection set() methods.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I3d62b14b48c572b215309514856dd5478b36e66b
M paging/paging-common/src/commonMain/kotlin/androidx/paging/MutableCombinedLoadStateCollection.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit ea4cdfe3b1e0ebc964060e78ca8fb500d577f122
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 15:25:35 2024
Refactor event processing for Drop events
PagingDataPresenter will now emit PagingDataEvents to the front end for drops. Paging-runtime is refactored to handle drop events by sending relevant callbacks to RecyclerView.
Clean up of PagingDataPresenter to remove callbacks will follow in a separate CL.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ./gradlew paging:paging-runtime:cC
Bug: 315214786
Change-Id: I7efd7283260c159e77aeb864ae62000105be88bd
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
https://android-review.googlesource.com/2896747
Branch: androidx-main
commit ea4cdfe3b1e0ebc964060e78ca8fb500d577f122
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 15:25:35 2024
Refactor event processing for Drop events
PagingDataPresenter will now emit PagingDataEvents to the front end for drops. Paging-runtime is refactored to handle drop events by sending relevant callbacks to RecyclerView.
Clean up of PagingDataPresenter to remove callbacks will follow in a separate CL.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ./gradlew paging:paging-runtime:cC
Bug: 315214786
Change-Id: I7efd7283260c159e77aeb864ae62000105be88bd
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit fb2fc3476142784bb87c694ca41c03a132a9ecc0
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 18:44:45 2024
Remove DifferCallback from PagingDataPresenter
Now that PageEvents are emitted as PagingDataEvents directly to the presenters, we can remove DifferCallback and its derivatives from PagingDataPresenter as callbacks are no longer used here.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Bug: 315214786
Change-Id: Ic6b736a4144d6bf632eac6f9c3766069a66ae4d6
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
D paging/paging-common/src/commonTest/kotlin/androidx/paging/ProcessPageEventCallbackCapture.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
https://android-review.googlesource.com/2898769
Branch: androidx-main
commit fb2fc3476142784bb87c694ca41c03a132a9ecc0
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 18:44:45 2024
Remove DifferCallback from PagingDataPresenter
Now that PageEvents are emitted as PagingDataEvents directly to the presenters, we can remove DifferCallback and its derivatives from PagingDataPresenter as callbacks are no longer used here.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ./gradlew paging:paging-runtime:cC
Test: ./gradlew paging:paging-compose:cC
Bug: 315214786
Change-Id: Ic6b736a4144d6bf632eac6f9c3766069a66ae4d6
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
D paging/paging-common/src/commonTest/kotlin/androidx/paging/ProcessPageEventCallbackCapture.kt
M paging/paging-compose/src/commonMain/kotlin/androidx/paging/compose/LazyPagingItems.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
M testutils/testutils-paging/src/commonMain/kotlin/androidx/paging/TestPagingDataPresenter.kt
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-main
commit 318d01617e37eab4a851192dd2b9ab159b8f0939
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 16:36:39 2024
Implement PagingDataEvent equals, hashcode and string functions
Ideally we'd want PagingDataEvent to be a data class for how it is used. But data class is not recommended for public APIs because of backward-compat issues (https://kotlinlang.org/docs/jvm-api-guidelines-backward-compatibility.html#don-t-use-data-classes-in-an-api ).
And data class cannot be sealed. So we just use a normal class with our own equals implementation.
Add tests to assert correct PagingDataEvent in PageStoreTest.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I5a6dee4f3c8182a7b513c91dde5a03331d199f6a
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
https://android-review.googlesource.com/2898768
Branch: androidx-main
commit 318d01617e37eab4a851192dd2b9ab159b8f0939
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 04 16:36:39 2024
Implement PagingDataEvent equals, hashcode and string functions
Ideally we'd want PagingDataEvent to be a data class for how it is used. But data class is not recommended for public APIs because of backward-compat issues (
And data class cannot be sealed. So we just use a normal class with our own equals implementation.
Add tests to assert correct PagingDataEvent in PageStoreTest.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: I5a6dee4f3c8182a7b513c91dde5a03331d199f6a
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PageStoreTest.kt
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
commit 1282a872c727be6ee193c359f5d91eff74e07ebe
Author: Clara Fok <clarafok@google.com>
Date: Tue Jan 09 14:07:44 2024
Fix emission on Drop events
PagingDataPresenter will emit drop events via presentPagingDataEvent.
Added unit tests to assert insert and drop PagingDataEvents.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest --no-configuration-cache
Bug: 315214786
Change-Id: I6e1e51890779236800c9b63bbd9277191f3ca088
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
https://android-review.googlesource.com/2901101
Branch: androidx-main
commit 1282a872c727be6ee193c359f5d91eff74e07ebe
Author: Clara Fok <clarafok@google.com>
Date: Tue Jan 09 14:07:44 2024
Fix emission on Drop events
PagingDataPresenter will emit drop events via presentPagingDataEvent.
Added unit tests to assert insert and drop PagingDataEvents.
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest --no-configuration-cache
Bug: 315214786
Change-Id: I6e1e51890779236800c9b63bbd9277191f3ca088
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit cd3d5e2927d3d3f5acdc9951b53d7959cff3c3be
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 18 11:34:30 2024
Re-add LoadStateUpdate yield and additional tests
PagingDataPresenter needed to yield on LoadStateUpdates in case RecyclerView was undergoing dispatch layouts. Otherwise, LoadStateUpdates pushed to LoadState-based RV will crash. See original b/150162465 .
Added tests to assert that LoadStateUpdate yields to RecyclerView when it is dispatching layout.
Test: ./gradlew paging:paging-runtime:cC
Bug: 150162465
Bug: 315214786
Change-Id: I1df8b730bdf52b146a36a8c85792cb6ce62e8aca
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-runtime/build.gradle
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
https://android-review.googlesource.com/2917756
Branch: androidx-main
commit cd3d5e2927d3d3f5acdc9951b53d7959cff3c3be
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 18 11:34:30 2024
Re-add LoadStateUpdate yield and additional tests
PagingDataPresenter needed to yield on LoadStateUpdates in case RecyclerView was undergoing dispatch layouts. Otherwise, LoadStateUpdates pushed to LoadState-based RV will crash. See original
Added tests to assert that LoadStateUpdate yields to RecyclerView when it is dispatching layout.
Test: ./gradlew paging:paging-runtime:cC
Bug: 150162465
Bug: 315214786
Change-Id: I1df8b730bdf52b146a36a8c85792cb6ce62e8aca
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-runtime/build.gradle
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
ap...@google.com <ap...@google.com> #14
Project: platform/frameworks/support
Branch: androidx-main
commit b7393370d402b1380be68b55549cb752842162b8
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 19 13:08:39 2024
Make PagingDataPresenter public
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:test
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Bug: 315214786
Relnote: "PagingDataPresenter is now a public class. Multiplatform presenters can now be built on top of PagingDataPresenter."
Change-Id: Id1f748af435e6f5d733bc731ef7e8cd12455845a
M paging/paging-common/api/current.txt
M paging/paging-common/api/restricted_current.txt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PlaceholderPaddedList.kt
https://android-review.googlesource.com/2918734
Branch: androidx-main
commit b7393370d402b1380be68b55549cb752842162b8
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 19 13:08:39 2024
Make PagingDataPresenter public
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:test
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:cC
Bug: 315214786
Relnote: "PagingDataPresenter is now a public class. Multiplatform presenters can now be built on top of PagingDataPresenter."
Change-Id: Id1f748af435e6f5d733bc731ef7e8cd12455845a
M paging/paging-common/api/current.txt
M paging/paging-common/api/restricted_current.txt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PlaceholderPaddedList.kt
ap...@google.com <ap...@google.com> #15
Project: platform/frameworks/support
Branch: androidx-main
commit 15804fb6a1c1805305e66d23fc4c5a30cbc28d40
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 19 13:00:51 2024
Rename NullPaddedList to PlaceholderPaddedList
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: Id699b61a98e81e59c11b78f4d07315717324e33b
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedList.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PlaceholderPaddedList.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/PlaceholderPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/PlaceholderPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagedListDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/PlaceholderPaddedDiffing.md
M paging/paging-runtime/src/main/java/androidx/paging/PlaceholderPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
https://android-review.googlesource.com/2918753
Branch: androidx-main
commit 15804fb6a1c1805305e66d23fc4c5a30cbc28d40
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 19 13:00:51 2024
Rename NullPaddedList to PlaceholderPaddedList
Test: ANDROIDX_PROJECTS=INFRAROGUE ./gradlew paging:paging-common:allTest
Bug: 315214786
Change-Id: Id699b61a98e81e59c11b78f4d07315717324e33b
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedList.kt
M paging/paging-common/src/commonJvmAndroidMain/kotlin/androidx/paging/PagedStorage.jvm.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PageStore.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataEvent.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PlaceholderPaddedList.kt
M paging/paging-common/src/commonTest/kotlin/androidx/paging/PagingDataPresenterTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/PlaceholderPaddedListDiffHelperTest.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/PlaceholderPaddedListDiffWithRecyclerViewTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagedListDiffer.kt
M paging/paging-runtime/src/main/java/androidx/paging/PlaceholderPaddedDiffing.md
M paging/paging-runtime/src/main/java/androidx/paging/PlaceholderPaddedListDiffHelper.kt
M paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing/SnapshotLoader.kt
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
commit 5c76ff18b0b1f721005807586b1bf136b954f856
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 18 16:49:49 2024
AsyncPagingDataDiffer LoadState emission to yield if getting item
Paging has existing logic to track if RecyclerView is running layouts and if so, yield before processing PageEvents. This was done by making PagingDataPresenter.collectFrom() yield on main dispatcher before processing Inserts, Drops, and LoadStateUpdates. See b/150162465 .
As we move all RV logic out of PagingDataPresenter, we now throttle LoadStateUpdate emissions in AsyncPagingDataDiffer instead. This provides the guarantee that PagingDataAdapter and other RecyclerView.Adapters built on top of AsyncPagingDataDiffer can collect on LoadStateUpdates without crashing RV.
Test: paging.integration-tests.testapp does not crash when displaying header/footers for loadStates
Test: ./gradlew paging:paging-runtime:cC
Bug: 315214786
Change-Id: I7b9be5fc3d0a85a0ff2b3f7671f78626f74a80a1
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
https://android-review.googlesource.com/2918731
Branch: androidx-main
commit 5c76ff18b0b1f721005807586b1bf136b954f856
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 18 16:49:49 2024
AsyncPagingDataDiffer LoadState emission to yield if getting item
Paging has existing logic to track if RecyclerView is running layouts and if so, yield before processing PageEvents. This was done by making PagingDataPresenter.collectFrom() yield on main dispatcher before processing Inserts, Drops, and LoadStateUpdates. See
As we move all RV logic out of PagingDataPresenter, we now throttle LoadStateUpdate emissions in AsyncPagingDataDiffer instead. This provides the guarantee that PagingDataAdapter and other RecyclerView.Adapters built on top of AsyncPagingDataDiffer can collect on LoadStateUpdates without crashing RV.
Test: paging.integration-tests.testapp does not crash when displaying header/footers for loadStates
Test: ./gradlew paging:paging-runtime:cC
Bug: 315214786
Change-Id: I7b9be5fc3d0a85a0ff2b3f7671f78626f74a80a1
M paging/paging-common/src/commonMain/kotlin/androidx/paging/PagingDataPresenter.kt
M paging/paging-runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/paging-runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
Description
Since we only implement the front end for Android, users of paging KMP will need their own custom front end built on top of paging-common for non-Android platforms. Therefore, we should open up paging-common so that external users of Paging KMP can implement their own Paging front end.