+0
−5
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Calling scrollToPosition on RecyclerView internally calls requestLayout() (to cacluate where to scroll and then go there). Therefore, we should avoid calling that whenever possible, especially during transitions. In particular, we can optimize scrollToTop() to not scrollToPosition() if we are already at the top. This makes some other workarounds unnecessary, namely setting All Apps to GONE during system gestures. Test: Open an app, swipe up, ensure AllAppsRecyclerView doesn't get onLayout(). If we had scrolled to an app first, we get one layout in prepareRecentsUi(), but not during the transition. Bug: 140308849 Change-Id: I62ee341bf5893c121cfc013cc6542559f79d2a42