Merge "Attempt to fix IllegalArgumentException from RecyclerView" into sc-dev am: 0d8b0ebd0d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14065251

Change-Id: I47443845e8cf9bf3985bd123b8703dc2b28bacee
This commit is contained in:
TreeHugger Robot
2021-04-06 09:17:33 +00:00
committed by Automerger Merge Worker

View File

@@ -149,6 +149,8 @@ public class HighlightablePreferenceGroupAdapter extends PreferenceGroupAdapter
root.postDelayed(() -> {
mHighlightRequested = true;
// Remove the animator to avoid a RecyclerView crash.
recyclerView.setItemAnimator(null);
recyclerView.smoothScrollToPosition(position);
mHighlightPosition = position;
notifyItemChanged(position);