Fixed
Status Update
Comments
du...@google.com <du...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 0154910724cdc44253af1d2f8cede76264783226
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Idfd1faa3a826bb91ee14722f7437bdcf99cf0018
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
https://android-review.googlesource.com/3151736
Branch: androidx-main
commit 0154910724cdc44253af1d2f8cede76264783226
Author: Aurimas Liutikas <aurimas@google.com>
Date: Thu Jun 27 15:25:02 2024
Expand native target support for annotation and collection libraries
- Enable watchos and tvos download in importMaven
- Add support for watchos and tvos targets in AndroidXMultiplatformExtension
- Enable watchos and tvos in :annotation:annotation
- Enable linuxArm64, watchos, and tvos in :collection:collection
This work is required as we work towards setting up native stubs for
compose projects.
Test: ./gradlew collection:collection:publish
Bug: 349894318
Change-Id: Idfd1faa3a826bb91ee14722f7437bdcf99cf0018
M annotation/annotation/build.gradle
M buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
M buildSrc/public/src/main/kotlin/androidx/build/KmpPlatforms.kt
M collection/collection/build.gradle
M development/build_log_simplifier/messages.ignore
M development/importMaven/src/main/kotlin/androidx/build/importMaven/KmpConfig.kt
Description
Devices/Android versions reproduced on: Pixel 3 / Android 10
When defining PagingConfig with some limited maxSize and disabled placeholders the app may crash with KotlinNullPointerException due to some items being null in the underlying PagingData list (which is expected only when placeholders are enabled). In the previous version of the library (2.1.2) all item out of the maxSize limit were properly removed and itemCount always set to be no bigger than maxSize.
I've attached a sample app (paging3sandbox.zip) that demonstrates the issue. Here are the steps to reproduce the issue:
1. open the app and scroll somewhere up to item 60 (pages may be loading a bit slowly as I've emulated a network delay)
2. than scroll fast up to the first item in the list
3. the app crashed with KotlinNullPointerException
What is expected:
There are no null items in the list when placeholders are disabled. The itemCount in PagingDataAdapter is sized properly and is the same as the count of all non-null items in the list.
At least it was working this way in the version 2.1.2. If it is some expected changes in the API please let me know what am I doing wrong here.