summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-09-03 16:16:54 -0700
committerTony Wickham <twickham@google.com>2019-09-03 16:16:54 -0700
commitbfdeda96e66b666ec675a79fd47ca77a4e432f7c (patch)
tree39b91143e4ddcc32bfa8afa05e95079eb2f400c5 /quickstep
parentc40872b913ac657561d4fbfa0289c1f550756588 (diff)
downloadandroid_packages_apps_Trebuchet-bfdeda96e66b666ec675a79fd47ca77a4e432f7c.tar.gz
android_packages_apps_Trebuchet-bfdeda96e66b666ec675a79fd47ca77a4e432f7c.tar.bz2
android_packages_apps_Trebuchet-bfdeda96e66b666ec675a79fd47ca77a4e432f7c.zip
Properly prevent All Apps relayouts by avoiding scrollToPosition
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
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
index 4f971809f..25cc33df0 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -172,8 +172,6 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
AnimatorSetBuilder builder = new AnimatorSetBuilder();
// setRecentsAttachedToAppWindow() will animate recents out.
builder.addFlag(AnimatorSetBuilder.FLAG_DONT_ANIMATE_OVERVIEW);
- // We want to keep all apps content as GONE to avoid relayout during home animation.
- builder.addFlag(AnimatorSetBuilder.FLAG_DONT_UPDATE_ALL_APPS_VISIBILITY);
stateManager.createAtomicAnimation(BACKGROUND_APP, NORMAL, builder, ANIM_ALL, 0);
builder.build().start();
@@ -202,9 +200,6 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
// This ensures then the next swipe up to all-apps starts from scroll 0.
activity.getAppsView().reset(false /* animate */);
- // Optimization, hide the all apps view to prevent layout while initializing
- activity.getAppsView().getContentView().setVisibility(View.GONE);
-
return new AnimationFactory() {
private ShelfAnimState mShelfState;
private boolean mIsAttachedToWindow;