Loading quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> && !toState.overviewUi; if (mRecentsView.isSplitSelectionActive() && exitingOverview) { setter.add(mRecentsView.getSplitSelectController().getSplitAnimationController() .animateAwayPlaceholder(mLauncher)); .createPlaceholderDismissAnim(mLauncher)); setter.setViewAlpha( mRecentsView.getSplitInstructionsView(), 0, Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +8 −1 Original line number Diff line number Diff line Loading @@ -549,7 +549,7 @@ public class QuickstepLauncher extends Launcher { list.add(getDragController()); Consumer<AnimatorSet> splitAnimator = animatorSet -> { AnimatorSet anim = mSplitSelectStateController.getSplitAnimationController() .animateAwayPlaceholder(QuickstepLauncher.this); .createPlaceholderDismissAnim(QuickstepLauncher.this); anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading Loading @@ -1000,6 +1000,13 @@ public class QuickstepLauncher extends Launcher { return mSplitToWorkspaceController; } @Override protected void handleSplitAnimationGoingToHome() { super.handleSplitAnimationGoingToHome(); mSplitSelectStateController.getSplitAnimationController() .playPlaceholderDismissAnim(this); } public <T extends OverviewActionsView> T getActionsView() { return (T) mActionsView; } Loading quickstep/src/com/android/quickstep/util/SplitAnimationController.kt +22 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.quickstep.util import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.animation.AnimatorSet import android.animation.ObjectAnimator import android.graphics.Bitmap Loading Loading @@ -185,17 +187,32 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC } } /** Does not play any animation if user is not currently in split selection state. */ fun playPlaceholderDismissAnim(launcher: Launcher) { if (!splitSelectStateController.isSplitSelectActive) { return } val anim = createPlaceholderDismissAnim(launcher) anim.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) { splitSelectStateController.resetState() } }) anim.start() } fun animateAwayPlaceholder(mLauncher: Launcher) : AnimatorSet { /** Returns [AnimatorSet] which slides initial split placeholder view offscreen. */ fun createPlaceholderDismissAnim(launcher: Launcher) : AnimatorSet { val animatorSet = AnimatorSet() val recentsView : RecentsView<*, *> = mLauncher.getOverviewPanel() val recentsView : RecentsView<*, *> = launcher.getOverviewPanel() val floatingTask: FloatingTaskView = splitSelectStateController.firstFloatingTaskView ?: return animatorSet // We are in split selection state currently, transitioning to another state val dragLayer: DragLayer = mLauncher.dragLayer val dragLayer: DragLayer = launcher.dragLayer val onScreenRectF = RectF() Utilities.getBoundsForViewInDragLayer(mLauncher.dragLayer, floatingTask, Utilities.getBoundsForViewInDragLayer(launcher.dragLayer, floatingTask, Rect(0, 0, floatingTask.width, floatingTask.height), false, null, onScreenRectF) // Get the part of the floatingTask that intersects with the DragLayer (i.e. the Loading @@ -214,7 +231,7 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC floatingTask, onScreenRectF, floatingTask.stagePosition, mLauncher.deviceProfile launcher.deviceProfile ))) return animatorSet } Loading quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,10 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher StateManager stateManager = mActivity.getStateManager(); animated &= stateManager.shouldAnimateStateChange(); stateManager.goToState(NORMAL, animated); if (FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()) { mSplitSelectStateController.getSplitAnimationController() .playPlaceholderDismissAnim(mActivity); } AbstractFloatingView.closeAllOpenViews(mActivity, animated); } Loading src/com/android/launcher3/Launcher.java +8 −0 Original line number Diff line number Diff line Loading @@ -1693,6 +1693,9 @@ public class Launcher extends StatefulActivity<LauncherState> if (mLauncherCallbacks != null) { mLauncherCallbacks.onHomeIntent(internalStateHandled); } if (FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()) { handleSplitAnimationGoingToHome(); } mOverlayManager.hideOverlay(isStarted() && !isForceInvisible()); handleGestureContract(intent); } else if (Intent.ACTION_ALL_APPS.equals(intent.getAction())) { Loading @@ -1706,6 +1709,11 @@ public class Launcher extends StatefulActivity<LauncherState> TraceHelper.INSTANCE.endSection(); } /** Handle animating away split placeholder view when user taps on home button */ protected void handleSplitAnimationGoingToHome() { // Overridden } protected void toggleAllAppsFromIntent(boolean alreadyOnHome) { if (getStateManager().isInStableState(ALL_APPS)) { getStateManager().goToState(NORMAL, alreadyOnHome); Loading Loading
quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public abstract class BaseRecentsViewStateController<T extends RecentsView> && !toState.overviewUi; if (mRecentsView.isSplitSelectionActive() && exitingOverview) { setter.add(mRecentsView.getSplitSelectController().getSplitAnimationController() .animateAwayPlaceholder(mLauncher)); .createPlaceholderDismissAnim(mLauncher)); setter.setViewAlpha( mRecentsView.getSplitInstructionsView(), 0, Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +8 −1 Original line number Diff line number Diff line Loading @@ -549,7 +549,7 @@ public class QuickstepLauncher extends Launcher { list.add(getDragController()); Consumer<AnimatorSet> splitAnimator = animatorSet -> { AnimatorSet anim = mSplitSelectStateController.getSplitAnimationController() .animateAwayPlaceholder(QuickstepLauncher.this); .createPlaceholderDismissAnim(QuickstepLauncher.this); anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { Loading Loading @@ -1000,6 +1000,13 @@ public class QuickstepLauncher extends Launcher { return mSplitToWorkspaceController; } @Override protected void handleSplitAnimationGoingToHome() { super.handleSplitAnimationGoingToHome(); mSplitSelectStateController.getSplitAnimationController() .playPlaceholderDismissAnim(this); } public <T extends OverviewActionsView> T getActionsView() { return (T) mActionsView; } Loading
quickstep/src/com/android/quickstep/util/SplitAnimationController.kt +22 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.quickstep.util import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.animation.AnimatorSet import android.animation.ObjectAnimator import android.graphics.Bitmap Loading Loading @@ -185,17 +187,32 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC } } /** Does not play any animation if user is not currently in split selection state. */ fun playPlaceholderDismissAnim(launcher: Launcher) { if (!splitSelectStateController.isSplitSelectActive) { return } val anim = createPlaceholderDismissAnim(launcher) anim.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) { splitSelectStateController.resetState() } }) anim.start() } fun animateAwayPlaceholder(mLauncher: Launcher) : AnimatorSet { /** Returns [AnimatorSet] which slides initial split placeholder view offscreen. */ fun createPlaceholderDismissAnim(launcher: Launcher) : AnimatorSet { val animatorSet = AnimatorSet() val recentsView : RecentsView<*, *> = mLauncher.getOverviewPanel() val recentsView : RecentsView<*, *> = launcher.getOverviewPanel() val floatingTask: FloatingTaskView = splitSelectStateController.firstFloatingTaskView ?: return animatorSet // We are in split selection state currently, transitioning to another state val dragLayer: DragLayer = mLauncher.dragLayer val dragLayer: DragLayer = launcher.dragLayer val onScreenRectF = RectF() Utilities.getBoundsForViewInDragLayer(mLauncher.dragLayer, floatingTask, Utilities.getBoundsForViewInDragLayer(launcher.dragLayer, floatingTask, Rect(0, 0, floatingTask.width, floatingTask.height), false, null, onScreenRectF) // Get the part of the floatingTask that intersects with the DragLayer (i.e. the Loading @@ -214,7 +231,7 @@ class SplitAnimationController(val splitSelectStateController: SplitSelectStateC floatingTask, onScreenRectF, floatingTask.stagePosition, mLauncher.deviceProfile launcher.deviceProfile ))) return animatorSet } Loading
quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +4 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,10 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher StateManager stateManager = mActivity.getStateManager(); animated &= stateManager.shouldAnimateStateChange(); stateManager.goToState(NORMAL, animated); if (FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()) { mSplitSelectStateController.getSplitAnimationController() .playPlaceholderDismissAnim(mActivity); } AbstractFloatingView.closeAllOpenViews(mActivity, animated); } Loading
src/com/android/launcher3/Launcher.java +8 −0 Original line number Diff line number Diff line Loading @@ -1693,6 +1693,9 @@ public class Launcher extends StatefulActivity<LauncherState> if (mLauncherCallbacks != null) { mLauncherCallbacks.onHomeIntent(internalStateHandled); } if (FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()) { handleSplitAnimationGoingToHome(); } mOverlayManager.hideOverlay(isStarted() && !isForceInvisible()); handleGestureContract(intent); } else if (Intent.ACTION_ALL_APPS.equals(intent.getAction())) { Loading @@ -1706,6 +1709,11 @@ public class Launcher extends StatefulActivity<LauncherState> TraceHelper.INSTANCE.endSection(); } /** Handle animating away split placeholder view when user taps on home button */ protected void handleSplitAnimationGoingToHome() { // Overridden } protected void toggleAllAppsFromIntent(boolean alreadyOnHome) { if (getStateManager().isInStableState(ALL_APPS)) { getStateManager().goToState(NORMAL, alreadyOnHome); Loading