diff --git a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java index b21d677106..771657b11d 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java @@ -92,7 +92,6 @@ public final class RecentsViewStateController extends builder.add(mRecentsView.createSplitSelectInitAnimation().buildAnim()); mRecentsView.applySplitPrimaryScrollOffset(); } else if (!isSplitSelectionState(toState) && isSplitSelectionState(currentState)) { - builder.add(mRecentsView.cancelSplitSelect(true).buildAnim()); mRecentsView.resetSplitPrimaryScrollOffset(); } diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java b/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java index 106375a765..4f5f27a2c0 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/SplitScreenSelectState.java @@ -30,11 +30,6 @@ public class SplitScreenSelectState extends OverviewState { super(id); } - @Override - public void onBackPressed(Launcher launcher) { - launcher.getStateManager().goToState(OVERVIEW); - } - @Override public int getVisibleElements(Launcher launcher) { return SPLIT_PLACHOLDER_VIEW; diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 9cf76b378a..3020dd905d 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1123,9 +1123,6 @@ public abstract class RecentsView view.getVisibility() != GONE && view != mSplitHiddenTaskView); - - int[] newScroll = new int[getChildCount()]; - getPageScrolls(newScroll, false, SIMPLE_SCROLL_LOGIC); - - boolean needsCurveUpdates = false; - for (int i = mSplitHiddenTaskViewIndex; i >= 0; i--) { - View child = getChildAt(i); - if (child == mSplitHiddenTaskView) { - TaskView taskView = (TaskView) child; - - int dir = mOrientationHandler.getSplitTaskViewDismissDirection(stagePosition, - mActivity.getDeviceProfile()); - FloatProperty dismissingTaskViewTranslate; - Rect hiddenBounds = new Rect(taskView.getLeft(), taskView.getTop(), - taskView.getRight(), taskView.getBottom()); - int distanceDelta = 0; - if (dir == PagedOrientationHandler.SPLIT_TRANSLATE_SECONDARY_NEGATIVE) { - dismissingTaskViewTranslate = taskView - .getSecondaryDissmissTranslationProperty(); - distanceDelta = initialBounds.top - hiddenBounds.top; - taskView.layout(initialBounds.left, hiddenBounds.top, initialBounds.right, - hiddenBounds.bottom); - } else { - dismissingTaskViewTranslate = taskView - .getPrimaryDismissTranslationProperty(); - distanceDelta = initialBounds.left - hiddenBounds.left; - taskView.layout(hiddenBounds.left, initialBounds.top, hiddenBounds.right, - initialBounds.bottom); - if (dir == PagedOrientationHandler.SPLIT_TRANSLATE_PRIMARY_POSITIVE) { - distanceDelta *= -1; - } - } - pendingAnim.add(ObjectAnimator.ofFloat(mSplitHiddenTaskView, - dismissingTaskViewTranslate, - distanceDelta)); - pendingAnim.add(ObjectAnimator.ofFloat(mSplitHiddenTaskView, ALPHA, 1)); - } else { - // If insertion is on last index (furthest from clear all), we directly add the view - // else we translate all views to the right of insertion index further right, - // ignore views to left - if (showAsGrid()) { - // TODO(b/186800707) handle more elegantly for grid - continue; - } - int scrollDiff = newScroll[i] - oldScroll[i]; - if (scrollDiff != 0) { - FloatProperty translationProperty = child instanceof TaskView - ? ((TaskView) child).getPrimaryDismissTranslationProperty() - : mOrientationHandler.getPrimaryViewTranslate(); - - ResourceProvider rp = DynamicResource.provider(mActivity); - SpringProperty sp = new SpringProperty(SpringProperty.FLAG_CAN_SPRING_ON_END) - .setDampingRatio( - rp.getFloat(R.dimen.dismiss_task_trans_x_damping_ratio)) - .setStiffness(rp.getFloat(R.dimen.dismiss_task_trans_x_stiffness)); - pendingAnim.add(ObjectAnimator.ofFloat(child, translationProperty, scrollDiff) - .setDuration(duration), ACCEL, sp); - needsCurveUpdates = true; - } - } - } - - if (needsCurveUpdates) { - pendingAnim.addOnFrameCallback(this::updateCurveProperties); - } - - pendingAnim.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - // TODO(b/186800707) Figure out how to undo for grid view - // Need to handle cases where dismissed task is - // * Top Row - // * Bottom Row - // * Focused Task - updateGridProperties(); - resetFromSplitSelectionState(); - updateScrollSynchronously(); - } - }); - - return pendingAnim; - } - /** TODO(b/181707736) More gracefully handle exiting split selection state */ private void resetFromSplitSelectionState() { if (!mActivity.getDeviceProfile().overviewShowAsGrid) {