Merge "Apply/reset split scroll offset regardless of previous state" into sc-v2-dev

This commit is contained in:
TreeHugger Robot 2021-12-01 19:34:51 +00:00 committed by Android (Google) Code Review
commit 87f010f3bd
1 changed files with 9 additions and 1 deletions

View File

@ -66,6 +66,12 @@ public final class RecentsViewStateController extends
// In Overview, we may be layering app surfaces behind Launcher, so we need to notify
// DepthController to prevent optimizations which might occlude the layers behind
mLauncher.getDepthController().setHasContentBehindLauncher(state.overviewUi);
if (isSplitSelectionState(state)) {
mRecentsView.applySplitPrimaryScrollOffset();
} else {
mRecentsView.resetSplitPrimaryScrollOffset();
}
}
@Override
@ -90,8 +96,10 @@ public final class RecentsViewStateController extends
LauncherState currentState = mLauncher.getStateManager().getState();
if (isSplitSelectionState(toState) && !isSplitSelectionState(currentState)) {
builder.add(mRecentsView.createSplitSelectInitAnimation().buildAnim());
}
if (isSplitSelectionState(toState)) {
mRecentsView.applySplitPrimaryScrollOffset();
} else if (!isSplitSelectionState(toState) && isSplitSelectionState(currentState)) {
} else {
mRecentsView.resetSplitPrimaryScrollOffset();
}