Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java +18 −14 Original line number Original line Diff line number Diff line Loading @@ -231,16 +231,6 @@ class SplitScreenTransitions { void onFinish(WindowContainerTransaction wct, WindowContainerTransactionCallback wctCB) { void onFinish(WindowContainerTransaction wct, WindowContainerTransactionCallback wctCB) { if (!mAnimations.isEmpty()) return; if (!mAnimations.isEmpty()) return; mOnFinish.run(); if (mFinishTransaction != null) { mFinishTransaction.apply(); mTransactionPool.release(mFinishTransaction); mFinishTransaction = null; } if (mFinishCallback != null) { mFinishCallback.onTransitionFinished(wct /* wct */, wctCB /* wctCB */); mFinishCallback = null; } if (mAnimatingTransition == mPendingEnter) { if (mAnimatingTransition == mPendingEnter) { mPendingEnter = null; mPendingEnter = null; } } Loading @@ -248,15 +238,29 @@ class SplitScreenTransitions { mPendingDismiss = null; mPendingDismiss = null; } } if (mAnimatingTransition == mPendingRecent) { if (mAnimatingTransition == mPendingRecent) { // If the wct is not null while finishing recent transition, it indicates it's not // If the clean-up wct is null when finishing recent transition, it indicates it's // dismissing split and thus need to reorder split task so they can be on top again. // returning to home and thus no need to reorder tasks. final boolean dismissSplit = wct == null; final boolean returnToHome = wct == null; mStageCoordinator.finishRecentAnimation(dismissSplit); if (returnToHome) { wct = new WindowContainerTransaction(); } mStageCoordinator.onRecentTransitionFinished(returnToHome, wct, mFinishTransaction); mPendingRecent = null; mPendingRecent = null; } } mPendingRemoteHandler = null; mPendingRemoteHandler = null; mActiveRemoteHandler = null; mActiveRemoteHandler = null; mAnimatingTransition = null; mAnimatingTransition = null; mOnFinish.run(); if (mFinishTransaction != null) { mFinishTransaction.apply(); mTransactionPool.release(mFinishTransaction); mFinishTransaction = null; } if (mFinishCallback != null) { mFinishCallback.onTransitionFinished(wct /* wct */, wctCB /* wctCB */); mFinishCallback = null; } } } // TODO(shell-transitions): real animations // TODO(shell-transitions): real animations Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +9 −8 Original line number Original line Diff line number Diff line Loading @@ -1568,8 +1568,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, logExit(dismissTransition.mReason); logExit(dismissTransition.mReason); // TODO: Have a proper remote for this. Until then, though, reset state and use the // TODO: Have a proper remote for this. Until then, though, reset state and use the // normal animation stuff (which falls back to the normal launcher remote). // normal animation stuff (which falls back to the normal launcher remote). setDividerVisibility(false, t); mSplitLayout.release(t); mSplitLayout.release(); mSplitTransitions.mPendingDismiss = null; mSplitTransitions.mPendingDismiss = null; return false; return false; } else { } else { Loading @@ -1595,7 +1594,8 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, return true; return true; } } void finishRecentAnimation(boolean dismissSplit) { void onRecentTransitionFinished(boolean returnToHome, WindowContainerTransaction wct, SurfaceControl.Transaction finishT) { // Exclude the case that the split screen has been dismissed already. // Exclude the case that the split screen has been dismissed already. if (!mMainStage.isActive()) { if (!mMainStage.isActive()) { // The latest split dismissing transition might be a no-op transition and thus won't // The latest split dismissing transition might be a no-op transition and thus won't Loading @@ -1605,13 +1605,14 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, return; return; } } if (dismissSplit) { if (returnToHome) { final WindowContainerTransaction wct = new WindowContainerTransaction(); // When returning to home from recent apps, the splitting tasks are already hidden, so // append the reset of dismissing operations into the clean-up wct. prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, wct); prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, wct); mSplitTransitions.startDismissTransition(null /* transition */, wct, this, setSplitsVisible(false); STAGE_TYPE_UNDEFINED, EXIT_REASON_RETURN_HOME); logExit(EXIT_REASON_RETURN_HOME); } else { } else { setDividerVisibility(true, null /* t */); setDividerVisibility(true, finishT); } } } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java +18 −14 Original line number Original line Diff line number Diff line Loading @@ -231,16 +231,6 @@ class SplitScreenTransitions { void onFinish(WindowContainerTransaction wct, WindowContainerTransactionCallback wctCB) { void onFinish(WindowContainerTransaction wct, WindowContainerTransactionCallback wctCB) { if (!mAnimations.isEmpty()) return; if (!mAnimations.isEmpty()) return; mOnFinish.run(); if (mFinishTransaction != null) { mFinishTransaction.apply(); mTransactionPool.release(mFinishTransaction); mFinishTransaction = null; } if (mFinishCallback != null) { mFinishCallback.onTransitionFinished(wct /* wct */, wctCB /* wctCB */); mFinishCallback = null; } if (mAnimatingTransition == mPendingEnter) { if (mAnimatingTransition == mPendingEnter) { mPendingEnter = null; mPendingEnter = null; } } Loading @@ -248,15 +238,29 @@ class SplitScreenTransitions { mPendingDismiss = null; mPendingDismiss = null; } } if (mAnimatingTransition == mPendingRecent) { if (mAnimatingTransition == mPendingRecent) { // If the wct is not null while finishing recent transition, it indicates it's not // If the clean-up wct is null when finishing recent transition, it indicates it's // dismissing split and thus need to reorder split task so they can be on top again. // returning to home and thus no need to reorder tasks. final boolean dismissSplit = wct == null; final boolean returnToHome = wct == null; mStageCoordinator.finishRecentAnimation(dismissSplit); if (returnToHome) { wct = new WindowContainerTransaction(); } mStageCoordinator.onRecentTransitionFinished(returnToHome, wct, mFinishTransaction); mPendingRecent = null; mPendingRecent = null; } } mPendingRemoteHandler = null; mPendingRemoteHandler = null; mActiveRemoteHandler = null; mActiveRemoteHandler = null; mAnimatingTransition = null; mAnimatingTransition = null; mOnFinish.run(); if (mFinishTransaction != null) { mFinishTransaction.apply(); mTransactionPool.release(mFinishTransaction); mFinishTransaction = null; } if (mFinishCallback != null) { mFinishCallback.onTransitionFinished(wct /* wct */, wctCB /* wctCB */); mFinishCallback = null; } } } // TODO(shell-transitions): real animations // TODO(shell-transitions): real animations Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +9 −8 Original line number Original line Diff line number Diff line Loading @@ -1568,8 +1568,7 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, logExit(dismissTransition.mReason); logExit(dismissTransition.mReason); // TODO: Have a proper remote for this. Until then, though, reset state and use the // TODO: Have a proper remote for this. Until then, though, reset state and use the // normal animation stuff (which falls back to the normal launcher remote). // normal animation stuff (which falls back to the normal launcher remote). setDividerVisibility(false, t); mSplitLayout.release(t); mSplitLayout.release(); mSplitTransitions.mPendingDismiss = null; mSplitTransitions.mPendingDismiss = null; return false; return false; } else { } else { Loading @@ -1595,7 +1594,8 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, return true; return true; } } void finishRecentAnimation(boolean dismissSplit) { void onRecentTransitionFinished(boolean returnToHome, WindowContainerTransaction wct, SurfaceControl.Transaction finishT) { // Exclude the case that the split screen has been dismissed already. // Exclude the case that the split screen has been dismissed already. if (!mMainStage.isActive()) { if (!mMainStage.isActive()) { // The latest split dismissing transition might be a no-op transition and thus won't // The latest split dismissing transition might be a no-op transition and thus won't Loading @@ -1605,13 +1605,14 @@ class StageCoordinator implements SplitLayout.SplitLayoutHandler, return; return; } } if (dismissSplit) { if (returnToHome) { final WindowContainerTransaction wct = new WindowContainerTransaction(); // When returning to home from recent apps, the splitting tasks are already hidden, so // append the reset of dismissing operations into the clean-up wct. prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, wct); prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, wct); mSplitTransitions.startDismissTransition(null /* transition */, wct, this, setSplitsVisible(false); STAGE_TYPE_UNDEFINED, EXIT_REASON_RETURN_HOME); logExit(EXIT_REASON_RETURN_HOME); } else { } else { setDividerVisibility(true, null /* t */); setDividerVisibility(true, finishT); } } } } Loading