Fixed
Status Update
Comments
em...@google.com <em...@google.com>
ry...@google.com <ry...@google.com>
sm...@google.com <sm...@google.com> #2
since these are in public API (:/) we need to do this in 1.2
na...@gmail.com <na...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
sm...@google.com <sm...@google.com> #4
Opening diff shortly
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/61 .
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
https://android-review.googlesource.com/1396827
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
sm...@google.com <sm...@google.com> #6
Unfortunately, due to the reliance of the fix (https://android-review.googlesource.com/1380276 ) on setRecyclerListener (which supports a single listener only), the change opens the door to potential bugs where the selection library or app author overwrite the others' registered RecyclerListener.
https://r.android.com/1381078 adds support to RecyclerView for multiple RecyclerListeners, and https://r.android.com/1384002 updates Selection lib to use the new addRecyclerListener API. But the selection lib's rc release cannot depend on an API that is not also RC or above. Given the fact that there's a work around (SCOPE_MAPPED provider, see comment#2 ) will not include a fix for this issue in the 1.1.0-rc02 release.
Will leave this bug open to track inclusion in future release.
Will leave this bug open to track inclusion in future release.
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 66c5c69e735df7a0540ac621e0c084ac87be0cb1
Author: Steve McKay <smckay@google.com>
Date: Fri Jul 31 14:42:15 2020
Update StableIdKeyProvider to use addRecyclerListener.
Bug: 145767095
Test: All tests passing, manual testing via demo app.
Change-Id: I21df99af34c2d34b720303858785eddb2a5314f6
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/StableIdKeyProvider.java
https://android-review.googlesource.com/1384002
Branch: androidx-master-dev
commit 66c5c69e735df7a0540ac621e0c084ac87be0cb1
Author: Steve McKay <smckay@google.com>
Date: Fri Jul 31 14:42:15 2020
Update StableIdKeyProvider to use addRecyclerListener.
Bug: 145767095
Test: All tests passing, manual testing via demo app.
Change-Id: I21df99af34c2d34b720303858785eddb2a5314f6
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/StableIdKeyProvider.java
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ce1b333030414b89b1980fa2327774af1b5416dc
Author: Steve McKay <smckay@google.com>
Date: Thu Jul 30 09:33:41 2020
Add support for multiple RecyclerListeners.
This feature is necessitated by RecyclerView-Selection dependency on listening
to recycle events.
Bug: 162504379
Test: Added new coverage.
Relnote: Add support for multiple RecyclerListeners as necessitated to fix b/145767095 affecting RecyclerView-Selection.
Change-Id: I70ad8f9bcf25c2c00fbf5f71d5a991287bef1606
M leanback/leanback/api/current.txt
M leanback/leanback/api/public_plus_experimental_current.txt
M leanback/leanback/api/restricted_current.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerListenerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
https://android-review.googlesource.com/1381078
Branch: androidx-master-dev
commit ce1b333030414b89b1980fa2327774af1b5416dc
Author: Steve McKay <smckay@google.com>
Date: Thu Jul 30 09:33:41 2020
Add support for multiple RecyclerListeners.
This feature is necessitated by RecyclerView-Selection dependency on listening
to recycle events.
Bug: 162504379
Test: Added new coverage.
Relnote: Add support for multiple RecyclerListeners as necessitated to fix
Change-Id: I70ad8f9bcf25c2c00fbf5f71d5a991287bef1606
M leanback/leanback/api/current.txt
M leanback/leanback/api/public_plus_experimental_current.txt
M leanback/leanback/api/restricted_current.txt
M recyclerview/recyclerview/api/current.txt
M recyclerview/recyclerview/api/public_plus_experimental_current.txt
M recyclerview/recyclerview/api/restricted_current.txt
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerListenerTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
sm...@google.com <sm...@google.com> #9
Planning on the fix being released in 1.2. Should be available in 1.2.0-alpha01 in the next few weeks. No telling for sure how long it will take to get 1.2.0 to stable.
cr...@gmail.com <cr...@gmail.com> #10
With the 1.2.0-alpha01
it seems there's a new issue now, caused by the changes, that results in the holder at the top of StableIdKeyProvider.onRecycled()
to always be null. This still results in the same issue that the cache isn't updated properly and the that can cause crashes, because the lookup is wrong.
Description
- I have a RecyclerView using Selection with SelectionPredicates.createSelectSingleAnything() and StableIdKeyProvider.
- A selected item will be colored RED, unselected item will be colored GREEN.
- I select item whose adapterPosition is 0.
- I scroll the list so the item whose adapterPosition is 1 will be on top.
--> What I actually want is the item at '0' will be offscreen and will be detached, but not enough for recycle.
- I select item of adapterPosition '1'.
--> Because it is single selection list, I expect that the item of position '0' will *appear to be unselected*.
- I scroll to top and see if item of position '0' appears to be unselected or not.
Expect: item of position 0 will be colored GREEN (it should appear to be unselected), item of position 1 will be colored RED (it should appear to be selected).
Actual: item of position 0 is colored RED (it appears to be selected), item of position 1 is colored RED (it appears to be selected). (See attachment: recyclerview_selection_issue.mp4).
Note that, the item is correctly unselected, but the change is never delivered to the Adapter due to the behavior of StableIdKeyProvider (I have post about this here:
Source code:
Version used (can be found in the repo): RecyclerView 1.1.0, Selection 1.1.0-beta01.
Thanks in advance.