diff --git a/Android.mk b/Android.mk
index beb13c58a2..3a9a2c3ebb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -242,53 +242,7 @@ LOCAL_PROGUARD_ENABLED := full
LOCAL_PACKAGE_NAME := Launcher3QuickStepGo
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep Launcher3GoIconRecents
-LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := \
- $(LOCAL_PATH)/go/AndroidManifest.xml \
- $(LOCAL_PATH)/quickstep/AndroidManifest-launcher.xml \
- $(LOCAL_PATH)/AndroidManifest-common.xml
-
-LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
-include $(BUILD_PACKAGE)
-
-#
-# Build rule for Launcher3 Go app with quickstep and Go-specific
-# version of recents for Android Go devices.
-#
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STATIC_JAVA_LIBRARIES := SystemUISharedLibLauncherWrapper launcherprotosnano
-ifneq (,$(wildcard frameworks/base))
- LOCAL_PRIVATE_PLATFORM_APIS := true
-else
- LOCAL_SDK_VERSION := system_current
- LOCAL_MIN_SDK_VERSION := 26
-endif
-LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-java-files-under, quickstep/src) \
- $(call all-java-files-under, go/src) \
- $(call all-java-files-under, go/quickstep/src)
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/quickstep/res \
- $(LOCAL_PATH)/go/res \
- $(LOCAL_PATH)/go/quickstep/res
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_PROGUARD_ENABLED := full
-
-LOCAL_PACKAGE_NAME := Launcher3GoIconRecents
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3Go Launcher3QuickStep
+LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
LOCAL_FULL_LIBS_MANIFEST_FILES := \
diff --git a/go/quickstep/res/drawable/clear_all_button.xml b/go/quickstep/res/drawable/clear_all_button.xml
deleted file mode 100644
index acac32de5e..0000000000
--- a/go/quickstep/res/drawable/clear_all_button.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
diff --git a/go/quickstep/res/drawable/default_thumbnail.xml b/go/quickstep/res/drawable/default_thumbnail.xml
deleted file mode 100644
index ab22dcf827..0000000000
--- a/go/quickstep/res/drawable/default_thumbnail.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
diff --git a/go/quickstep/res/drawable/empty_content_box.xml b/go/quickstep/res/drawable/empty_content_box.xml
deleted file mode 100644
index a4883889fe..0000000000
--- a/go/quickstep/res/drawable/empty_content_box.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/go/quickstep/res/layout/clear_all_button.xml b/go/quickstep/res/layout/clear_all_button.xml
deleted file mode 100644
index eef66add45..0000000000
--- a/go/quickstep/res/layout/clear_all_button.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
diff --git a/go/quickstep/res/layout/fallback_recents_activity.xml b/go/quickstep/res/layout/fallback_recents_activity.xml
deleted file mode 100644
index 653f463c91..0000000000
--- a/go/quickstep/res/layout/fallback_recents_activity.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
diff --git a/go/quickstep/res/layout/icon_recents_root_view.xml b/go/quickstep/res/layout/icon_recents_root_view.xml
deleted file mode 100644
index 8381ebc631..0000000000
--- a/go/quickstep/res/layout/icon_recents_root_view.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/go/quickstep/res/layout/overview_panel.xml b/go/quickstep/res/layout/overview_panel.xml
deleted file mode 100644
index 601edceb5d..0000000000
--- a/go/quickstep/res/layout/overview_panel.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
diff --git a/go/quickstep/res/layout/task_item_view.xml b/go/quickstep/res/layout/task_item_view.xml
deleted file mode 100644
index aeac47786a..0000000000
--- a/go/quickstep/res/layout/task_item_view.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/go/quickstep/res/values-sw480dp/dimens.xml b/go/quickstep/res/values-sw480dp/dimens.xml
deleted file mode 100644
index 571b8a1b84..0000000000
--- a/go/quickstep/res/values-sw480dp/dimens.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- 480dp
-
- 90dp
- 24dp
- 24dp
-
- 4dp
-
- 52dp
- 28dp
- 28dp
- 160dp
-
\ No newline at end of file
diff --git a/go/quickstep/res/values/colors.xml b/go/quickstep/res/values/colors.xml
deleted file mode 100644
index ff9dc9c61a..0000000000
--- a/go/quickstep/res/values/colors.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- #FFDADCE0
- #FF5F6368
-
diff --git a/go/quickstep/res/values/dimens.xml b/go/quickstep/res/values/dimens.xml
deleted file mode 100644
index 91040f205f..0000000000
--- a/go/quickstep/res/values/dimens.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- 320dp
-
- 60dp
- 16dp
- 16dp
-
- 3dp
-
- 36dp
- 20dp
- 20dp
- 106dp
-
\ No newline at end of file
diff --git a/go/quickstep/res/values/override.xml b/go/quickstep/res/values/override.xml
deleted file mode 100644
index bb267a3920..0000000000
--- a/go/quickstep/res/values/override.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
- com.android.launcher3.GoLauncherAppTransitionManagerImpl
-
- com.android.quickstep.InstantAppResolverImpl
-
- com.android.quickstep.QuickstepProcessInitializer
-
- com.android.quickstep.logging.UserEventDispatcherExtension
-
-
diff --git a/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java b/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java
deleted file mode 100644
index 3953fd0279..0000000000
--- a/go/quickstep/src/com/android/launcher3/GoLauncherAppTransitionManagerImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.android.launcher3;
-
-import static com.android.launcher3.Utilities.postAsyncCallback;
-import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
-import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
-import static com.android.quickstep.views.IconRecentsView.CONTENT_ALPHA;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
-
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
-import android.content.Context;
-import android.os.Handler;
-import android.view.View;
-
-import com.android.quickstep.views.IconRecentsView;
-import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
-import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
-
-/**
- * A {@link QuickstepAppTransitionManagerImpl} with recents-specific app transitions based off
- * {@link com.android.quickstep.views.IconRecentsView}.
- */
-public final class GoLauncherAppTransitionManagerImpl extends QuickstepAppTransitionManagerImpl {
-
- public GoLauncherAppTransitionManagerImpl(Context context) {
- super(context);
- }
-
- @Override
- protected boolean isLaunchingFromRecents(View v, RemoteAnimationTargetCompat[] targets) {
- return mLauncher.getStateManager().getState().overviewUi;
- }
-
- @Override
- RemoteAnimationRunnerCompat getWallpaperOpenRunner(boolean fromUnlock) {
- return new GoWallpaperOpenLauncherAnimationRunner(mHandler,
- false /* startAtFrontOfQueue */, fromUnlock);
- }
-
- @Override
- protected void composeRecentsLaunchAnimator(AnimatorSet anim, View v,
- RemoteAnimationTargetCompat[] appTargets,
- RemoteAnimationTargetCompat[] wallpaperTargets,
- boolean launcherClosing) {
- // Stubbed. Recents launch animation will come from the recents view itself and will not
- // use remote animations.
- }
-
- @Override
- protected Runnable composeViewContentAnimator(AnimatorSet anim, float[] alphas, float[] trans) {
- IconRecentsView overview = mLauncher.getOverviewPanel();
- ObjectAnimator alpha = ObjectAnimator.ofFloat(overview,
- CONTENT_ALPHA, alphas);
- alpha.setDuration(CONTENT_ALPHA_DURATION);
- alpha.setInterpolator(LINEAR);
- anim.play(alpha);
-
- ObjectAnimator transY = ObjectAnimator.ofFloat(overview, View.TRANSLATION_Y, trans);
- transY.setInterpolator(AGGRESSIVE_EASE);
- transY.setDuration(CONTENT_TRANSLATION_DURATION);
- anim.play(transY);
-
- return mLauncher.getStateManager()::reapplyState;
- }
-
- /**
- * Remote animation runner for animation from app to Launcher. For Go, when going to recents,
- * we need to ensure that the recents view is ready for remote animation before starting.
- */
- private final class GoWallpaperOpenLauncherAnimationRunner extends
- WallpaperOpenLauncherAnimationRunner {
- public GoWallpaperOpenLauncherAnimationRunner(Handler handler, boolean startAtFrontOfQueue,
- boolean fromUnlock) {
- super(handler, startAtFrontOfQueue, fromUnlock);
- }
-
- @Override
- public void onCreateAnimation(RemoteAnimationTargetCompat[] appTargets,
- RemoteAnimationTargetCompat[] wallpaperTargets,
- AnimationResult result) {
- boolean isGoingToRecents =
- taskIsATargetWithMode(appTargets, mLauncher.getTaskId(), MODE_OPENING)
- && (mLauncher.getStateManager().getState() == LauncherState.OVERVIEW);
- if (isGoingToRecents) {
- IconRecentsView recentsView = mLauncher.getOverviewPanel();
- if (!recentsView.isReadyForRemoteAnim()) {
- recentsView.setOnReadyForRemoteAnimCallback(() ->
- postAsyncCallback(mHandler, () -> onCreateAnimation(appTargets,
- wallpaperTargets, result))
- );
- return;
- }
- }
- super.onCreateAnimation(appTargets, wallpaperTargets, result);
- }
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/LauncherRecentsToActivityHelper.java b/go/quickstep/src/com/android/launcher3/LauncherRecentsToActivityHelper.java
deleted file mode 100644
index c12da946f8..0000000000
--- a/go/quickstep/src/com/android/launcher3/LauncherRecentsToActivityHelper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3;
-
-import static com.android.launcher3.LauncherState.NORMAL;
-
-import com.android.quickstep.RecentsToActivityHelper;
-
-/**
- * {@link RecentsToActivityHelper} for when the recents implementation is contained in
- * {@link Launcher}.
- */
-public final class LauncherRecentsToActivityHelper implements RecentsToActivityHelper {
-
- private final Launcher mLauncher;
-
- public LauncherRecentsToActivityHelper(Launcher launcher) {
- mLauncher = launcher;
- }
-
- @Override
- public void leaveRecents() {
- mLauncher.getStateManager().goToState(NORMAL);
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/go/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
deleted file mode 100644
index 0c60468eef..0000000000
--- a/go/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3.uioverrides;
-
-import com.android.launcher3.BaseQuickstepLauncher;
-import com.android.launcher3.uioverrides.touchcontrollers.LandscapeEdgeSwipeController;
-import com.android.launcher3.uioverrides.touchcontrollers.LandscapeStatesTouchController;
-import com.android.launcher3.uioverrides.touchcontrollers.PortraitStatesTouchController;
-import com.android.launcher3.util.TouchController;
-import com.android.quickstep.SysUINavigationMode;
-
-import java.util.ArrayList;
-
-public class QuickstepLauncher extends BaseQuickstepLauncher {
-
- public static final boolean GO_LOW_RAM_RECENTS_ENABLED = true;
-
- @Override
- public TouchController[] createTouchControllers() {
- ArrayList list = new ArrayList<>();
- list.add(getDragController());
-
- if (getDeviceProfile().isVerticalBarLayout()) {
- list.add(new LandscapeStatesTouchController(this));
- list.add(new LandscapeEdgeSwipeController(this));
- } else {
- boolean allowDragToOverview = SysUINavigationMode.INSTANCE.get(this)
- .getMode().hasGestures;
- list.add(new PortraitStatesTouchController(this, allowDragToOverview));
- }
- return list.toArray(new TouchController[list.size()]);
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
deleted file mode 100644
index 0b12ab052e..0000000000
--- a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3.uioverrides;
-
-import static com.android.quickstep.views.IconRecentsView.CONTENT_ALPHA;
-
-import android.util.FloatProperty;
-
-import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherRecentsToActivityHelper;
-import com.android.quickstep.views.IconRecentsView;
-
-import androidx.annotation.NonNull;
-
-/**
- * State handler for Go's {@link IconRecentsView}.
- */
-public final class RecentsViewStateController extends
- BaseRecentsViewStateController {
-
- public RecentsViewStateController(@NonNull Launcher launcher) {
- super(launcher);
- launcher.getOverviewPanel().setRecentsToActivityHelper(
- new LauncherRecentsToActivityHelper(launcher));
- }
-
- @Override
- FloatProperty getContentAlphaProperty() {
- return CONTENT_ALPHA;
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
deleted file mode 100644
index 212ce9bef6..0000000000
--- a/go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3.uioverrides.states;
-
-import static android.view.View.VISIBLE;
-
-import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
-import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_FADE;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_SCALE;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_OVERVIEW_TRANSLATE_X;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_FADE;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_SCALE;
-import static com.android.launcher3.anim.AnimatorSetBuilder.ANIM_WORKSPACE_TRANSLATE;
-import static com.android.launcher3.anim.Interpolators.ACCEL;
-import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
-import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2;
-import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7;
-import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;
-
-import android.content.Context;
-import android.view.View;
-
-import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherState;
-import com.android.launcher3.R;
-import com.android.launcher3.anim.AnimatorSetBuilder;
-import com.android.launcher3.userevent.nano.LauncherLogProto;
-import com.android.quickstep.SysUINavigationMode;
-import com.android.quickstep.views.IconRecentsView;
-
-/**
- * Definition for overview state
- */
-public class OverviewState extends LauncherState {
-
- // Scale recents takes before animating in
- private static final float RECENTS_PREPARE_SCALE = 1.33f;
-
- private static final int STATE_FLAGS = FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED
- | FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_DISABLE_ACCESSIBILITY;
-
- public OverviewState(int id) {
- this(id, OVERVIEW_TRANSITION_MS, STATE_FLAGS);
- }
-
- protected OverviewState(int id, int transitionDuration, int stateFlags) {
- super(id, LauncherLogProto.ContainerType.TASKSWITCHER, transitionDuration, stateFlags);
- }
-
- @Override
- public ScaleAndTranslation getOverviewScaleAndTranslation(Launcher launcher) {
- return new ScaleAndTranslation(1f, 0f, 0f);
- }
-
- @Override
- public void onStateEnabled(Launcher launcher) {
- IconRecentsView recentsView = launcher.getOverviewPanel();
- recentsView.onBeginTransitionToOverview();
- recentsView.setShowStatusBarForegroundScrim(true);
- // Request orientation be set to unspecified, letting the system decide the best
- // orientation.
- launcher.getRotationHelper().setCurrentStateRequest(REQUEST_ROTATE);
- }
-
- @Override
- public void onStateDisabled(Launcher launcher) {
- IconRecentsView recentsView = launcher.getOverviewPanel();
- recentsView.setShowStatusBarForegroundScrim(false);
- }
-
- @Override
- public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) {
- return new PageAlphaProvider(DEACCEL_2) {
- @Override
- public float getPageAlpha(int pageIndex) {
- return 0;
- }
- };
- }
-
- @Override
- public int getVisibleElements(Launcher launcher) {
- return NONE;
- }
-
- @Override
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 0.5f;
- }
-
- @Override
- public String getDescription(Launcher launcher) {
- return launcher.getString(R.string.accessibility_desc_recent_apps);
- }
-
- @Override
- public void onBackPressed(Launcher launcher) {
- // TODO: Add logic to go back to task if coming from a currently running task.
- super.onBackPressed(launcher);
- }
-
- public static float getDefaultSwipeHeight(Launcher launcher) {
- return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile());
- }
-
- public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) {
- return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
- }
-
- @Override
- public void prepareForAtomicAnimation(Launcher launcher, LauncherState fromState,
- AnimatorSetBuilder builder) {
- if (fromState == NORMAL && this == OVERVIEW) {
- if (SysUINavigationMode.getMode(launcher) == SysUINavigationMode.Mode.NO_BUTTON) {
- builder.setInterpolator(ANIM_WORKSPACE_SCALE, ACCEL);
- builder.setInterpolator(ANIM_WORKSPACE_TRANSLATE, ACCEL);
- } else {
- builder.setInterpolator(ANIM_WORKSPACE_SCALE, OVERSHOOT_1_2);
- }
- builder.setInterpolator(ANIM_WORKSPACE_FADE, OVERSHOOT_1_2);
- builder.setInterpolator(ANIM_OVERVIEW_SCALE, OVERSHOOT_1_2);
- builder.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, OVERSHOOT_1_7);
- builder.setInterpolator(ANIM_OVERVIEW_FADE, OVERSHOOT_1_2);
-
- View overview = launcher.getOverviewPanel();
- if (overview.getVisibility() != VISIBLE) {
- SCALE_PROPERTY.set(overview, RECENTS_PREPARE_SCALE);
- }
- }
- }
-
- public static OverviewState newBackgroundState(int id) {
- return new OverviewState(id);
- }
-
- public static OverviewState newPeekState(int id) {
- return new OverviewState(id);
- }
-
- public static OverviewState newSwitchState(int id) {
- return new OverviewState(id);
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeStatesTouchController.java b/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeStatesTouchController.java
deleted file mode 100644
index 66aec40509..0000000000
--- a/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/LandscapeStatesTouchController.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3.uioverrides.touchcontrollers;
-
-import static com.android.launcher3.LauncherState.ALL_APPS;
-import static com.android.launcher3.LauncherState.NORMAL;
-
-import android.view.MotionEvent;
-
-import com.android.launcher3.AbstractFloatingView;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherState;
-import com.android.launcher3.userevent.nano.LauncherLogProto;
-
-/**
- * Touch controller for landscape mode.
- */
-public final class LandscapeStatesTouchController extends PortraitStatesTouchController {
-
- public LandscapeStatesTouchController(Launcher l) {
- super(l, true /* allowDragToOverview */);
- }
-
- @Override
- protected boolean canInterceptTouch(MotionEvent ev) {
- if (mCurrentAnimation != null) {
- // If we are already animating from a previous state, we can intercept.
- return true;
- }
- if (AbstractFloatingView.getTopOpenView(mLauncher) != null) {
- return false;
- }
- if (mLauncher.isInState(ALL_APPS)) {
- // In all-apps only listen if the container cannot scroll itself
- return mLauncher.getAppsView().shouldContainerScroll(ev);
- } else if (mLauncher.isInState(NORMAL)) {
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) {
- if (fromState == ALL_APPS && !isDragTowardPositive) {
- return NORMAL;
- } else if (isDragTowardPositive) {
- return ALL_APPS;
- }
- return fromState;
- }
-
- @Override
- protected int getLogContainerTypeForNormalState(MotionEvent ev) {
- return LauncherLogProto.ContainerType.WORKSPACE;
- }
-}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java b/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
deleted file mode 100644
index 011a4e75bd..0000000000
--- a/go/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3.uioverrides.touchcontrollers;
-
-import android.view.MotionEvent;
-
-import com.android.launcher3.Launcher;
-import com.android.launcher3.util.PendingAnimation;
-
-/**
- * Helper class for {@link PortraitStatesTouchController} that determines swipeable regions and
- * animations on the overview state that depend on the recents implementation.
- */
-public final class PortraitOverviewStateTouchHelper {
-
- public PortraitOverviewStateTouchHelper(Launcher launcher) {}
-
- /**
- * Whether or not {@link PortraitStatesTouchController} should intercept the touch when on the
- * overview state.
- *
- * @param ev the motion event
- * @return true if we should intercept the motion event
- */
- boolean canInterceptTouch(MotionEvent ev) {
- // Go does not support swiping to all-apps from recents.
- return false;
- }
-
- /**
- * Whether or not swiping down to leave overview state should return to the currently running
- * task app.
- *
- * @return true if going back should take the user to the currently running task
- */
- boolean shouldSwipeDownReturnToApp() {
- // Go does not support swiping tasks down to launch tasks from recents.
- return false;
- }
-
- /**
- * Create the animation for going from overview to the task app via swiping.
- *
- * @param duration how long the animation should be
- * @return the animation
- */
- PendingAnimation createSwipeDownToTaskAppAnimation(long duration) {
- // Go does not support swiping tasks down to launch tasks from recents.
- return null;
- }
-}
diff --git a/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
deleted file mode 100644
index 04753d2527..0000000000
--- a/go/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.quickstep;
-
-import static com.android.launcher3.Utilities.postAsyncCallback;
-import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
-import static com.android.quickstep.views.IconRecentsView.REMOTE_APP_TO_OVERVIEW_DURATION;
-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.animation.AnimatorSet;
-import android.animation.ValueAnimator;
-import android.app.ActivityOptions;
-import android.content.Context;
-import android.os.Handler;
-import android.util.Log;
-
-import com.android.launcher3.BaseDraggingActivity;
-import com.android.launcher3.LauncherAnimationRunner;
-import com.android.quickstep.util.RemoteAnimationProvider;
-import com.android.quickstep.views.IconRecentsView;
-import com.android.systemui.shared.system.ActivityOptionsCompat;
-import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
-import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
-
-/**
- * Provider for the atomic remote window animation from the app to the overview.
- *
- * @param activity that contains the overview
- */
-final class AppToOverviewAnimationProvider implements
- RemoteAnimationProvider {
- private static final String TAG = "AppToOverviewAnimationProvider";
-
- private final BaseActivityInterface mActivityInterface;
- private final int mTargetTaskId;
- private IconRecentsView mRecentsView;
- private AppToOverviewAnimationListener mAnimationReadyListener;
-
- AppToOverviewAnimationProvider(BaseActivityInterface activityInterface, int targetTaskId) {
- mActivityInterface = activityInterface;
- mTargetTaskId = targetTaskId;
- }
-
- /**
- * Set listener to various points in the animation preparing to animate.
- *
- * @param listener listener
- */
- void setAnimationListener(AppToOverviewAnimationListener listener) {
- mAnimationReadyListener = listener;
- }
-
- /**
- * Callback for when the activity is ready/initialized.
- *
- * @param wasVisible true if it was visible before
- */
- boolean onActivityReady(Boolean wasVisible) {
- T activity = mActivityInterface.getCreatedActivity();
- if (mAnimationReadyListener != null) {
- mAnimationReadyListener.onActivityReady(activity);
- }
- BaseActivityInterface.AnimationFactory factory =
- mActivityInterface.prepareRecentsUI(wasVisible,
- false /* animate activity */, (controller) -> {
- controller.dispatchOnStart();
- ValueAnimator anim = controller.getAnimationPlayer()
- .setDuration(getRecentsLaunchDuration());
- anim.setInterpolator(FAST_OUT_SLOW_IN);
- anim.start();
- });
- factory.onRemoteAnimationReceived(null);
- factory.createActivityInterface(getRecentsLaunchDuration());
- mRecentsView = activity.getOverviewPanel();
- return false;
- }
-
- /**
- * Create remote window animation from the currently running app to the overview panel. Should
- * be called after {@link #onActivityReady}.
- *
- * @param appTargets the target apps
- * @return animation from app to overview
- */
- @Override
- public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
- RemoteAnimationTargetCompat[] wallpaperTargets) {
- if (mAnimationReadyListener != null) {
- mAnimationReadyListener.onWindowAnimationCreated();
- }
- AnimatorSet anim = new AnimatorSet();
- if (mRecentsView == null) {
- if (Log.isLoggable(TAG, Log.WARN)) {
- Log.w(TAG, "No recents view. Using stub animation.");
- }
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(getRecentsLaunchDuration()));
- return anim;
- }
-
- RemoteAnimationTargets targets =
- new RemoteAnimationTargets(appTargets, wallpaperTargets, MODE_CLOSING);
- mRecentsView.setTransitionedFromApp(!targets.isAnimatingHome());
-
- RemoteAnimationTargetCompat recentsTarget = null;
- RemoteAnimationTargetCompat closingAppTarget = null;
-
- for (RemoteAnimationTargetCompat target : appTargets) {
- if (target.mode == MODE_OPENING) {
- recentsTarget = target;
- } else if (target.mode == MODE_CLOSING && target.taskId == mTargetTaskId) {
- closingAppTarget = target;
- }
- }
-
- if (closingAppTarget == null) {
- if (Log.isLoggable(TAG, Log.WARN)) {
- Log.w(TAG, "No closing app target. Using stub animation.");
- }
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(getRecentsLaunchDuration()));
- return anim;
- }
- if (recentsTarget == null) {
- if (Log.isLoggable(TAG, Log.WARN)) {
- Log.w(TAG, "No recents target. Using stub animation.");
- }
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(getRecentsLaunchDuration()));
- return anim;
- }
-
- if (closingAppTarget.activityType == ACTIVITY_TYPE_HOME) {
- mRecentsView.playRemoteHomeToRecentsAnimation(anim, closingAppTarget, recentsTarget);
- } else {
- mRecentsView.playRemoteAppToRecentsAnimation(anim, closingAppTarget, recentsTarget);
- }
-
- return anim;
- }
-
- @Override
- public ActivityOptions toActivityOptions(Handler handler, long duration, Context context) {
- LauncherAnimationRunner runner = new LauncherAnimationRunner(handler,
- false /* startAtFrontOfQueue */) {
-
- @Override
- public void onCreateAnimation(RemoteAnimationTargetCompat[] appTargets,
- RemoteAnimationTargetCompat[] wallpaperTargets,
- AnimationResult result) {
- IconRecentsView recentsView = mRecentsView;
- if (!recentsView.isReadyForRemoteAnim()) {
- recentsView.setOnReadyForRemoteAnimCallback(() -> postAsyncCallback(handler,
- () -> onCreateAnimation(appTargets, wallpaperTargets, result))
- );
- return;
- }
- result.setAnimation(createWindowAnimation(appTargets, wallpaperTargets), context);
- }
- };
- return ActivityOptionsCompat.makeRemoteAnimation(
- new RemoteAnimationAdapterCompat(runner, duration,
- 0 /* statusBarTransitionDelay */));
- }
-
- /**
- * Get duration of animation from app to overview.
- *
- * @return duration of animation
- */
- long getRecentsLaunchDuration() {
- return REMOTE_APP_TO_OVERVIEW_DURATION;
- }
-
- /**
- * Listener for various points in the app to overview animation preparing to animate.
- */
- interface AppToOverviewAnimationListener {
- /**
- * Logic for when activity we're animating to is ready
- *
- * @param activity activity to animate to
- */
- void onActivityReady(BaseDraggingActivity activity);
-
- /**
- * Logic for when we've created the app to recents animation.
- */
- void onWindowAnimationCreated();
- }
-}
diff --git a/go/quickstep/src/com/android/quickstep/ClearAllHolder.java b/go/quickstep/src/com/android/quickstep/ClearAllHolder.java
deleted file mode 100644
index ce87171f4b..0000000000
--- a/go/quickstep/src/com/android/quickstep/ClearAllHolder.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.quickstep;
-
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView.ViewHolder;
-
-/**
- * Holder for clear all button view in task recycler view.
- */
-final class ClearAllHolder extends ViewHolder {
- public ClearAllHolder(@NonNull View itemView) {
- super(itemView);
- }
-}
diff --git a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java
deleted file mode 100644
index 808cd7217a..0000000000
--- a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.quickstep;
-
-import static android.view.View.ALPHA;
-
-import static com.android.quickstep.TaskAdapter.CHANGE_EVENT_TYPE_EMPTY_TO_CONTENT;
-import static com.android.quickstep.views.TaskItemView.CONTENT_TRANSITION_PROGRESS;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ObjectAnimator;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView.ViewHolder;
-import androidx.recyclerview.widget.SimpleItemAnimator;
-
-import com.android.quickstep.views.TaskItemView;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * An item animator that is only set and used for the transition from the empty loading UI to
- * the filled task content UI. The animation starts from the bottom to top, changing all valid
- * empty item views to be filled and removing all extra empty views.
- */
-public final class ContentFillItemAnimator extends SimpleItemAnimator {
-
- private static final class PendingAnimation {
- ViewHolder viewHolder;
- int animType;
-
- PendingAnimation(ViewHolder vh, int type) {
- viewHolder = vh;
- animType = type;
- }
- }
-
- private static final int ANIM_TYPE_REMOVE = 0;
- private static final int ANIM_TYPE_CHANGE = 1;
-
- private static final int ITEM_BETWEEN_DELAY = 40;
- private static final int ITEM_CHANGE_DURATION = 150;
- private static final int ITEM_REMOVE_DURATION = 150;
-
- /**
- * Animations that have been registered to occur together at the next call of
- * {@link #runPendingAnimations()} but have not started.
- */
- private final ArrayList mPendingAnims = new ArrayList<>();
-
- /**
- * Animations that have started and are running.
- */
- private final ArrayList mRunningAnims = new ArrayList<>();
-
- private Runnable mOnFinishRunnable;
-
- /**
- * Set runnable to run after the content fill animation is fully completed.
- *
- * @param runnable runnable to run on end
- */
- public void setOnAnimationFinishedRunnable(Runnable runnable) {
- mOnFinishRunnable = runnable;
- }
-
- @Override
- public void setChangeDuration(long changeDuration) {
- throw new UnsupportedOperationException("Cascading item animator cannot have animation "
- + "duration changed.");
- }
-
- @Override
- public void setRemoveDuration(long removeDuration) {
- throw new UnsupportedOperationException("Cascading item animator cannot have animation "
- + "duration changed.");
- }
-
- @Override
- public boolean animateRemove(ViewHolder holder) {
- PendingAnimation pendAnim = new PendingAnimation(holder, ANIM_TYPE_REMOVE);
- mPendingAnims.add(pendAnim);
- return true;
- }
-
- private void animateRemoveImpl(ViewHolder holder, long startDelay) {
- final View view = holder.itemView;
- if (holder.itemView.getAlpha() == 0) {
- // View is already visually removed. We can just get rid of it now.
- view.setAlpha(1.0f);
- dispatchRemoveFinished(holder);
- dispatchFinishedWhenDone();
- return;
- }
- final ObjectAnimator anim = ObjectAnimator.ofFloat(
- holder.itemView, ALPHA, holder.itemView.getAlpha(), 0.0f);
- anim.setDuration(ITEM_REMOVE_DURATION).setStartDelay(startDelay);
- anim.addListener(
- new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- dispatchRemoveStarting(holder);
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- view.setAlpha(1);
- dispatchRemoveFinished(holder);
- mRunningAnims.remove(anim);
- dispatchFinishedWhenDone();
- }
- }
- );
- anim.start();
- mRunningAnims.add(anim);
- }
-
- @Override
- public boolean animateAdd(ViewHolder holder) {
- dispatchAddFinished(holder);
- return false;
- }
-
- @Override
- public boolean animateMove(ViewHolder holder, int fromX, int fromY, int toX,
- int toY) {
- dispatchMoveFinished(holder);
- return false;
- }
-
- @Override
- public boolean animateChange(ViewHolder oldHolder,
- ViewHolder newHolder, int fromLeft, int fromTop, int toLeft, int toTop) {
- // Only support changes where the holders are the same
- if (oldHolder == newHolder) {
- PendingAnimation pendAnim = new PendingAnimation(oldHolder, ANIM_TYPE_CHANGE);
- mPendingAnims.add(pendAnim);
- return true;
- }
- dispatchChangeFinished(oldHolder, true /* oldItem */);
- dispatchChangeFinished(newHolder, false /* oldItem */);
- return false;
- }
-
- private void animateChangeImpl(ViewHolder viewHolder, long startDelay) {
- TaskItemView itemView = (TaskItemView) viewHolder.itemView;
- if (itemView.getAlpha() == 0) {
- // View is still not visible, so we can finish the change immediately.
- CONTENT_TRANSITION_PROGRESS.set(itemView, 1.0f);
- dispatchChangeFinished(viewHolder, true /* oldItem */);
- dispatchFinishedWhenDone();
- return;
- }
- final ObjectAnimator anim =
- ObjectAnimator.ofFloat(itemView, CONTENT_TRANSITION_PROGRESS, 0.0f, 1.0f);
- anim.setDuration(ITEM_CHANGE_DURATION).setStartDelay(startDelay);
- anim.addListener(
- new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- dispatchChangeStarting(viewHolder, true /* oldItem */);
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- CONTENT_TRANSITION_PROGRESS.set(itemView, 1.0f);
- dispatchChangeFinished(viewHolder, true /* oldItem */);
- mRunningAnims.remove(anim);
- dispatchFinishedWhenDone();
- }
- }
- );
- anim.start();
- mRunningAnims.add(anim);
- }
-
- @Override
- public void runPendingAnimations() {
- // Run animations bottom to top.
- mPendingAnims.sort(Comparator.comparingInt(o -> -o.viewHolder.itemView.getBottom()));
- int delay = 0;
- while (!mPendingAnims.isEmpty()) {
- PendingAnimation curAnim = mPendingAnims.remove(0);
- ViewHolder vh = curAnim.viewHolder;
- switch (curAnim.animType) {
- case ANIM_TYPE_REMOVE:
- animateRemoveImpl(vh, delay);
- break;
- case ANIM_TYPE_CHANGE:
- animateChangeImpl(vh, delay);
- break;
- default:
- break;
- }
- delay += ITEM_BETWEEN_DELAY;
- }
- }
-
- @Override
- public void endAnimation(@NonNull ViewHolder item) {
- for (int i = mPendingAnims.size() - 1; i >= 0; i--) {
- endPendingAnimation(mPendingAnims.get(i));
- mPendingAnims.remove(i);
- }
- dispatchFinishedWhenDone();
- }
-
- @Override
- public void endAnimations() {
- if (!isRunning()) {
- return;
- }
- for (int i = mPendingAnims.size() - 1; i >= 0; i--) {
- endPendingAnimation(mPendingAnims.get(i));
- mPendingAnims.remove(i);
- }
- for (int i = mRunningAnims.size() - 1; i >= 0; i--) {
- ObjectAnimator anim = mRunningAnims.get(i);
- // This calls the on end animation callback which will set values to their end target.
- anim.cancel();
- }
- dispatchFinishedWhenDone();
- }
-
- private void endPendingAnimation(PendingAnimation pendAnim) {
- ViewHolder item = pendAnim.viewHolder;
- switch (pendAnim.animType) {
- case ANIM_TYPE_REMOVE:
- item.itemView.setAlpha(1.0f);
- dispatchRemoveFinished(item);
- break;
- case ANIM_TYPE_CHANGE:
- CONTENT_TRANSITION_PROGRESS.set(item.itemView, 1.0f);
- dispatchChangeFinished(item, true /* oldItem */);
- break;
- default:
- break;
- }
- }
-
- @Override
- public boolean isRunning() {
- return !mPendingAnims.isEmpty() || !mRunningAnims.isEmpty();
- }
-
- @Override
- public boolean canReuseUpdatedViewHolder(@NonNull ViewHolder viewHolder,
- @NonNull List