7/ Rename RecentsAnimationWrapper
- Move the recents animation classes out of util into base quickstep pkg
- Clean up some local var names
Bug: 141886704
Change-Id: I1556179e203cbb43b77ea58e6fe520aa9944099b
diff --git a/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
index b1a3881..f31cf37 100644
--- a/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
+++ b/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
@@ -32,7 +32,6 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.LauncherAnimationRunner;
import com.android.quickstep.util.RemoteAnimationProvider;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.quickstep.views.IconRecentsView;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
@@ -113,9 +112,9 @@
return anim;
}
- RemoteAnimationTargets targetSet =
+ RemoteAnimationTargets targets =
new RemoteAnimationTargets(appTargets, wallpaperTargets, MODE_CLOSING);
- mRecentsView.setTransitionedFromApp(!targetSet.isAnimatingHome());
+ mRecentsView.setTransitionedFromApp(!targets.isAnimatingHome());
RemoteAnimationTargetCompat recentsTarget = null;
RemoteAnimationTargetCompat closingAppTarget = null;
diff --git a/go/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java b/go/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java
index 37c2c04..ee860ab 100644
--- a/go/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java
+++ b/go/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java
@@ -27,7 +27,6 @@
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.util.ActivityInitListener;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.quickstep.views.IconRecentsView;
import java.util.function.BiPredicate;
diff --git a/go/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/go/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index 9c409cc..f65109a 100644
--- a/go/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/go/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -40,26 +40,28 @@
public class OverviewCommandHelper {
private final Context mContext;
- private final ActivityManagerWrapper mAM;
+ private final RecentsAnimationDeviceState mDeviceState;
private final RecentsModel mRecentsModel;
private final OverviewComponentObserver mOverviewComponentObserver;
private long mLastToggleTime;
- public OverviewCommandHelper(Context context, OverviewComponentObserver observer) {
+ public OverviewCommandHelper(Context context, RecentsAnimationDeviceState deviceState,
+ OverviewComponentObserver observer) {
mContext = context;
- mAM = ActivityManagerWrapper.getInstance();
+ mDeviceState = deviceState;
mRecentsModel = RecentsModel.INSTANCE.get(mContext);
mOverviewComponentObserver = observer;
}
public void onOverviewToggle() {
// If currently screen pinning, do not enter overview
- if (mAM.isScreenPinningActive()) {
+ if (mDeviceState.isScreenPinningActive()) {
return;
}
- mAM.closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
+ ActivityManagerWrapper.getInstance()
+ .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
MAIN_EXECUTOR.execute(new RecentsActivityCommand<>());
}
diff --git a/go/quickstep/src/com/android/quickstep/TouchInteractionService.java b/go/quickstep/src/com/android/quickstep/TouchInteractionService.java
index 0012ad4..f743663 100644
--- a/go/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/go/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -148,7 +148,7 @@
public void onUserUnlocked() {
mRecentsModel = RecentsModel.INSTANCE.get(this);
mOverviewComponentObserver = new OverviewComponentObserver(this, mDeviceState);
- mOverviewCommandHelper = new OverviewCommandHelper(this,
+ mOverviewCommandHelper = new OverviewCommandHelper(this, mDeviceState,
mOverviewComponentObserver);
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
index 1b49732..3eab5ac 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java
@@ -32,7 +32,6 @@
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.quickstep.util.AppWindowAnimationHelper;
import com.android.quickstep.util.RemoteAnimationProvider;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
@@ -115,11 +114,11 @@
return anim;
}
- RemoteAnimationTargets targetSet = new RemoteAnimationTargets(appTargets,
+ RemoteAnimationTargets targets = new RemoteAnimationTargets(appTargets,
wallpaperTargets, MODE_CLOSING);
// Use the top closing app to determine the insets for the animation
- RemoteAnimationTargetCompat runningTaskTarget = targetSet.findTask(mTargetTaskId);
+ RemoteAnimationTargetCompat runningTaskTarget = targets.findTask(mTargetTaskId);
if (runningTaskTarget == null) {
Log.e(TAG, "No closing app");
anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
@@ -149,12 +148,12 @@
valueAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR);
valueAnimator.addUpdateListener((v) -> {
params.setProgress((float) v.getAnimatedValue())
- .setTargetSet(targetSet)
+ .setTargetSet(targets)
.setLauncherOnTop(true);
clipHelper.applyTransform(params);
});
- if (targetSet.isAnimatingHome()) {
+ if (targets.isAnimatingHome()) {
// If we are animating home, fade in the opening targets
RemoteAnimationTargets openingSet = new RemoteAnimationTargets(appTargets,
wallpaperTargets, MODE_OPENING);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
index d391c46..9eb2d4c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
@@ -58,14 +58,12 @@
import com.android.launcher3.views.FloatingIconView;
import com.android.quickstep.ActivityControlHelper.HomeAnimationFactory;
import com.android.quickstep.SysUINavigationMode.Mode;
-import com.android.quickstep.inputconsumers.InputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AppWindowAnimationHelper;
import com.android.quickstep.util.AppWindowAnimationHelper.TransformParams;
import com.android.quickstep.util.RectFSpringAnim;
-import com.android.quickstep.util.RecentsAnimationTargets;
-import com.android.quickstep.util.RecentsAnimationCallbacks.RecentsAnimationListener;
+import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -118,7 +116,7 @@
protected final ActivityInitListener mActivityInitListener;
protected final InputConsumerController mInputConsumer;
- protected RecentsAnimationWrapper mRecentsAnimationWrapper;
+ protected RecentsAnimationController mRecentsAnimationController;
protected RecentsAnimationTargets mRecentsAnimationTargets;
// Callbacks to be made once the recents animation starts
@@ -227,7 +225,7 @@
});
mRecentsView.setAppWindowAnimationHelper(mAppWindowAnimationHelper);
runOnRecentsAnimationStart(() ->
- mRecentsView.setRecentsAnimationTargets(mRecentsAnimationWrapper,
+ mRecentsView.setRecentsAnimationTargets(mRecentsAnimationController,
mRecentsAnimationTargets));
}
@@ -240,7 +238,7 @@
} else {
int taskId = mRecentsView.getNextPageTaskView().getTask().key.id;
mFinishingRecentsAnimationForNewTaskId = taskId;
- mRecentsAnimationWrapper.finish(true /* toRecents */, () -> {
+ mRecentsAnimationController.finish(true /* toRecents */, () -> {
if (!mCanceled) {
TaskView nextTask = mRecentsView.getTaskView(taskId);
if (nextTask != null) {
@@ -284,17 +282,17 @@
}
@Override
- public void onRecentsAnimationStart(RecentsAnimationWrapper recentsAnimationController,
- RecentsAnimationTargets targetSet) {
- mRecentsAnimationWrapper = recentsAnimationController;
- mRecentsAnimationTargets = targetSet;
+ public void onRecentsAnimationStart(RecentsAnimationController recentsAnimationController,
+ RecentsAnimationTargets targets) {
+ mRecentsAnimationController = recentsAnimationController;
+ mRecentsAnimationTargets = targets;
DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext);
final Rect overviewStackBounds;
- RemoteAnimationTargetCompat runningTaskTarget = targetSet.findTask(mRunningTaskId);
+ RemoteAnimationTargetCompat runningTaskTarget = targets.findTask(mRunningTaskId);
- if (targetSet.minimizedHomeBounds != null && runningTaskTarget != null) {
+ if (targets.minimizedHomeBounds != null && runningTaskTarget != null) {
overviewStackBounds = mActivityControlHelper
- .getOverviewWindowBounds(targetSet.minimizedHomeBounds, runningTaskTarget);
+ .getOverviewWindowBounds(targets.minimizedHomeBounds, runningTaskTarget);
dp = dp.getMultiWindowProfile(mContext, new Point(
overviewStackBounds.width(), overviewStackBounds.height()));
} else {
@@ -302,7 +300,7 @@
dp = dp.copy(mContext);
overviewStackBounds = getStackBounds(dp);
}
- dp.updateInsets(targetSet.homeContentInsets);
+ dp.updateInsets(targets.homeContentInsets);
dp.updateIsSeascape(mContext);
if (runningTaskTarget != null) {
mAppWindowAnimationHelper.updateSource(overviewStackBounds, runningTaskTarget);
@@ -322,13 +320,13 @@
@Override
public void onRecentsAnimationCanceled(ThumbnailData thumbnailData) {
- mRecentsAnimationWrapper = null;
+ mRecentsAnimationController = null;
mRecentsAnimationTargets = null;
}
@Override
- public void onRecentsAnimationFinished(RecentsAnimationWrapper controller) {
- mRecentsAnimationWrapper = null;
+ public void onRecentsAnimationFinished(RecentsAnimationController controller) {
+ mRecentsAnimationController = null;
mRecentsAnimationTargets = null;
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
index 04ece7c..14bd35c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
@@ -37,7 +37,6 @@
import com.android.quickstep.fallback.FallbackRecentsView;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.LayoutUtils;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java
index 6df9ce5..6cdcb39 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/OverviewCommandHelper.java
@@ -27,6 +27,7 @@
import android.os.SystemClock;
import android.view.ViewConfiguration;
+import androidx.annotation.BinderThread;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.userevent.nano.LauncherLogProto;
@@ -44,37 +45,43 @@
public class OverviewCommandHelper {
private final Context mContext;
- private final ActivityManagerWrapper mAM;
+ private final RecentsAnimationDeviceState mDeviceState;
private final RecentsModel mRecentsModel;
private final OverviewComponentObserver mOverviewComponentObserver;
private long mLastToggleTime;
- public OverviewCommandHelper(Context context, OverviewComponentObserver observer) {
+ public OverviewCommandHelper(Context context, RecentsAnimationDeviceState deviceState,
+ OverviewComponentObserver observer) {
mContext = context;
- mAM = ActivityManagerWrapper.getInstance();
+ mDeviceState = deviceState;
mRecentsModel = RecentsModel.INSTANCE.get(mContext);
mOverviewComponentObserver = observer;
}
+ @BinderThread
public void onOverviewToggle() {
// If currently screen pinning, do not enter overview
- if (mAM.isScreenPinningActive()) {
+ if (mDeviceState.isScreenPinningActive()) {
return;
}
- mAM.closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
+ ActivityManagerWrapper.getInstance()
+ .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
MAIN_EXECUTOR.execute(new RecentsActivityCommand<>());
}
+ @BinderThread
public void onOverviewShown(boolean triggeredFromAltTab) {
MAIN_EXECUTOR.execute(new ShowRecentsCommand(triggeredFromAltTab));
}
+ @BinderThread
public void onOverviewHidden() {
MAIN_EXECUTOR.execute(new HideRecentsCommand());
}
+ @BinderThread
public void onTip(int actionType, int viewType) {
MAIN_EXECUTOR.execute(() ->
UserEventDispatcher.newInstance(mContext).logActionTip(actionType, viewType));
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/SwipeSharedState.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/SwipeSharedState.java
index e09c9cb..7beab5b 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/SwipeSharedState.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/SwipeSharedState.java
@@ -22,9 +22,7 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.Preconditions;
-import com.android.quickstep.util.RecentsAnimationCallbacks;
-import com.android.quickstep.util.RecentsAnimationTargets;
-import com.android.quickstep.util.RecentsAnimationCallbacks.RecentsAnimationListener;
+import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -38,7 +36,7 @@
private OverviewComponentObserver mOverviewComponentObserver;
private RecentsAnimationCallbacks mRecentsAnimationListener;
- private RecentsAnimationWrapper mLastRecentsAnimationController;
+ private RecentsAnimationController mLastRecentsAnimationController;
private RecentsAnimationTargets mLastAnimationTarget;
private boolean mLastAnimationCancelled = false;
@@ -55,10 +53,10 @@
}
@Override
- public final void onRecentsAnimationStart(RecentsAnimationWrapper controller,
- RecentsAnimationTargets targetSet) {
+ public final void onRecentsAnimationStart(RecentsAnimationController controller,
+ RecentsAnimationTargets targets) {
mLastRecentsAnimationController = controller;
- mLastAnimationTarget = targetSet;
+ mLastAnimationTarget = targets;
mLastAnimationCancelled = false;
mLastAnimationRunning = true;
@@ -78,7 +76,7 @@
}
@Override
- public final void onRecentsAnimationFinished(RecentsAnimationWrapper controller) {
+ public final void onRecentsAnimationFinished(RecentsAnimationController controller) {
if (mLastRecentsAnimationController == controller) {
mLastAnimationRunning = false;
}
@@ -117,7 +115,7 @@
mLastAnimationRunning = false;
}
- public RecentsAnimationCallbacks newRecentsAnimationListenerSet() {
+ public RecentsAnimationCallbacks newRecentsAnimationCallbacks() {
Preconditions.assertUIThread();
if (mLastAnimationRunning) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
index b55fd8b..2522c0f 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java
@@ -33,7 +33,6 @@
import com.android.launcher3.Utilities;
import com.android.quickstep.util.AppWindowAnimationHelper;
import com.android.quickstep.util.MultiValueUpdateListener;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.Task;
@@ -121,13 +120,13 @@
RemoteAnimationTargetCompat[] wallpaperTargets, final AppWindowAnimationHelper inOutHelper) {
SyncRtSurfaceTransactionApplierCompat applier =
new SyncRtSurfaceTransactionApplierCompat(v);
- final RemoteAnimationTargets targetSet =
+ final RemoteAnimationTargets targets =
new RemoteAnimationTargets(appTargets, wallpaperTargets, MODE_OPENING);
- targetSet.addDependentTransactionApplier(applier);
+ targets.addDependentTransactionApplier(applier);
AppWindowAnimationHelper.TransformParams params =
new AppWindowAnimationHelper.TransformParams()
.setSyncTransactionApplier(applier)
- .setTargetSet(targetSet)
+ .setTargetSet(targets)
.setLauncherOnTop(true);
final RecentsView recentsView = v.getRecentsView();
@@ -149,7 +148,7 @@
BaseActivity.fromContext(v.getContext()).getDeviceProfile(),
true /* isOpening */);
inOutHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(),
- targetSet.apps.length == 0 ? null : targetSet.apps[0]);
+ targets.apps.length == 0 ? null : targets.apps[0]);
mThumbnailRect = new RectF(inOutHelper.getTargetRect());
mThumbnailRect.offset(-v.getTranslationX(), -v.getTranslationY());
@@ -203,7 +202,7 @@
appAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
- targetSet.release();
+ targets.release();
}
});
return appAnimator;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
index 41d9471..2616d0d 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java
@@ -48,6 +48,7 @@
import android.view.InputEvent;
import android.view.MotionEvent;
+import androidx.annotation.BinderThread;
import androidx.annotation.UiThread;
import androidx.annotation.WorkerThread;
@@ -66,7 +67,6 @@
import com.android.quickstep.inputconsumers.AssistantInputConsumer;
import com.android.quickstep.inputconsumers.DeviceLockedInputConsumer;
import com.android.quickstep.inputconsumers.FallbackNoButtonInputConsumer;
-import com.android.quickstep.inputconsumers.InputConsumer;
import com.android.quickstep.inputconsumers.OtherActivityInputConsumer;
import com.android.quickstep.inputconsumers.OverviewInputConsumer;
import com.android.quickstep.inputconsumers.OverviewWithoutFocusInputConsumer;
@@ -123,6 +123,7 @@
private final IBinder mMyBinder = new IOverviewProxy.Stub() {
+ @BinderThread
public void onInitialize(Bundle bundle) {
ISystemUiProxy proxy = ISystemUiProxy.Stub.asInterface(
bundle.getBinder(KEY_EXTRA_SYSUI_PROXY));
@@ -133,16 +134,19 @@
sIsInitialized = true;
}
+ @BinderThread
@Override
public void onOverviewToggle() {
mOverviewCommandHelper.onOverviewToggle();
}
+ @BinderThread
@Override
public void onOverviewShown(boolean triggeredFromAltTab) {
mOverviewCommandHelper.onOverviewShown(triggeredFromAltTab);
}
+ @BinderThread
@Override
public void onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
if (triggeredFromAltTab && !triggeredFromHomeKey) {
@@ -151,23 +155,27 @@
}
}
+ @BinderThread
@Override
public void onTip(int actionType, int viewType) {
mOverviewCommandHelper.onTip(actionType, viewType);
}
+ @BinderThread
@Override
public void onAssistantAvailable(boolean available) {
MAIN_EXECUTOR.execute(() -> mDeviceState.setAssistantAvailable(available));
MAIN_EXECUTOR.execute(TouchInteractionService.this::onAssistantVisibilityChanged);
}
+ @BinderThread
@Override
public void onAssistantVisibilityChanged(float visibility) {
MAIN_EXECUTOR.execute(() -> mDeviceState.setAssistantVisibility(visibility));
MAIN_EXECUTOR.execute(TouchInteractionService.this::onAssistantVisibilityChanged);
}
+ @BinderThread
public void onBackAction(boolean completed, int downX, int downY, boolean isButton,
boolean gestureSwipeLeft) {
if (mOverviewComponentObserver == null) {
@@ -184,11 +192,13 @@
}
}
+ @BinderThread
public void onSystemUiStateChanged(int stateFlags) {
MAIN_EXECUTOR.execute(() -> mDeviceState.setSystemUiFlags(stateFlags));
MAIN_EXECUTOR.execute(TouchInteractionService.this::onSystemUiFlagsChanged);
}
+ @BinderThread
public void onActiveNavBarRegionChanges(Region region) {
MAIN_EXECUTOR.execute(() -> mDeviceState.setDeferredGestureRegion(region));
}
@@ -314,10 +324,12 @@
resetHomeBounceSeenOnQuickstepEnabledFirstTime();
}
+ @UiThread
public void onUserUnlocked() {
mRecentsModel = RecentsModel.INSTANCE.get(this);
mOverviewComponentObserver = new OverviewComponentObserver(this, mDeviceState);
- mOverviewCommandHelper = new OverviewCommandHelper(this, mOverviewComponentObserver);
+ mOverviewCommandHelper = new OverviewCommandHelper(this, mDeviceState,
+ mOverviewComponentObserver);
mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
sSwipeSharedState.setOverviewComponentObserver(mOverviewComponentObserver);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 69928f3..ccc41e3 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -75,12 +75,10 @@
import com.android.quickstep.ActivityControlHelper.AnimationFactory.ShelfAnimState;
import com.android.quickstep.ActivityControlHelper.HomeAnimationFactory;
import com.android.quickstep.SysUINavigationMode.Mode;
-import com.android.quickstep.inputconsumers.InputConsumer;
import com.android.quickstep.inputconsumers.OverviewInputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.AppWindowAnimationHelper.TargetAlphaProvider;
import com.android.quickstep.util.RectFSpringAnim;
-import com.android.quickstep.util.RecentsAnimationTargets;
import com.android.quickstep.views.LiveTileOverlay;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
@@ -594,8 +592,8 @@
: centermostTask.getThumbnail().getSysUiStatusNavFlags();
boolean useHomeScreenFlags = windowProgress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD;
// We will handle the sysui flags based on the centermost task view.
- if (mRecentsAnimationWrapper != null) {
- mRecentsAnimationWrapper.setWindowThresholdCrossed(centermostTaskFlags != 0
+ if (mRecentsAnimationController != null) {
+ mRecentsAnimationController.setWindowThresholdCrossed(centermostTaskFlags != 0
|| useHomeScreenFlags);
}
int sysuiFlags = useHomeScreenFlags ? 0 : centermostTaskFlags;
@@ -604,14 +602,14 @@
}
@Override
- public void onRecentsAnimationStart(RecentsAnimationWrapper controller,
- RecentsAnimationTargets targetSet) {
- ActiveGestureLog.INSTANCE.addLog("startRecentsAnimationCallback", targetSet.apps.length);
- super.onRecentsAnimationStart(controller, targetSet);
+ public void onRecentsAnimationStart(RecentsAnimationController controller,
+ RecentsAnimationTargets targets) {
+ ActiveGestureLog.INSTANCE.addLog("startRecentsAnimationCallback", targets.apps.length);
+ super.onRecentsAnimationStart(controller, targets);
// Only add the callback to enable the input consumer after we actually have the controller
mStateCallback.addCallback(STATE_APP_CONTROLLER_RECEIVED | STATE_GESTURE_STARTED,
- mRecentsAnimationWrapper::enableInputConsumer);
+ mRecentsAnimationController::enableInputConsumer);
setStateOnUiThread(STATE_APP_CONTROLLER_RECEIVED);
mPassedOverviewThreshold = false;
@@ -813,8 +811,8 @@
}
}
- if (endTarget.isLauncher && mRecentsAnimationWrapper != null) {
- mRecentsAnimationWrapper.enableInputProxy(mInputConsumer,
+ if (endTarget.isLauncher && mRecentsAnimationController != null) {
+ mRecentsAnimationController.enableInputProxy(mInputConsumer,
this::createNewInputProxyHandler);
}
@@ -1022,7 +1020,7 @@
@UiThread
private void resumeLastTask() {
- mRecentsAnimationWrapper.finish(false /* toRecents */, null);
+ mRecentsAnimationController.finish(false /* toRecents */, null);
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation", false);
doLogGesture(LAST_TASK);
reset();
@@ -1113,10 +1111,10 @@
private void switchToScreenshot() {
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
- if (mRecentsAnimationWrapper != null) {
+ if (mRecentsAnimationController != null) {
// Update the screenshot of the task
if (mTaskSnapshot == null) {
- mTaskSnapshot = mRecentsAnimationWrapper.screenshotTask(mRunningTaskId);
+ mTaskSnapshot = mRecentsAnimationController.screenshotTask(mRunningTaskId);
}
mRecentsView.updateThumbnail(mRunningTaskId, mTaskSnapshot, false /* refreshNow */);
}
@@ -1126,10 +1124,10 @@
setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
} else {
boolean finishTransitionPosted = false;
- if (mRecentsAnimationWrapper != null) {
+ if (mRecentsAnimationController != null) {
// Update the screenshot of the task
if (mTaskSnapshot == null) {
- mTaskSnapshot = mRecentsAnimationWrapper.screenshotTask(mRunningTaskId);
+ mTaskSnapshot = mRecentsAnimationController.screenshotTask(mRunningTaskId);
}
final TaskView taskView;
if (mGestureEndTarget == HOME) {
@@ -1162,8 +1160,8 @@
// If there are no targets, then there is nothing to finish
setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
} else {
- synchronized (mRecentsAnimationWrapper) {
- mRecentsAnimationWrapper.finish(true /* toRecents */,
+ synchronized (mRecentsAnimationController) {
+ mRecentsAnimationController.finish(true /* toRecents */,
() -> setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
}
}
@@ -1171,8 +1169,8 @@
}
private void finishCurrentTransitionToHome() {
- synchronized (mRecentsAnimationWrapper) {
- mRecentsAnimationWrapper.finish(true /* toRecents */,
+ synchronized (mRecentsAnimationController) {
+ mRecentsAnimationController.finish(true /* toRecents */,
() -> setStateOnUiThread(STATE_CURRENT_TASK_FINISHED),
true /* sendUserLeaveHint */);
}
@@ -1183,8 +1181,8 @@
private void setupLauncherUiAfterSwipeUpToRecentsAnimation() {
endLauncherTransitionController();
mActivityControlHelper.onSwipeUpToRecentsComplete(mActivity);
- if (mRecentsAnimationWrapper != null) {
- mRecentsAnimationWrapper.setDeferCancelUntilNextTransition(true /* defer */,
+ if (mRecentsAnimationController != null) {
+ mRecentsAnimationController.setDeferCancelUntilNextTransition(true /* defer */,
true /* screenshot */);
}
mRecentsView.onSwipeUpAnimationSuccess();
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java
index f9bbd37..d3765c5 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java
@@ -29,6 +29,7 @@
import android.view.ViewConfiguration;
import com.android.launcher3.R;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.RecentsAnimationDeviceState;
import com.android.quickstep.util.MotionPauseDetector;
import com.android.quickstep.SystemUiProxy;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java
index 7cc29e4..d60b927 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java
@@ -49,6 +49,7 @@
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.quickstep.ActivityControlHelper;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.SystemUiProxy;
import com.android.systemui.shared.system.InputMonitorCompat;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
index 311ddd2..0b5129c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
@@ -2,6 +2,7 @@
import android.view.MotionEvent;
+import com.android.quickstep.InputConsumer;
import com.android.systemui.shared.system.InputMonitorCompat;
public abstract class DelegateInputConsumer implements InputConsumer {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
index 2d95d75..cdf2e26 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
@@ -39,15 +39,15 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.DefaultDisplay;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.LockScreenRecentsActivity;
import com.android.quickstep.MultiStateCallback;
+import com.android.quickstep.RecentsAnimationController;
import com.android.quickstep.RecentsAnimationDeviceState;
-import com.android.quickstep.RecentsAnimationWrapper;
import com.android.quickstep.SwipeSharedState;
+import com.android.quickstep.RecentsAnimationCallbacks;
+import com.android.quickstep.RecentsAnimationTargets;
import com.android.quickstep.util.AppWindowAnimationHelper;
-import com.android.quickstep.util.RecentsAnimationCallbacks;
-import com.android.quickstep.util.RecentsAnimationTargets;
-
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.InputMonitorCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -92,7 +92,7 @@
private boolean mThresholdCrossed = false;
- private RecentsAnimationWrapper mRecentsAnimationController;
+ private RecentsAnimationController mRecentsAnimationController;
private RecentsAnimationTargets mRecentsAnimationTargets;
public DeviceLockedInputConsumer(Context context, RecentsAnimationDeviceState deviceState,
@@ -204,9 +204,8 @@
private void startRecentsTransition() {
mThresholdCrossed = true;
- RecentsAnimationCallbacks newListenerSet =
- mSwipeSharedState.newRecentsAnimationListenerSet();
- newListenerSet.addListener(this);
+ RecentsAnimationCallbacks callbacks = mSwipeSharedState.newRecentsAnimationCallbacks();
+ callbacks.addListener(this);
Intent intent = new Intent(Intent.ACTION_MAIN)
.addCategory(Intent.CATEGORY_DEFAULT)
.setComponent(new ComponentName(mContext, LockScreenRecentsActivity.class))
@@ -214,17 +213,17 @@
.putExtra(INTENT_EXTRA_LOG_TRACE_ID, mLogId);
mInputMonitorCompat.pilferPointers();
- startRecentsActivityAsync(intent, newListenerSet);
+ startRecentsActivityAsync(intent, callbacks);
}
@Override
- public void onRecentsAnimationStart(RecentsAnimationWrapper controller,
- RecentsAnimationTargets targetSet) {
+ public void onRecentsAnimationStart(RecentsAnimationController controller,
+ RecentsAnimationTargets targets) {
mRecentsAnimationController = controller;
- mRecentsAnimationTargets = targetSet;
+ mRecentsAnimationTargets = targets;
Rect displaySize = new Rect(0, 0, mDisplaySize.x, mDisplaySize.y);
- RemoteAnimationTargetCompat targetCompat = targetSet.findTask(mRunningTaskId);
+ RemoteAnimationTargetCompat targetCompat = targets.findTask(mRunningTaskId);
if (targetCompat != null) {
mAppWindowAnimationHelper.updateSource(displaySize, targetCompat);
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/FallbackNoButtonInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/FallbackNoButtonInputConsumer.java
index 4d9ed53..29357f2 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/FallbackNoButtonInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/FallbackNoButtonInputConsumer.java
@@ -42,15 +42,16 @@
import com.android.quickstep.ActivityControlHelper.HomeAnimationFactory;
import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.BaseSwipeUpHandler;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.MultiStateCallback;
import com.android.quickstep.OverviewComponentObserver;
import com.android.quickstep.RecentsActivity;
-import com.android.quickstep.RecentsAnimationWrapper;
+import com.android.quickstep.RecentsAnimationController;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.SwipeSharedState;
import com.android.quickstep.fallback.FallbackRecentsView;
import com.android.quickstep.util.RectFSpringAnim;
-import com.android.quickstep.util.RecentsAnimationTargets;
+import com.android.quickstep.RecentsAnimationTargets;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -232,8 +233,8 @@
@Override
public void updateFinalShift() {
mTransformParams.setProgress(mCurrentShift.value);
- if (mRecentsAnimationWrapper != null) {
- mRecentsAnimationWrapper.setWindowThresholdCrossed(!mInQuickSwitchMode
+ if (mRecentsAnimationController != null) {
+ mRecentsAnimationController.setWindowThresholdCrossed(!mInQuickSwitchMode
&& (mCurrentShift.value > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD));
}
if (mRecentsAnimationTargets != null) {
@@ -319,25 +320,25 @@
switch (mEndTarget) {
case HOME: {
if (mSwipeUpOverHome) {
- mRecentsAnimationWrapper.finish(false, null, false);
+ mRecentsAnimationController.finish(false, null, false);
// Send a home intent to clear the task stack
mContext.startActivity(mOverviewComponentObserver.getHomeIntent());
} else {
- mRecentsAnimationWrapper.finish(true, null, true);
+ mRecentsAnimationController.finish(true, null, true);
}
break;
}
case LAST_TASK:
- mRecentsAnimationWrapper.finish(false, null, false);
+ mRecentsAnimationController.finish(false, null, false);
break;
case RECENTS: {
if (mSwipeUpOverHome) {
- mRecentsAnimationWrapper.finish(true, null, true);
+ mRecentsAnimationController.finish(true, null, true);
break;
}
- ThumbnailData thumbnail = mRecentsAnimationWrapper.screenshotTask(mRunningTaskId);
- mRecentsAnimationWrapper.setDeferCancelUntilNextTransition(true /* defer */,
+ ThumbnailData thumbnail = mRecentsAnimationController.screenshotTask(mRunningTaskId);
+ mRecentsAnimationController.setDeferCancelUntilNextTransition(true /* defer */,
false /* screenshot */);
ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0);
@@ -350,7 +351,7 @@
Intent intent = new Intent(mOverviewComponentObserver.getOverviewIntent())
.putExtras(extras);
mContext.startActivity(intent, options.toBundle());
- mRecentsAnimationWrapper.cleanupScreenshot();
+ mRecentsAnimationController.cleanupScreenshot();
break;
}
case NEW_TASK: {
@@ -416,10 +417,10 @@
}
@Override
- public void onRecentsAnimationStart(RecentsAnimationWrapper controller,
- RecentsAnimationTargets targetSet) {
- super.onRecentsAnimationStart(controller, targetSet);
- mRecentsAnimationWrapper.enableInputConsumer();
+ public void onRecentsAnimationStart(RecentsAnimationController controller,
+ RecentsAnimationTargets targets) {
+ super.onRecentsAnimationStart(controller, targets);
+ mRecentsAnimationController.enableInputConsumer();
if (mRunningOverHome) {
mAppWindowAnimationHelper.prepareAnimation(mDp, true);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index 3e66d7b..d5a1804 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -53,6 +53,7 @@
import com.android.quickstep.ActivityControlHelper;
import com.android.quickstep.BaseSwipeUpHandler;
import com.android.quickstep.BaseSwipeUpHandler.Factory;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.RecentsAnimationDeviceState;
import com.android.quickstep.SwipeSharedState;
import com.android.quickstep.SysUINavigationMode;
@@ -61,7 +62,7 @@
import com.android.quickstep.util.CachedEventDispatcher;
import com.android.quickstep.util.MotionPauseDetector;
import com.android.quickstep.util.NavBarPosition;
-import com.android.quickstep.util.RecentsAnimationCallbacks;
+import com.android.quickstep.RecentsAnimationCallbacks;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.InputMonitorCompat;
@@ -343,12 +344,11 @@
mSwipeSharedState.applyActiveRecentsAnimationState(handler);
notifyGestureStarted();
} else {
- RecentsAnimationCallbacks newListenerSet =
- mSwipeSharedState.newRecentsAnimationListenerSet();
- newListenerSet.addListener(handler);
+ RecentsAnimationCallbacks callbacks = mSwipeSharedState.newRecentsAnimationCallbacks();
+ callbacks.addListener(handler);
Intent intent = handler.getLaunchIntent();
intent.putExtra(INTENT_EXTRA_LOG_TRACE_ID, mLogId);
- startRecentsActivityAsync(intent, newListenerSet);
+ startRecentsActivityAsync(intent, callbacks);
}
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
index 74e457c..b09a5ac 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
@@ -27,6 +27,7 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.views.BaseDragLayer;
import com.android.quickstep.ActivityControlHelper;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.InputMonitorCompat;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
index 03e0ae7..c256094 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
@@ -36,6 +36,7 @@
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.quickstep.ActivityControlHelper;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.NavBarPosition;
import com.android.systemui.shared.system.ActivityManagerWrapper;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/QuickCaptureInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/QuickCaptureInputConsumer.java
index ad9405f..ea80a38 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/QuickCaptureInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/QuickCaptureInputConsumer.java
@@ -36,6 +36,7 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
import com.android.quickstep.ActivityControlHelper;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.InputMonitorCompat;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java
index 8eede81..e04c0c7 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ResetGestureInputConsumer.java
@@ -17,6 +17,7 @@
import android.view.MotionEvent;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.SwipeSharedState;
/**
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ScreenPinnedInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ScreenPinnedInputConsumer.java
index cfd9d91..d8b1bfd 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ScreenPinnedInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ScreenPinnedInputConsumer.java
@@ -22,6 +22,7 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
import com.android.quickstep.ActivityControlHelper;
+import com.android.quickstep.InputConsumer;
import com.android.quickstep.util.MotionPauseDetector;
import com.android.quickstep.SystemUiProxy;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
index c035809..5eee897 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java
@@ -35,6 +35,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
+import com.android.quickstep.RemoteAnimationTargets;
import com.android.quickstep.SystemUiProxy;
import com.android.launcher3.Utilities;
import com.android.launcher3.views.BaseDragLayer;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
index 6a6043c..764e0f3 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -220,7 +220,7 @@
@Override
public AppWindowAnimationHelper.TransformParams getLiveTileParams(
boolean mightNeedToRefill) {
- if (!mEnableDrawingLiveTile || mRecentsAnimationWrapper == null
+ if (!mEnableDrawingLiveTile || mRecentsAnimationController == null
|| mRecentsAnimationTargets == null || mAppWindowAnimationHelper == null) {
return null;
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 67cd3d6..ea06991 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -101,14 +101,14 @@
import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.ViewPool;
-import com.android.quickstep.RecentsAnimationWrapper;
+import com.android.quickstep.RecentsAnimationController;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.RecentsModel.TaskThumbnailChangeListener;
import com.android.quickstep.TaskThumbnailCache;
import com.android.quickstep.TaskUtils;
import com.android.quickstep.ViewUtils;
import com.android.quickstep.util.AppWindowAnimationHelper;
-import com.android.quickstep.util.RecentsAnimationTargets;
+import com.android.quickstep.RecentsAnimationTargets;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -156,7 +156,7 @@
}
};
- protected RecentsAnimationWrapper mRecentsAnimationWrapper;
+ protected RecentsAnimationController mRecentsAnimationController;
protected RecentsAnimationTargets mRecentsAnimationTargets;
protected AppWindowAnimationHelper mAppWindowAnimationHelper;
protected SyncRtSurfaceTransactionApplierCompat mSyncTransactionApplier;
@@ -809,7 +809,7 @@
mIgnoreResetTaskId = -1;
mTaskListChangeId = -1;
- mRecentsAnimationWrapper = null;
+ mRecentsAnimationController = null;
mRecentsAnimationTargets = null;
mAppWindowAnimationHelper = null;
@@ -1696,9 +1696,9 @@
public void redrawLiveTile(boolean mightNeedToRefill) { }
// TODO: To be removed in a follow up CL
- public void setRecentsAnimationTargets(RecentsAnimationWrapper recentsAnimationWrapper,
+ public void setRecentsAnimationTargets(RecentsAnimationController recentsAnimationController,
RecentsAnimationTargets recentsAnimationTargets) {
- mRecentsAnimationWrapper = recentsAnimationWrapper;
+ mRecentsAnimationController = recentsAnimationController;
mRecentsAnimationTargets = recentsAnimationTargets;
}
@@ -1718,14 +1718,14 @@
}
public void finishRecentsAnimation(boolean toRecents, Runnable onFinishComplete) {
- if (mRecentsAnimationWrapper == null) {
+ if (mRecentsAnimationController == null) {
if (onFinishComplete != null) {
onFinishComplete.run();
}
return;
}
- mRecentsAnimationWrapper.finish(toRecents, onFinishComplete);
+ mRecentsAnimationController.finish(toRecents, onFinishComplete);
}
public void setDisallowScrollToClearAll(boolean disallowScrollToClearAll) {
diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
index af75364..d4db05a 100644
--- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java
@@ -71,7 +71,7 @@
import com.android.launcher3.views.FloatingIconView;
import com.android.quickstep.util.MultiValueUpdateListener;
import com.android.quickstep.util.RemoteAnimationProvider;
-import com.android.quickstep.util.RemoteAnimationTargets;
+import com.android.quickstep.RemoteAnimationTargets;
import com.android.systemui.shared.system.ActivityCompat;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.QuickStepContract;
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index 132d6ab..382232c 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -32,7 +32,6 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.quickstep.util.ActivityInitListener;
-import com.android.quickstep.util.RemoteAnimationTargets;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/InputConsumer.java b/quickstep/src/com/android/quickstep/InputConsumer.java
similarity index 97%
rename from quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/InputConsumer.java
rename to quickstep/src/com/android/quickstep/InputConsumer.java
index 045bafe..62c0ded 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/InputConsumer.java
+++ b/quickstep/src/com/android/quickstep/InputConsumer.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.quickstep.inputconsumers;
+package com.android.quickstep;
import android.annotation.TargetApi;
import android.os.Build;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationCallbacks.java b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
similarity index 88%
rename from quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationCallbacks.java
rename to quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
index 824b34d..2918879 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationCallbacks.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.quickstep.util;
+package com.android.quickstep;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
@@ -25,8 +25,6 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.util.Preconditions;
-import com.android.quickstep.TouchInteractionService;
-import com.android.quickstep.RecentsAnimationWrapper;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -44,7 +42,7 @@
private final boolean mShouldMinimizeSplitScreen;
// TODO(141886704): Remove these references when they are no longer needed
- private RecentsAnimationWrapper mController;
+ private RecentsAnimationController mController;
private boolean mCancelled;
@@ -85,10 +83,10 @@
RemoteAnimationTargetCompat[] appTargets,
RemoteAnimationTargetCompat[] wallpaperTargets,
Rect homeContentInsets, Rect minimizedHomeBounds) {
- RecentsAnimationTargets targetSet = new RecentsAnimationTargets(appTargets,
+ RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets,
wallpaperTargets, homeContentInsets, minimizedHomeBounds);
- mController = new RecentsAnimationWrapper(animationController, mShouldMinimizeSplitScreen,
- this::onAnimationFinished);
+ mController = new RecentsAnimationController(animationController,
+ mShouldMinimizeSplitScreen, this::onAnimationFinished);
if (mCancelled) {
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(),
@@ -96,7 +94,7 @@
} else {
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), () -> {
for (RecentsAnimationListener listener : getListeners()) {
- listener.onRecentsAnimationStart(mController, targetSet);
+ listener.onRecentsAnimationStart(mController, targets);
}
});
}
@@ -112,7 +110,7 @@
});
}
- private final void onAnimationFinished(RecentsAnimationWrapper controller) {
+ private final void onAnimationFinished(RecentsAnimationController controller) {
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(), () -> {
for (RecentsAnimationListener listener : getListeners()) {
listener.onRecentsAnimationFinished(controller);
@@ -128,7 +126,7 @@
* Listener for the recents animation callbacks.
*/
public interface RecentsAnimationListener {
- default void onRecentsAnimationStart(RecentsAnimationWrapper controller,
+ default void onRecentsAnimationStart(RecentsAnimationController controller,
RecentsAnimationTargets targetSet) {}
/**
@@ -137,6 +135,6 @@
*/
default void onRecentsAnimationCanceled(ThumbnailData thumbnailData) {}
- default void onRecentsAnimationFinished(RecentsAnimationWrapper controller) {}
+ default void onRecentsAnimationFinished(RecentsAnimationController controller) {}
}
}
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsAnimationWrapper.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
similarity index 94%
rename from quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsAnimationWrapper.java
rename to quickstep/src/com/android/quickstep/RecentsAnimationController.java
index 72aa0e7..d938dc5 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/RecentsAnimationWrapper.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
@@ -30,12 +30,8 @@
import androidx.annotation.UiThread;
import com.android.launcher3.util.Preconditions;
-import com.android.quickstep.inputconsumers.InputConsumer;
-import com.android.quickstep.util.RecentsAnimationCallbacks;
-import com.android.quickstep.util.RecentsAnimationTargets;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.InputConsumerController;
-
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
import java.util.function.Consumer;
@@ -44,12 +40,12 @@
/**
* Wrapper around RecentsAnimationController to help with some synchronization
*/
-public class RecentsAnimationWrapper {
+public class RecentsAnimationController {
- private static final String TAG = "RecentsAnimationWrapper";
+ private static final String TAG = "RecentsAnimationController";
private final RecentsAnimationControllerCompat mController;
- private final Consumer<RecentsAnimationWrapper> mOnFinishedListener;
+ private final Consumer<RecentsAnimationController> mOnFinishedListener;
private final boolean mShouldMinimizeSplitScreen;
private boolean mWindowThresholdCrossed = false;
@@ -60,9 +56,9 @@
private boolean mTouchInProgress;
private boolean mFinishPending;
- public RecentsAnimationWrapper(RecentsAnimationControllerCompat controller,
+ public RecentsAnimationController(RecentsAnimationControllerCompat controller,
boolean shouldMinimizeSplitScreen,
- Consumer<RecentsAnimationWrapper> onFinishedListener) {
+ Consumer<RecentsAnimationController> onFinishedListener) {
mController = controller;
mOnFinishedListener = onFinishedListener;
mShouldMinimizeSplitScreen = shouldMinimizeSplitScreen;
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationTargets.java b/quickstep/src/com/android/quickstep/RecentsAnimationTargets.java
similarity index 97%
rename from quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationTargets.java
rename to quickstep/src/com/android/quickstep/RecentsAnimationTargets.java
index 4013e92..9353759 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/RecentsAnimationTargets.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationTargets.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.quickstep.util;
+package com.android.quickstep;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
diff --git a/quickstep/src/com/android/quickstep/util/RemoteAnimationTargets.java b/quickstep/src/com/android/quickstep/RemoteAnimationTargets.java
similarity index 98%
rename from quickstep/src/com/android/quickstep/util/RemoteAnimationTargets.java
rename to quickstep/src/com/android/quickstep/RemoteAnimationTargets.java
index f971c47..5fa6bc7 100644
--- a/quickstep/src/com/android/quickstep/util/RemoteAnimationTargets.java
+++ b/quickstep/src/com/android/quickstep/RemoteAnimationTargets.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.quickstep.util;
+package com.android.quickstep;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
diff --git a/quickstep/src/com/android/quickstep/util/RemoteFadeOutAnimationListener.java b/quickstep/src/com/android/quickstep/util/RemoteFadeOutAnimationListener.java
index 7f6aba9..fa2d338 100644
--- a/quickstep/src/com/android/quickstep/util/RemoteFadeOutAnimationListener.java
+++ b/quickstep/src/com/android/quickstep/util/RemoteFadeOutAnimationListener.java
@@ -21,6 +21,7 @@
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
+import com.android.quickstep.RemoteAnimationTargets;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.TransactionCompat;