Defer some heavy work from final frame of app -> home transition

- Call reapplyState() on the next frame after settling on home.
- Post some calls from RecentsView#reset() to the next frame.
- Remove onSwipeUpToRecentsComplete() which only called reapplyState()
  uncessarily.
- Also animate TASK_SECONDARY_TRANSLATION back to 0 to ensure state
  machine is in sync with long swipe resistance properties.

Test: profile swipe to home, significantly reduced last frame time.
Bug: 183139317
Change-Id: I37b1829f6f1d5a718e99c131935b87b5200d567f
This commit is contained in:
Tony Wickham
2021-05-07 14:20:38 -07:00
parent 9d16d7f192
commit ce07a3721a
6 changed files with 22 additions and 26 deletions

View File

@@ -99,6 +99,8 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView>
config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_X, LINEAR));
setter.setFloat(mRecentsView, ADJACENT_PAGE_VERTICAL_OFFSET, scaleAndOffset[2],
config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR));
setter.setFloat(mRecentsView, TASK_SECONDARY_TRANSLATION, 0f,
config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR));
PagedOrientationHandler orientationHandler =
((RecentsView) mLauncher.getOverviewPanel()).getPagedOrientationHandler();
FloatProperty taskViewsFloat = orientationHandler.getSplitSelectTaskOffset(