Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
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 2f191e80d6b0dcaf00aeb67a1489a9e7e679f825
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 28 11:39:03 2022
Implement page-dropping in TestPager
Replicates drop behavior in Paging when calls to append/prepend exceeds PagingConfig.maxSize.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I4ff9205d5d70a4aa3023399df68738ac144f26e6
M paging/paging-testing/src/main/java/androidx/paging/testing/TestPager.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/TestPagerTest.kt
https://android-review.googlesource.com/2232957
Branch: androidx-main
commit 2f191e80d6b0dcaf00aeb67a1489a9e7e679f825
Author: Clara Fok <clarafok@google.com>
Date: Wed Sep 28 11:39:03 2022
Implement page-dropping in TestPager
Replicates drop behavior in Paging when calls to append/prepend exceeds PagingConfig.maxSize.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I4ff9205d5d70a4aa3023399df68738ac144f26e6
M paging/paging-testing/src/main/java/androidx/paging/testing/TestPager.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/TestPagerTest.kt
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 8141841aecca4a99c1e13c02aebb279d313a82c6
Author: Clara Fok <clarafok@google.com>
Date: Thu Sep 22 11:28:22 2022
Add overloaded getPagingState helper function
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a getPagingState helper that takes in a lambda to generate a PagingState
Change-Id: Ib77a4de58944424d426296908404db886dfc2b97
M paging/paging-testing/src/main/java/androidx/paging/testing/TestPager.kt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/api/current.txt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/TestPagerTest.kt
M paging/paging-testing/api/public_plus_experimental_current.txt
https://android-review.googlesource.com/2228037
Branch: androidx-main
commit 8141841aecca4a99c1e13c02aebb279d313a82c6
Author: Clara Fok <clarafok@google.com>
Date: Thu Sep 22 11:28:22 2022
Add overloaded getPagingState helper function
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a getPagingState helper that takes in a lambda to generate a PagingState
Change-Id: Ib77a4de58944424d426296908404db886dfc2b97
M paging/paging-testing/src/main/java/androidx/paging/testing/TestPager.kt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/api/current.txt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/TestPagerTest.kt
M paging/paging-testing/api/public_plus_experimental_current.txt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 20a2837c7fe2e72f7041fa8b46c3830ea6ec3b9e
Author: Clara Fok <clarafok@google.com>
Date: Tue Oct 04 15:29:32 2022
Implement StaticListPagingSource
Internal implementaiton of PagingSource which loads data from a static List<Value> passed in to constructor.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I53a6b0ad8ffbd7ddfcb6ce7dc849e9e37ed19d65
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/StaticListPagingSourceTest.kt
A paging/paging-testing/src/main/java/androidx/paging/testing/StaticListPagingSource.kt
https://android-review.googlesource.com/2238000
Branch: androidx-main
commit 20a2837c7fe2e72f7041fa8b46c3830ea6ec3b9e
Author: Clara Fok <clarafok@google.com>
Date: Tue Oct 04 15:29:32 2022
Implement StaticListPagingSource
Internal implementaiton of PagingSource which loads data from a static List<Value> passed in to constructor.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I53a6b0ad8ffbd7ddfcb6ce7dc849e9e37ed19d65
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/StaticListPagingSourceTest.kt
A paging/paging-testing/src/main/java/androidx/paging/testing/StaticListPagingSource.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit cd689d851b7103fabecf805829eb48e252c59078
Author: Clara Fok <clarafok@google.com>
Date: Wed Oct 05 17:41:37 2022
Implement Flow extension method to generate a PagingSourceFactory
Extension method on Flow<List<Value>> to generate a pagingSourceFactory to be supplied to a Pager by calling flow.asPagingSourceFactory().
This factory extends InvalidatingPagingSourceFactory which internally tracks the PagingSources generated from this factory to faciliate
PagingSource invalidation by external sources. In this implementation, the PagingSources are invalidated whenever a new List is collected from the Flow, with each emission representing a new generation.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Helper method to create a pagingSourceFactory from a FLow<List<Value>> to be supplied to a Pager. Each List<Value>> emitted from the Flow represents a generation of Paged data. This facilitates paging tests on, for example, PagingData transformations by faking a data source for the Pager to collect from.
Change-Id: I6f230da9825c187eb0d8ae6645df7f0a67925574
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
A paging/paging-testing/src/main/java/androidx/paging/testing/StaticListPagingSourceFactory.kt
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/StaticListPagingSourceFactoryTest.kt
https://android-review.googlesource.com/2242020
Branch: androidx-main
commit cd689d851b7103fabecf805829eb48e252c59078
Author: Clara Fok <clarafok@google.com>
Date: Wed Oct 05 17:41:37 2022
Implement Flow extension method to generate a PagingSourceFactory
Extension method on Flow<List<Value>> to generate a pagingSourceFactory to be supplied to a Pager by calling flow.asPagingSourceFactory().
This factory extends InvalidatingPagingSourceFactory which internally tracks the PagingSources generated from this factory to faciliate
PagingSource invalidation by external sources. In this implementation, the PagingSources are invalidated whenever a new List is collected from the Flow, with each emission representing a new generation.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Helper method to create a pagingSourceFactory from a FLow<List<Value>> to be supplied to a Pager. Each List<Value>> emitted from the Flow represents a generation of Paged data. This facilitates paging tests on, for example, PagingData transformations by faking a data source for the Pager to collect from.
Change-Id: I6f230da9825c187eb0d8ae6645df7f0a67925574
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
A paging/paging-testing/src/main/java/androidx/paging/testing/StaticListPagingSourceFactory.kt
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/StaticListPagingSourceFactoryTest.kt
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit a74dfb56fc5e9a39602c74ced3db06222d32ce4b
Author: Clara Fok <clarafok@google.com>
Date: Fri Oct 21 12:22:29 2022
Initial implementation of asSnapshot API
The initial structure to enable Flow<PagingData<T>>.asSnapshot API to return a snapshot of first refresh load.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: A Flow<PagingData<T>> extension method to execute test loading operations and returns a List<T>.
Change-Id: Ib29b92793c33a759b52d6b4881d3a3f812b26382
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/build.gradle
A paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
A paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2264590
Branch: androidx-main
commit a74dfb56fc5e9a39602c74ced3db06222d32ce4b
Author: Clara Fok <clarafok@google.com>
Date: Fri Oct 21 12:22:29 2022
Initial implementation of asSnapshot API
The initial structure to enable Flow<PagingData<T>>.asSnapshot API to return a snapshot of first refresh load.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: A Flow<PagingData<T>> extension method to execute test loading operations and returns a List<T>.
Change-Id: Ib29b92793c33a759b52d6b4881d3a3f812b26382
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/build.gradle
A paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
A paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
A paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit 43466fc1a3f1e163d1b0796eee53de8657911553
Author: Clara Fok <clarafok@google.com>
Date: Tue Nov 15 13:47:44 2022
Add multi-generational support in paging-testing Pager layer
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added new SnapshotLoader#refresh API to fake UI-driven refresh signals such as swipe-to-refresh.
Change-Id: Ic4babf6783f51dbdab690693e176f65820fa3a38
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2303484
Branch: androidx-main
commit 43466fc1a3f1e163d1b0796eee53de8657911553
Author: Clara Fok <clarafok@google.com>
Date: Tue Nov 15 13:47:44 2022
Add multi-generational support in paging-testing Pager layer
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added new SnapshotLoader#refresh API to fake UI-driven refresh signals such as swipe-to-refresh.
Change-Id: Ic4babf6783f51dbdab690693e176f65820fa3a38
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-main
commit 321535f5d4f9bbdbf5f3b900cf5dd7e7f82604e2
Author: Clara Fok <clarafok@google.com>
Date: Tue Nov 15 16:55:32 2022
Add appendScrollWhile API for Pager layer testing
This SnapshotLoader API takes a predicate and will fake append scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a SnapshotLoader#appendScrollWhile API which takes a predicate and will fake append scroll while the most recently loaded item matches the predicate.
Change-Id: Id6223b81ebf221456147e41c428a7718e9c494e6
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2295938
Branch: androidx-main
commit 321535f5d4f9bbdbf5f3b900cf5dd7e7f82604e2
Author: Clara Fok <clarafok@google.com>
Date: Tue Nov 15 16:55:32 2022
Add appendScrollWhile API for Pager layer testing
This SnapshotLoader API takes a predicate and will fake append scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a SnapshotLoader#appendScrollWhile API which takes a predicate and will fake append scroll while the most recently loaded item matches the predicate.
Change-Id: Id6223b81ebf221456147e41c428a7718e9c494e6
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
commit e952c8c46bea807d609272fdde7d390ee7de300d
Author: Clara Fok <clarafok@google.com>
Date: Tue Dec 06 16:16:01 2022
Add appendScrollWhile tests
Test: ./gradlew paging:paging-testing:ktlint
Bug: 235528239
Change-Id: I8088ce624bdabc6b287c14bb84cc46e0c6d0505b
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2330004
Branch: androidx-main
commit e952c8c46bea807d609272fdde7d390ee7de300d
Author: Clara Fok <clarafok@google.com>
Date: Tue Dec 06 16:16:01 2022
Add appendScrollWhile tests
Test: ./gradlew paging:paging-testing:ktlint
Bug: 235528239
Change-Id: I8088ce624bdabc6b287c14bb84cc46e0c6d0505b
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit bc67295c7f0760ae58b6ce31380940b08eb57a2e
Author: Clara Fok <clarafok@google.com>
Date: Wed Dec 07 14:17:40 2022
Adjust PagerFlowSnapshot initial lastAccessedIndex calculation
Upon a Refresh load, Paging would attempt to trigger prefetches on either direction if the [center index of initial load] - [presentedItemsBeyondAnchor] < prefetchDistance of that direction. This "anchor" essentially is the center index of the initial loaded items with placeholders accounted for.
In PagerFlowSnapshot, the initial lastAccessedIndex was based on index of initial load's last item. Since future loads are based on this initial lastAccessedIndex, it essentially acts as the initial "anchor" and so we want to match its computation with the computation of real paging's initial "anchor".
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I654e3a142c702b93a6df8f85bb73860b10e20d99
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
https://android-review.googlesource.com/2333747
Branch: androidx-main
commit bc67295c7f0760ae58b6ce31380940b08eb57a2e
Author: Clara Fok <clarafok@google.com>
Date: Wed Dec 07 14:17:40 2022
Adjust PagerFlowSnapshot initial lastAccessedIndex calculation
Upon a Refresh load, Paging would attempt to trigger prefetches on either direction if the [center index of initial load] - [presentedItemsBeyondAnchor] < prefetchDistance of that direction. This "anchor" essentially is the center index of the initial loaded items with placeholders accounted for.
In PagerFlowSnapshot, the initial lastAccessedIndex was based on index of initial load's last item. Since future loads are based on this initial lastAccessedIndex, it essentially acts as the initial "anchor" and so we want to match its computation with the computation of real paging's initial "anchor".
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I654e3a142c702b93a6df8f85bb73860b10e20d99
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
ap...@google.com <ap...@google.com> #14
Project: platform/frameworks/support
Branch: androidx-main
commit 9dc3878a25ea31709f07780191742550c4e9195f
Author: Clara Fok <clarafok@google.com>
Date: Fri Dec 02 16:16:47 2022
Add prependScrollWhile API for Pager layer testing
This SnapshotLoader API takes a predicate and will fake prepend scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a SnapshotLoader#prependScrollWhile API which takes a predicate and will fake prepend scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I2249f7147213881bdef9acd42287d9fca0dfcc09
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2326116
Branch: androidx-main
commit 9dc3878a25ea31709f07780191742550c4e9195f
Author: Clara Fok <clarafok@google.com>
Date: Fri Dec 02 16:16:47 2022
Add prependScrollWhile API for Pager layer testing
This SnapshotLoader API takes a predicate and will fake prepend scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: Added a SnapshotLoader#prependScrollWhile API which takes a predicate and will fake prepend scroll while the most recently loaded item matches the predicate.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I2249f7147213881bdef9acd42287d9fca0dfcc09
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #15
Project: platform/frameworks/support
Branch: androidx-main
commit aa6d1cc8b24e96b0250132f8e376d0448d109545
Author: Clara Fok <clarafok@google.com>
Date: Mon Jan 09 17:45:04 2023
ScrollTo prepend with await placeholders
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Added SnapshotLoader api scrollTo(index) to fake prepend scrolls from current index to a smaller index."
Change-Id: I51f4d2bba2a98a829eeac3ed689ecc0ea0fc7a19
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2333964
Branch: androidx-main
commit aa6d1cc8b24e96b0250132f8e376d0448d109545
Author: Clara Fok <clarafok@google.com>
Date: Mon Jan 09 17:45:04 2023
ScrollTo prepend with await placeholders
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Added SnapshotLoader api scrollTo(index) to fake prepend scrolls from current index to a smaller index."
Change-Id: I51f4d2bba2a98a829eeac3ed689ecc0ea0fc7a19
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
commit 053d429897a13fae3e0b295c5b5d660769a5ead8
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 18 10:50:21 2023
PrependTo supports negative indices
PrependTo now supports negative indices. If there were placeholders, loads will be capped to index[0]. If there were no placeholders, it will scroll until it either hits requested scroll distance or no more items can be prepended.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I8e80c1aaed221b7d8686e93042c9782aabdcc153
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2393018
Branch: androidx-main
commit 053d429897a13fae3e0b295c5b5d660769a5ead8
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 18 10:50:21 2023
PrependTo supports negative indices
PrependTo now supports negative indices. If there were placeholders, loads will be capped to index[0]. If there were no placeholders, it will scroll until it either hits requested scroll distance or no more items can be prepended.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I8e80c1aaed221b7d8686e93042c9782aabdcc153
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-main
commit 5103421baa2e2cbf2b4438f5092cc4804ac0f06a
Author: Clara Fok <clarafok@google.com>
Date: Tue Jan 17 13:03:04 2023
ScrollTo append with await placeholders
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Expanded SnapshotLoader api scrollTo(index) to support fake append scrolls from current index to a larger index."
Change-Id: I96def78b99fcc9ee088a0a912ba69866d8667715
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2392032
Branch: androidx-main
commit 5103421baa2e2cbf2b4438f5092cc4804ac0f06a
Author: Clara Fok <clarafok@google.com>
Date: Tue Jan 17 13:03:04 2023
ScrollTo append with await placeholders
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Expanded SnapshotLoader api scrollTo(index) to support fake append scrolls from current index to a larger index."
Change-Id: I96def78b99fcc9ee088a0a912ba69866d8667715
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #18
Project: platform/frameworks/support
Branch: androidx-main
commit 2a62135ffbe8b26982596c97ea661c0840875383
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 18 12:45:51 2023
Add testing for separators and page drops
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I16830f9dc11f3c48a2609767bbcf3f09c52f4ebc
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2393023
Branch: androidx-main
commit 2a62135ffbe8b26982596c97ea661c0840875383
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 18 12:45:51 2023
Add testing for separators and page drops
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Change-Id: I16830f9dc11f3c48a2609767bbcf3f09c52f4ebc
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #19
Project: platform/frameworks/support
Branch: androidx-main
commit ec11bf52e0477e193db14719ec82a7f8fe3e13a9
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 26 16:27:57 2023
Refactor scrollTo to focus on await loads
We are splitting scrolls and flings into two separate APIs.
Test: n/a
Bug: 235528239
Relnote: "SnapshotLoader.scrollTo will now only support scrolling that awaits for placeholders to be loaded in."
Change-Id: I7ce345200d07fa1eef9f5d1028fd88caab1477b3
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2404351
Branch: androidx-main
commit ec11bf52e0477e193db14719ec82a7f8fe3e13a9
Author: Clara Fok <clarafok@google.com>
Date: Thu Jan 26 16:27:57 2023
Refactor scrollTo to focus on await loads
We are splitting scrolls and flings into two separate APIs.
Test: n/a
Bug: 235528239
Relnote: "SnapshotLoader.scrollTo will now only support scrolling that awaits for placeholders to be loaded in."
Change-Id: I7ce345200d07fa1eef9f5d1028fd88caab1477b3
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #20
Project: platform/frameworks/support
Branch: androidx-main
commit 83a253e7d9ddc36c1d2005c4a75188704e2378a3
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 27 14:34:29 2023
Clean up PagerFlowSnapshotTest
Adjust test names and test setups
Test: ./gradlew paging:paging-testing:cC
Bug: 235528239
Change-Id: Iab1debb310a84b0b3333d3bfa6e3e11c7a46e1b7
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2406434
Branch: androidx-main
commit 83a253e7d9ddc36c1d2005c4a75188704e2378a3
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 27 14:34:29 2023
Clean up PagerFlowSnapshotTest
Adjust test names and test setups
Test: ./gradlew paging:paging-testing:cC
Bug: 235528239
Change-Id: Iab1debb310a84b0b3333d3bfa6e3e11c7a46e1b7
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #21
Project: platform/frameworks/support
Branch: androidx-main
commit 60e95021f93cfa2105dec2e8f04932efa949c9d2
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 27 15:59:40 2023
Add new SnapshotLoader api #flingTo
Fakes flinging from one item to another on screen. It is a version of fast scrolling that will not wait for placeholders to load. This function supports jumps.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Added new SnapshotLoader api flingTo(index) to support prepend scrolls without waiting for placeholders. This fakes fast prepend scrolls where jumps may be triggered if traversed placeholders fulfills jumpThreshold."
Change-Id: I5bd26ec7d66f52696a3d4ea6a610b0ccabd95a84
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2406435
Branch: androidx-main
commit 60e95021f93cfa2105dec2e8f04932efa949c9d2
Author: Clara Fok <clarafok@google.com>
Date: Fri Jan 27 15:59:40 2023
Add new SnapshotLoader api #flingTo
Fakes flinging from one item to another on screen. It is a version of fast scrolling that will not wait for placeholders to load. This function supports jumps.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Added new SnapshotLoader api flingTo(index) to support prepend scrolls without waiting for placeholders. This fakes fast prepend scrolls where jumps may be triggered if traversed placeholders fulfills jumpThreshold."
Change-Id: I5bd26ec7d66f52696a3d4ea6a610b0ccabd95a84
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #22
Project: platform/frameworks/support
Branch: androidx-main
commit 73e02d3b1b5dc56ca0acbae46559042aadf4a82e
Author: Clara Fok <clarafok@google.com>
Date: Mon Jan 30 15:04:46 2023
Expand SnapshotLoader api #flingTo Append
Add flingTo support for Append flinging from one item to another. It is a version of fast scrolling that will not wait for placeholders to load. This function supports jumps.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Expanded SnapshotLoader api flingTo(index) to support append scrolls without waiting for placeholders. This fakes fast append scrolls where jumps may be triggered if traversed placeholders fulfills jumpThreshold."
Change-Id: Ic1238184b82106a5ac6ec5f517819a489dd13218
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2407781
Branch: androidx-main
commit 73e02d3b1b5dc56ca0acbae46559042aadf4a82e
Author: Clara Fok <clarafok@google.com>
Date: Mon Jan 30 15:04:46 2023
Expand SnapshotLoader api #flingTo Append
Add flingTo support for Append flinging from one item to another. It is a version of fast scrolling that will not wait for placeholders to load. This function supports jumps.
Test: ./gradlew paging:paging-testing:test
Bug: 235528239
Relnote: "Expanded SnapshotLoader api flingTo(index) to support append scrolls without waiting for placeholders. This fakes fast append scrolls where jumps may be triggered if traversed placeholders fulfills jumpThreshold."
Change-Id: Ic1238184b82106a5ac6ec5f517819a489dd13218
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
ap...@google.com <ap...@google.com> #23
Project: platform/frameworks/support
Branch: androidx-main
commit 1676f58d3cf28c2c309bb2c8f52cf11585ffd519
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 01 09:48:31 2023
Implement load error recovery in snapshots
When PagingSource reutrns LoadResult.Error, the default behavior is to rethrow the LoadResult.Error.Throwable. Users can also choose to retry the failed load or return the current snapshot.
Test: ./gradlew paging:paging-testing:cC
Bug: 235528239
Relnote: "asSnapshot api now takes in an onError param as error recovery strategy when PagingSource returns LoadResult.Error. Default behavior is to rethrow the load error with optional strategies `retry` and `return current snapshot`."
Change-Id: I55fd2374b68f8e18a292865a92143f9de50bbad0
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
A paging/paging-testing/src/main/java/androidx/paging/testing/LoadErrorHandler.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
https://android-review.googlesource.com/2413143
Branch: androidx-main
commit 1676f58d3cf28c2c309bb2c8f52cf11585ffd519
Author: Clara Fok <clarafok@google.com>
Date: Wed Feb 01 09:48:31 2023
Implement load error recovery in snapshots
When PagingSource reutrns LoadResult.Error, the default behavior is to rethrow the LoadResult.Error.Throwable. Users can also choose to retry the failed load or return the current snapshot.
Test: ./gradlew paging:paging-testing:cC
Bug: 235528239
Relnote: "asSnapshot api now takes in an onError param as error recovery strategy when PagingSource returns LoadResult.Error. Default behavior is to rethrow the load error with optional strategies `retry` and `return current snapshot`."
Change-Id: I55fd2374b68f8e18a292865a92143f9de50bbad0
M paging/paging-testing/api/current.txt
M paging/paging-testing/api/public_plus_experimental_current.txt
M paging/paging-testing/api/restricted_current.txt
A paging/paging-testing/src/main/java/androidx/paging/testing/LoadErrorHandler.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/PagerFlowSnapshot.kt
M paging/paging-testing/src/main/java/androidx/paging/testing/SnapshotLoader.kt
M paging/paging-testing/src/test/kotlin/androidx/paging/testing/PagerFlowSnapshotTest.kt
cl...@google.com <cl...@google.com> #24
First alpha with complete API available in paging-testing 3.2.0-alpha04
Description
Component used: Paging
Version used: 3.2.0-alpha01
Right now, testing any layer of Paging (e.g., your
PagingSource
or aPager
in yourViewModel
) requires setting up ~every other layer by hand. This is particularly challenging when trying to mirror what is actually going to happen at the UI layer without actually scrolling aRecyclerView
or trying to use aLazyColumn
as part of your ViewModel test.It would be really helpful if there was a
paging-testing
artifact that allowed creating:PagingSource
that you could use to simulate loading multiple pages of data and invalidation triggered from thePagingSource
sideThere are a probably other helpful APIs that may have to be exposed to make testing and separating each layer easier as well so this work should also take into account making changes in the Paging artifact itself to facilitate this separation of concerns.