Merge "Removing some unused AppWindowAnimationHelper dependencies" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e93d6d615c
+2
-6
@@ -49,7 +49,6 @@ import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.anim.SpringAnimationBuilder;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.quickstep.util.AppWindowAnimationHelper;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.quickstep.views.TaskView;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
@@ -86,11 +85,8 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti
|
||||
boolean skipLauncherChanges = !launcherClosing;
|
||||
|
||||
TaskView taskView = findTaskViewToLaunch(mLauncher, v, appTargets);
|
||||
|
||||
AppWindowAnimationHelper helper =
|
||||
new AppWindowAnimationHelper(recentsView.getPagedViewOrientedState(), mLauncher);
|
||||
Animator recentsAnimator = getRecentsWindowAnimator(taskView, skipLauncherChanges,
|
||||
appTargets, wallpaperTargets, mLauncher.getDepthController(), helper);
|
||||
appTargets, wallpaperTargets, mLauncher.getDepthController());
|
||||
anim.play(recentsAnimator.setDuration(RECENTS_LAUNCH_DURATION));
|
||||
|
||||
Animator childStateAnimation = null;
|
||||
@@ -98,7 +94,7 @@ public final class LauncherAppTransitionManagerImpl extends QuickstepAppTransiti
|
||||
Animator launcherAnim;
|
||||
final AnimatorListenerAdapter windowAnimEndListener;
|
||||
if (launcherClosing) {
|
||||
launcherAnim = recentsView.createAdjacentPageAnimForTaskLaunch(taskView, helper);
|
||||
launcherAnim = recentsView.createAdjacentPageAnimForTaskLaunch(taskView);
|
||||
launcherAnim.setInterpolator(Interpolators.TOUCH_RESPONSE_INTERPOLATOR);
|
||||
launcherAnim.setDuration(RECENTS_LAUNCH_DURATION);
|
||||
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> exten
|
||||
mActivityInterface.getSwipeUpDestinationAndLength(mActivity.getDeviceProfile(), mActivity,
|
||||
targetRect);
|
||||
clipHelper.updateTargetRect(targetRect);
|
||||
clipHelper.prepareAnimation(mActivity.getDeviceProfile(), false /* isOpening */);
|
||||
clipHelper.prepareAnimation(mActivity.getDeviceProfile());
|
||||
|
||||
TransformParams params = new TransformParams()
|
||||
.setSyncTransactionApplier(new SyncRtSurfaceTransactionApplierCompat(rootView));
|
||||
|
||||
@@ -276,7 +276,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten
|
||||
updateSource(overviewStackBounds, runningTaskTarget);
|
||||
}
|
||||
|
||||
mAppWindowAnimationHelper.prepareAnimation(dp, false /* isOpening */);
|
||||
mAppWindowAnimationHelper.prepareAnimation(dp);
|
||||
initTransitionEndpoints(dp);
|
||||
|
||||
// Notify when the animation starts
|
||||
|
||||
@@ -479,7 +479,7 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa
|
||||
mRecentsAnimationController.enableInputConsumer();
|
||||
|
||||
if (mRunningOverHome) {
|
||||
mAppWindowAnimationHelper.prepareAnimation(mDp, true);
|
||||
mAppWindowAnimationHelper.prepareAnimation(mDp);
|
||||
}
|
||||
applyTransformUnchecked();
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.android.launcher3.util.ObjectWrapper;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
import com.android.quickstep.fallback.FallbackRecentsView;
|
||||
import com.android.quickstep.fallback.RecentsRootView;
|
||||
import com.android.quickstep.util.AppWindowAnimationHelper;
|
||||
import com.android.quickstep.views.TaskView;
|
||||
import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.ActivityOptionsCompat;
|
||||
@@ -184,17 +183,14 @@ public final class RecentsActivity extends BaseRecentsActivity {
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets) {
|
||||
AnimatorSet target = new AnimatorSet();
|
||||
boolean activityClosing = taskIsATargetWithMode(appTargets, getTaskId(), MODE_CLOSING);
|
||||
AppWindowAnimationHelper helper = new AppWindowAnimationHelper(
|
||||
mFallbackRecentsView.getPagedViewOrientedState(), this);
|
||||
Animator recentsAnimator = getRecentsWindowAnimator(taskView, !activityClosing, appTargets,
|
||||
wallpaperTargets, null /* depthController */,
|
||||
helper);
|
||||
wallpaperTargets, null /* depthController */);
|
||||
target.play(recentsAnimator.setDuration(RECENTS_LAUNCH_DURATION));
|
||||
|
||||
// Found a visible recents task that matches the opening app, lets launch the app from there
|
||||
if (activityClosing) {
|
||||
Animator adjacentAnimation = mFallbackRecentsView
|
||||
.createAdjacentPageAnimForTaskLaunch(taskView, helper);
|
||||
.createAdjacentPageAnimForTaskLaunch(taskView);
|
||||
adjacentAnimation.setInterpolator(Interpolators.TOUCH_RESPONSE_INTERPOLATOR);
|
||||
adjacentAnimation.setDuration(RECENTS_LAUNCH_DURATION);
|
||||
adjacentAnimation.addListener(new AnimatorListenerAdapter() {
|
||||
|
||||
@@ -123,8 +123,10 @@ public final class TaskViewUtils {
|
||||
public static Animator getRecentsWindowAnimator(TaskView v, boolean skipViewChanges,
|
||||
RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets,
|
||||
DepthController depthController,
|
||||
final AppWindowAnimationHelper inOutHelper) {
|
||||
DepthController depthController) {
|
||||
AppWindowAnimationHelper inOutHelper = new AppWindowAnimationHelper(
|
||||
v.getRecentsView().getPagedViewOrientedState(), v.getContext());
|
||||
|
||||
SyncRtSurfaceTransactionApplierCompat applier =
|
||||
new SyncRtSurfaceTransactionApplierCompat(v);
|
||||
final RemoteAnimationTargets targets =
|
||||
@@ -149,10 +151,8 @@ public final class TaskViewUtils {
|
||||
|
||||
{
|
||||
inOutHelper.setTaskAlphaCallback((t, alpha) -> mTaskAlpha.value);
|
||||
|
||||
inOutHelper.prepareAnimation(
|
||||
BaseActivity.fromContext(v.getContext()).getDeviceProfile(),
|
||||
true /* isOpening */);
|
||||
BaseActivity.fromContext(v.getContext()).getDeviceProfile());
|
||||
inOutHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(),
|
||||
targets.apps.length == 0 ? null : targets.apps[0]);
|
||||
|
||||
|
||||
+1
-24
@@ -20,7 +20,6 @@ import static com.android.systemui.shared.system.QuickStepContract.getWindowCorn
|
||||
import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
@@ -43,7 +42,6 @@ import com.android.quickstep.RemoteAnimationTargets;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.quickstep.views.TaskThumbnailView;
|
||||
import com.android.quickstep.views.TaskView;
|
||||
import com.android.systemui.shared.recents.utilities.RectFEvaluator;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
|
||||
@@ -96,9 +94,6 @@ public class AppWindowAnimationHelper {
|
||||
// Corner radius currently applied to transformed window.
|
||||
private float mCurrentCornerRadius;
|
||||
|
||||
// Whether to boost the opening animation target layers, or the closing
|
||||
private int mBoostModeTargetLayers = -1;
|
||||
|
||||
private TargetAlphaProvider mTaskAlphaCallback = (t, a) -> a;
|
||||
private TargetAlphaProvider mBaseAlphaCallback = (t, a) -> 1;
|
||||
|
||||
@@ -163,8 +158,7 @@ public class AppWindowAnimationHelper {
|
||||
mTargetRect.width(), mTargetRect.height());
|
||||
}
|
||||
|
||||
public void prepareAnimation(DeviceProfile dp, boolean isOpening) {
|
||||
mBoostModeTargetLayers = isOpening ? MODE_OPENING : MODE_CLOSING;
|
||||
public void prepareAnimation(DeviceProfile dp) {
|
||||
mUseRoundedCornersOnWindows = mSupportsRoundedCornersOnWindows && !dp.isMultiWindowMode;
|
||||
}
|
||||
|
||||
@@ -317,10 +311,6 @@ public class AppWindowAnimationHelper {
|
||||
mBaseAlphaCallback = callback;
|
||||
}
|
||||
|
||||
public void fromTaskThumbnailView(TaskThumbnailView ttv, RecentsView rv) {
|
||||
fromTaskThumbnailView(ttv, rv, null);
|
||||
}
|
||||
|
||||
public void fromTaskThumbnailView(TaskThumbnailView ttv, RecentsView rv,
|
||||
@Nullable RemoteAnimationTargetCompat target) {
|
||||
BaseDraggingActivity activity = BaseDraggingActivity.fromContext(ttv.getContext());
|
||||
@@ -357,19 +347,6 @@ public class AppWindowAnimationHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute scale and translation y such that the specified task view fills the screen.
|
||||
*/
|
||||
public AppWindowAnimationHelper updateForFullscreenOverview(TaskView v) {
|
||||
TaskThumbnailView thumbnailView = v.getThumbnail();
|
||||
RecentsView recentsView = v.getRecentsView();
|
||||
fromTaskThumbnailView(thumbnailView, recentsView);
|
||||
Rect taskSize = new Rect();
|
||||
recentsView.getTaskSize(taskSize);
|
||||
updateTargetRect(taskSize);
|
||||
return this;
|
||||
}
|
||||
|
||||
private void updateStackBoundsToMultiWindowTaskSize(BaseDraggingActivity activity) {
|
||||
SystemUiProxy proxy = SystemUiProxy.INSTANCE.get(activity);
|
||||
if (proxy.isActive()) {
|
||||
|
||||
+2
-6
@@ -32,7 +32,6 @@ import android.animation.ObjectAnimator;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
@@ -63,8 +62,6 @@ import com.android.systemui.plugins.RecentsExtraCard;
|
||||
public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
|
||||
implements StateListener {
|
||||
|
||||
private static final Rect sTempRect = new Rect();
|
||||
|
||||
private final TransformParams mTransformParams = new TransformParams();
|
||||
|
||||
private RecentsExtraCard mRecentsExtraCardPlugin;
|
||||
@@ -149,9 +146,8 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
|
||||
* Animates adjacent tasks and translate hotseat off screen as well.
|
||||
*/
|
||||
@Override
|
||||
public AnimatorSet createAdjacentPageAnimForTaskLaunch(TaskView tv,
|
||||
AppWindowAnimationHelper helper) {
|
||||
AnimatorSet anim = super.createAdjacentPageAnimForTaskLaunch(tv, helper);
|
||||
public AnimatorSet createAdjacentPageAnimForTaskLaunch(TaskView tv) {
|
||||
AnimatorSet anim = super.createAdjacentPageAnimForTaskLaunch(tv);
|
||||
|
||||
if (!SysUINavigationMode.getMode(mActivity).hasGestures) {
|
||||
// Hotseat doesn't move when opening recents with the button,
|
||||
|
||||
@@ -1760,8 +1760,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
* If launching one of the adjacent tasks, parallax the center task and other adjacent task
|
||||
* to the right.
|
||||
*/
|
||||
public AnimatorSet createAdjacentPageAnimForTaskLaunch(
|
||||
TaskView tv, AppWindowAnimationHelper appWindowAnimationHelper) {
|
||||
public AnimatorSet createAdjacentPageAnimForTaskLaunch(TaskView tv) {
|
||||
AnimatorSet anim = new AnimatorSet();
|
||||
|
||||
int taskIndex = indexOfChild(tv);
|
||||
@@ -1833,11 +1832,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
}
|
||||
});
|
||||
|
||||
AppWindowAnimationHelper appWindowAnimationHelper = new AppWindowAnimationHelper(
|
||||
getPagedViewOrientedState(), mActivity);
|
||||
appWindowAnimationHelper.fromTaskThumbnailView(tv.getThumbnail(), this);
|
||||
appWindowAnimationHelper.prepareAnimation(mActivity.getDeviceProfile(), true /* isOpening */);
|
||||
AnimatorSet anim = createAdjacentPageAnimForTaskLaunch(tv, appWindowAnimationHelper);
|
||||
AnimatorSet anim = createAdjacentPageAnimForTaskLaunch(tv);
|
||||
|
||||
DepthController depthController = getDepthController();
|
||||
if (depthController != null) {
|
||||
|
||||
Reference in New Issue
Block a user