summaryrefslogtreecommitdiff
path: root/com/android/systemui/recents/views/TaskStackAnimationHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'com/android/systemui/recents/views/TaskStackAnimationHelper.java')
-rw-r--r--com/android/systemui/recents/views/TaskStackAnimationHelper.java58
1 files changed, 5 insertions, 53 deletions
diff --git a/com/android/systemui/recents/views/TaskStackAnimationHelper.java b/com/android/systemui/recents/views/TaskStackAnimationHelper.java
index 81bf6aff..26db26fa 100644
--- a/com/android/systemui/recents/views/TaskStackAnimationHelper.java
+++ b/com/android/systemui/recents/views/TaskStackAnimationHelper.java
@@ -18,13 +18,11 @@ package com.android.systemui.recents.views;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
-import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.Log;
-import android.view.View;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
@@ -37,9 +35,10 @@ import com.android.systemui.recents.RecentsDebugFlags;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
-import com.android.systemui.recents.model.Task;
-import com.android.systemui.recents.model.TaskStack;
+import com.android.systemui.shared.recents.model.Task;
+import com.android.systemui.shared.recents.model.TaskStack;
import com.android.systemui.recents.views.lowram.TaskStackLowRamLayoutAlgorithm;
+import com.android.systemui.shared.recents.utilities.AnimationProps;
import java.util.ArrayList;
import java.util.List;
@@ -161,20 +160,12 @@ public class TaskStackAnimationHelper {
for (int i = taskViews.size() - 1; i >= 0; i--) {
TaskView tv = taskViews.get(i);
Task task = tv.getTask();
- boolean currentTaskOccludesLaunchTarget = launchTargetTask != null &&
- launchTargetTask.group != null &&
- launchTargetTask.group.isTaskAboveTask(task, launchTargetTask);
- boolean hideTask = launchTargetTask != null &&
- launchTargetTask.isFreeformTask() &&
- task.isFreeformTask();
// Get the current transform for the task, which will be used to position it offscreen
stackLayout.getStackTransform(task, stackScroller.getStackScroll(), mTmpTransform,
null);
- if (hideTask) {
- tv.setVisibility(View.INVISIBLE);
- } else if (launchState.launchedFromApp && !launchState.launchedViaDockGesture) {
+ if (launchState.launchedFromApp && !launchState.launchedViaDockGesture) {
if (task.isLaunchTarget) {
tv.onPrepareLaunchTargetForEnterAnimation();
} else if (isLowRamDevice && i >= taskViews.size() -
@@ -195,13 +186,6 @@ public class TaskStackAnimationHelper {
// com.android.server.wm.AppTransition#DEFAULT_APP_TRANSITION_DURATION}
mStackView.updateTaskViewToTransform(tv, mTmpTransform,
new AnimationProps(336, Interpolators.FAST_OUT_SLOW_IN));
- } else if (currentTaskOccludesLaunchTarget) {
- // Move the task view slightly lower so we can animate it in
- mTmpTransform.rect.offset(0, taskViewAffiliateGroupEnterOffset);
- mTmpTransform.alpha = 0f;
- mStackView.updateTaskViewToTransform(tv, mTmpTransform,
- AnimationProps.IMMEDIATE);
- tv.setClipViewInStack(false);
}
} else if (launchState.launchedFromHome) {
if (isLowRamDevice) {
@@ -266,9 +250,6 @@ public class TaskStackAnimationHelper {
int taskIndexFromBack = i;
final TaskView tv = taskViews.get(i);
Task task = tv.getTask();
- boolean currentTaskOccludesLaunchTarget = launchTargetTask != null &&
- launchTargetTask.group != null &&
- launchTargetTask.group.isTaskAboveTask(task, launchTargetTask);
// Get the current transform for the task, which will be updated to the final transform
// to animate to depending on how recents was invoked
@@ -280,21 +261,6 @@ public class TaskStackAnimationHelper {
tv.onStartLaunchTargetEnterAnimation(mTmpTransform,
taskViewEnterFromAppDuration, mStackView.mScreenPinningEnabled,
postAnimationTrigger);
- } else {
- // Animate the task up if it was occluding the launch target
- if (currentTaskOccludesLaunchTarget) {
- AnimationProps taskAnimation = new AnimationProps(
- taskViewEnterFromAffiliatedAppDuration, Interpolators.ALPHA_IN,
- new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- postAnimationTrigger.decrement();
- tv.setClipViewInStack(true);
- }
- });
- postAnimationTrigger.increment();
- mStackView.updateTaskViewToTransform(tv, mTmpTransform, taskAnimation);
- }
}
} else if (launchState.launchedFromHome) {
@@ -423,9 +389,6 @@ public class TaskStackAnimationHelper {
for (int i = 0; i < taskViewCount; i++) {
TaskView tv = taskViews.get(i);
Task task = tv.getTask();
- boolean currentTaskOccludesLaunchTarget = launchingTask != null &&
- launchingTask.group != null &&
- launchingTask.group.isTaskAboveTask(task, launchingTask);
if (tv == launchingTaskView) {
tv.setClipViewInStack(false);
@@ -437,17 +400,6 @@ public class TaskStackAnimationHelper {
});
tv.onStartLaunchTargetLaunchAnimation(taskViewExitToAppDuration,
screenPinningRequested, postAnimationTrigger);
- } else if (currentTaskOccludesLaunchTarget) {
- // Animate this task out of view
- AnimationProps taskAnimation = new AnimationProps(
- taskViewExitToAppDuration, Interpolators.ALPHA_OUT,
- postAnimationTrigger.decrementOnAnimationEnd());
- postAnimationTrigger.increment();
-
- mTmpTransform.fillIn(tv);
- mTmpTransform.alpha = 0f;
- mTmpTransform.rect.offset(0, taskViewAffiliateGroupEnterOffset);
- mStackView.updateTaskViewToTransform(tv, mTmpTransform, taskAnimation);
}
}
}
@@ -611,7 +563,7 @@ public class TaskStackAnimationHelper {
false /* ignoreTaskOverrides */, mTmpFinalTaskTransforms);
// Hide the front most task view until the scroll is complete
- Task frontMostTask = newStack.getStackFrontMostTask(false /* includeFreeform */);
+ Task frontMostTask = newStack.getStackFrontMostTask();
final TaskView frontMostTaskView = mStackView.getChildViewForTask(frontMostTask);
final TaskViewTransform frontMostTransform = mTmpFinalTaskTransforms.get(
stackTasks.indexOf(frontMostTask));