Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
https://android-review.googlesource.com/1360099
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 951ea11b36f1aaa4975b66df98bd59d17a685497
Author: Clara Fok <clarafok@google.com>
Date: Thu Jul 07 13:43:44 2022
Implement LOGGER injection into paging-common from LazyPagingItems
To enable logging based on android.util.log inside paging-common which is a non-android artifact, LazyPagingItems implements the Logger interface and injects an instance of it into paging-common.
Test: n/a
Bug: 235527159
Change-Id: I6a4a75fc1ee6ead2667115de8f4670c9b6605865
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
https://android-review.googlesource.com/2147271
Branch: androidx-main
commit 951ea11b36f1aaa4975b66df98bd59d17a685497
Author: Clara Fok <clarafok@google.com>
Date: Thu Jul 07 13:43:44 2022
Implement LOGGER injection into paging-common from LazyPagingItems
To enable logging based on android.util.log inside paging-common which is a non-android artifact, LazyPagingItems implements the Logger interface and injects an instance of it into paging-common.
Test: n/a
Bug: 235527159
Change-Id: I6a4a75fc1ee6ead2667115de8f4670c9b6605865
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 0922eb390585d726d80670c2185bbd05fe4efca4
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 08 13:02:39 2022
Add LOGGER injection into paging-common from LazyPagingItems
To enable logging based on android.util.log inside paging-common which is a non-android artifact, LazyPagingItems implements the Logger interface and injects an instance of it into paging-common.
Test: n/a
Bug: 235527159
Change-Id: I83eef9646a3972662fc09e3b51e4527a9721bb2b
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
https://android-review.googlesource.com/2149234
Branch: androidx-main
commit 0922eb390585d726d80670c2185bbd05fe4efca4
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 08 13:02:39 2022
Add LOGGER injection into paging-common from LazyPagingItems
To enable logging based on android.util.log inside paging-common which is a non-android artifact, LazyPagingItems implements the Logger interface and injects an instance of it into paging-common.
Test: n/a
Bug: 235527159
Change-Id: I83eef9646a3972662fc09e3b51e4527a9721bb2b
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit ac66217143e9cae0482c679f6508ade6285439dd
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 13 13:45:20 2022
Add VERBOSE level logging for each PageEvent sent to presenter side
Sample Insert log without mediator:
PageEvent.Insert for REFRESH, with 6 items (
first item: Item(pagingSourceId=0, generation=0, value=0, metadata=null)
last item: Item(pagingSourceId=0, generation=0, value=5, metadata=null)
placeholdersBefore: -1
placeholdersAfter: 5840
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
)
Sample Insert log with mediator:
PageEvent.Insert for REFRESH, with 6 items (
first item: Item(pagingSourceId=0, generation=0, value=0, metadata=null)
last item: Item(pagingSourceId=0, generation=0, value=5, metadata=null)
placeholdersBefore: 0
placeholdersAfter: 0
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
)
Sample LoadStateUpdate log:
PageEvent.LoadStateUpdate (
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
)
Sample StaticList log:
PageEvent.StaticList with 10 items (
first item: Item(id=150, text=item 150 - port, bgColor=-16776961)
last item: Item(id=159, text=item 159 - port, bgColor=-16776961)
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
)
Sample PREPEND Drop log:
PageEvent.Drop from the front (
minPageOffset: 2
maxPageOffset: 4
placeholdersRemaining: 10
)
Test: n/a
Bug: 235527159
Change-Id: I278622c77150ef0c58a60577565fcbdb3fbea43a
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
https://android-review.googlesource.com/2152994
Branch: androidx-main
commit ac66217143e9cae0482c679f6508ade6285439dd
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 13 13:45:20 2022
Add VERBOSE level logging for each PageEvent sent to presenter side
Sample Insert log without mediator:
PageEvent.Insert for REFRESH, with 6 items (
first item: Item(pagingSourceId=0, generation=0, value=0, metadata=null)
last item: Item(pagingSourceId=0, generation=0, value=5, metadata=null)
placeholdersBefore: -1
placeholdersAfter: 5840
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
)
Sample Insert log with mediator:
PageEvent.Insert for REFRESH, with 6 items (
first item: Item(pagingSourceId=0, generation=0, value=0, metadata=null)
last item: Item(pagingSourceId=0, generation=0, value=5, metadata=null)
placeholdersBefore: 0
placeholdersAfter: 0
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
)
Sample LoadStateUpdate log:
PageEvent.LoadStateUpdate (
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
)
Sample StaticList log:
PageEvent.StaticList with 10 items (
first item: Item(id=150, text=item 150 - port, bgColor=-16776961)
last item: Item(id=159, text=item 159 - port, bgColor=-16776961)
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=NotLoading(endOfPaginationReached=false))
mediatorLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=true), append=Loading(endOfPaginationReached=false))
)
Sample PREPEND Drop log:
PageEvent.Drop from the front (
minPageOffset: 2
maxPageOffset: 4
placeholdersRemaining: 10
)
Test: n/a
Bug: 235527159
Change-Id: I278622c77150ef0c58a60577565fcbdb3fbea43a
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 4163656d8170ebba389ae2b69c14b54f0f6e3449
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 27 18:08:35 2022
Add DEBUG and VERBOSE default logging for PagingSource loads
Two levels of logging were added to reflect the start and end of all load types. Load start and load success are DEBUG level logs, while result of Error, Invalid, and cancelled loads are VERBOSE level logs. Examples of log outputs as follows.
Load Start:
Start REFRESH with loadKey 50 on androidx.paging.TestPagingSource@fd4857
Load Success:
End REFRESH with loadKey 50. Returned LoadResult.Page(
dataCount: 2
first Item: 50
last Item: 51
nextKey: 52
prevKey: 49
itemsBefore: 50
itemsAfter: 48
)
Load Error:
End REFRESH with loadKey 50. Returned LoadResult.Error(
throwable: java.lang.Exception: Exception from TestPagingSource.errorNextLoad
)
Load Invalid:
End REFRESH with loadKey 50. Returned LoadResult.Invalid
Load Cancelled:
End APPEND with loadkey 60. Load CANCELLED.
Test: n/a
Bug: 235527159
Change-Id: Ideef3df4ed52eb5fb62a1cbde1556e426cd377ba
M paging/paging-common/src/main/kotlin/androidx/paging/PagingSource.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcherSnapshot.kt
https://android-review.googlesource.com/2167581
Branch: androidx-main
commit 4163656d8170ebba389ae2b69c14b54f0f6e3449
Author: Clara Fok <clarafok@google.com>
Date: Wed Jul 27 18:08:35 2022
Add DEBUG and VERBOSE default logging for PagingSource loads
Two levels of logging were added to reflect the start and end of all load types. Load start and load success are DEBUG level logs, while result of Error, Invalid, and cancelled loads are VERBOSE level logs. Examples of log outputs as follows.
Load Start:
Start REFRESH with loadKey 50 on androidx.paging.TestPagingSource@fd4857
Load Success:
End REFRESH with loadKey 50. Returned LoadResult.Page(
dataCount: 2
first Item: 50
last Item: 51
nextKey: 52
prevKey: 49
itemsBefore: 50
itemsAfter: 48
)
Load Error:
End REFRESH with loadKey 50. Returned LoadResult.Error(
throwable: java.lang.Exception: Exception from TestPagingSource.errorNextLoad
)
Load Invalid:
End REFRESH with loadKey 50. Returned LoadResult.Invalid
Load Cancelled:
End APPEND with loadkey 60. Load CANCELLED.
Test: n/a
Bug: 235527159
Change-Id: Ideef3df4ed52eb5fb62a1cbde1556e426cd377ba
M paging/paging-common/src/main/kotlin/androidx/paging/PagingSource.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcherSnapshot.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 386e82daf006a7876946d0fe3cac5145db6719fc
Author: Clara Fok <clarafok@google.com>
Date: Thu Jul 28 16:00:37 2022
Add default log to trace load and invalidation triggers
Log sites to track input:
items access (i.e. from regular scrolling or jump scrolls)
refresh
retry
Log sites to reflect input received:
Jump invalidation
PagingSource invalidation
New PagingSource generation
Example of log output as follows.
Generated new PagingSource:
Generated new PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f
Items access:
Accessing item index[12]
Jump invalidation:
Jump triggered on PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f by ViewportHint.Access(
pageOffset=2,
indexInPage=60,
presentedItemsBefore=100,
presentedItemsAfter=-51,
originalPageOffsetFirst=0,
originalPageOffsetLast=2,
)
PagingSource invalidation:
Invalidated PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f
Test: n/a
Bug: 235527159
Change-Id: Ia36dc2a3bc68e24bd03d579d1508b0987140d669
M paging/paging-common/src/main/kotlin/androidx/paging/InvalidateCallbackTracker.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingSource.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcherSnapshot.kt
https://android-review.googlesource.com/2169479
Branch: androidx-main
commit 386e82daf006a7876946d0fe3cac5145db6719fc
Author: Clara Fok <clarafok@google.com>
Date: Thu Jul 28 16:00:37 2022
Add default log to trace load and invalidation triggers
Log sites to track input:
items access (i.e. from regular scrolling or jump scrolls)
refresh
retry
Log sites to reflect input received:
Jump invalidation
PagingSource invalidation
New PagingSource generation
Example of log output as follows.
Generated new PagingSource:
Generated new PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f
Items access:
Accessing item index[12]
Jump invalidation:
Jump triggered on PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f by ViewportHint.Access(
pageOffset=2,
indexInPage=60,
presentedItemsBefore=100,
presentedItemsAfter=-51,
originalPageOffsetFirst=0,
originalPageOffsetLast=2,
)
PagingSource invalidation:
Invalidated PagingSource androidx.paging.integration.testapp.v3.ItemPagingSource@19bff0f
Test: n/a
Bug: 235527159
Change-Id: Ia36dc2a3bc68e24bd03d579d1508b0987140d669
M paging/paging-common/src/main/kotlin/androidx/paging/InvalidateCallbackTracker.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingSource.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PageFetcherSnapshot.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 1dcb2e545c7690148e96f1a011a51ccce0df417f
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 29 16:06:43 2022
Add VERBOSE log when new page is presented
Since compose calls PagingDataDiffer's implementation of presentNewList, this log will apply to both RC and Compose UI.
Sample output:
Presenting data:
first item: Item(id=90, text=item 90 - port, bgColor=-65536)
last item: Item(id=119, text=item 119 - port, bgColor=-65536)
placeholdersBefore: 90
placeholdersAfter: 5880
hintReceiver: androidx.paging.PageFetcher$PagerHintReceiver@c6743b4
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=false), append=NotLoading(endOfPaginationReached=false))
)
Test: n/a
Fixes: 235527159
Change-Id: I40a565be98501952bf467b830efc605361a77a81
M paging/paging-common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
A paging/paging-common/src/main/kotlin/androidx/paging/internal/LogUtil.kt
https://android-review.googlesource.com/2170604
Branch: androidx-main
commit 1dcb2e545c7690148e96f1a011a51ccce0df417f
Author: Clara Fok <clarafok@google.com>
Date: Fri Jul 29 16:06:43 2022
Add VERBOSE log when new page is presented
Since compose calls PagingDataDiffer's implementation of presentNewList, this log will apply to both RC and Compose UI.
Sample output:
Presenting data:
first item: Item(id=90, text=item 90 - port, bgColor=-65536)
last item: Item(id=119, text=item 119 - port, bgColor=-65536)
placeholdersBefore: 90
placeholdersAfter: 5880
hintReceiver: androidx.paging.PageFetcher$PagerHintReceiver@c6743b4
sourceLoadStates: LoadStates(refresh=NotLoading(endOfPaginationReached=false), prepend=NotLoading(endOfPaginationReached=false), append=NotLoading(endOfPaginationReached=false))
)
Test: n/a
Fixes: 235527159
Change-Id: I40a565be98501952bf467b830efc605361a77a81
M paging/paging-common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/paging-common/src/main/kotlin/androidx/paging/PagingDataDiffer.kt
A paging/paging-common/src/main/kotlin/androidx/paging/internal/LogUtil.kt
Description
Component used: Paging
Version used: 3.2.0-alpha01
Similar to what is available in FragmentManager logging , it would be helpful if Paging had a way to enable debug and verbose logging that would help with figuring out what is happening internally within Paging without having to recompile the app or make changes to the Paging library simply by running an
adb shell
command:Ideally this should have more critical logging at the
DEBUG
level while having more detailed logging of events at theVERBOSE
level.