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: I2658139591e9a6c9bbfe86e6e1d792afa6576d22
This commit is contained in:
TreeHugger Robot
2021-04-06 09:17:50 +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);