From 28036435b64eb2121526078fdece18a1326eb095 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Wed, 1 Jun 2022 16:06:38 -0700 Subject: [PATCH] Refactor TaskShortcutFactory to return List of SystemShortcuts * Remove ENABLE_SPLIT_SELECT feature flag * Remove unused SystemUiProxy methods Bug: 233006032 Test: Options show up as expected Change-Id: I9b98d962db79363a20ad41faa15404f1c156b9ec --- .../quickstep/RecentsAnimationController.java | 2 - .../quickstep/SwipeUpAnimationLogic.java | 3 +- .../com/android/quickstep/SystemUiProxy.java | 34 ---- .../android/quickstep/TaskOverlayFactory.java | 75 ++------ .../quickstep/TaskShortcutFactory.java | 173 +++++++++++------- .../android/quickstep/views/RecentsView.java | 6 - .../android/quickstep/views/TaskMenuView.java | 3 +- .../quickstep/views/TaskMenuViewWithArrow.kt | 2 +- .../com/android/quickstep/views/TaskView.java | 10 +- .../launcher3/config/FeatureFlags.java | 3 - 10 files changed, 127 insertions(+), 184 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java index 2007ee1ebd..b2979730de 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java @@ -104,8 +104,6 @@ public class RecentsAnimationController { } if (mSplitScreenMinimized != splitScreenMinimized) { mSplitScreenMinimized = splitScreenMinimized; - UI_HELPER_EXECUTOR.execute(() -> SystemUiProxy.INSTANCE.get(context) - .setSplitScreenMinimized(splitScreenMinimized)); } } diff --git a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java index 966710854f..f2f2def808 100644 --- a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java +++ b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java @@ -17,7 +17,6 @@ package com.android.quickstep; import static com.android.launcher3.anim.Interpolators.ACCEL_1_5; import static com.android.launcher3.anim.Interpolators.LINEAR; -import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_SELECT; import android.animation.Animator; import android.content.Context; @@ -80,7 +79,7 @@ public abstract class SwipeUpAnimationLogic implements mDeviceState = deviceState; mGestureState = gestureState; - mIsSwipeForStagedSplit = ENABLE_SPLIT_SELECT.get() && + mIsSwipeForStagedSplit = TopTaskTracker.INSTANCE.get(context).getRunningSplitTaskIds().length > 1; mTargetGluer = new RemoteTargetGluer(mContext, mGestureState.getActivityInterface()); diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 39d8b5447d..9a2619b3df 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -270,18 +270,6 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI } } - @Override - public Rect getNonMinimizedSplitScreenSecondaryBounds() { - if (mSystemUiProxy != null) { - try { - return mSystemUiProxy.getNonMinimizedSplitScreenSecondaryBounds(); - } catch (RemoteException e) { - Log.w(TAG, "Failed call getNonMinimizedSplitScreenSecondaryBounds", e); - } - } - return null; - } - public float getLastNavButtonAlpha() { return mLastNavButtonAlpha; } @@ -384,28 +372,6 @@ public class SystemUiProxy implements ISystemUiProxy, DisplayController.DisplayI } } - @Override - public void handleImageAsScreenshot(Bitmap bitmap, Rect rect, Insets insets, int i) { - if (mSystemUiProxy != null) { - try { - mSystemUiProxy.handleImageAsScreenshot(bitmap, rect, insets, i); - } catch (RemoteException e) { - Log.w(TAG, "Failed call handleImageAsScreenshot", e); - } - } - } - - @Override - public void setSplitScreenMinimized(boolean minimized) { - if (mSystemUiProxy != null) { - try { - mSystemUiProxy.setSplitScreenMinimized(minimized); - } catch (RemoteException e) { - Log.w(TAG, "Failed call setSplitScreenMinimized", e); - } - } - } - @Override public void notifySwipeUpGestureStarted() { if (mSystemUiProxy != null) { diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java index 3ef1332a87..e10cab60e0 100644 --- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java @@ -23,7 +23,6 @@ import static com.android.quickstep.views.OverviewActionsView.DISABLED_NO_THUMBN import static com.android.quickstep.views.OverviewActionsView.DISABLED_ROTATED; import android.annotation.SuppressLint; -import android.app.ActivityManager; import android.content.Context; import android.graphics.Insets; import android.graphics.Matrix; @@ -37,17 +36,12 @@ import androidx.annotation.RequiresApi; import com.android.launcher3.BaseActivity; import com.android.launcher3.BaseDraggingActivity; -import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.popup.SystemShortcut; -import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.ResourceBasedOverride; -import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption; import com.android.launcher3.views.ActivityContext; -import com.android.quickstep.TaskShortcutFactory.SplitSelectSystemShortcut; import com.android.quickstep.util.RecentsOrientedState; import com.android.quickstep.views.OverviewActionsView; import com.android.quickstep.views.RecentsView; @@ -66,7 +60,7 @@ import java.util.List; public class TaskOverlayFactory implements ResourceBasedOverride { public static List getEnabledShortcuts(TaskView taskView, - DeviceProfile deviceProfile, TaskIdAttributeContainer taskContainer) { + TaskIdAttributeContainer taskContainer) { final ArrayList shortcuts = new ArrayList<>(); final BaseDraggingActivity activity = BaseActivity.fromContext(taskView.getContext()); boolean hasMultipleTasks = taskView.getTaskIds()[1] != -1; @@ -75,17 +69,11 @@ public class TaskOverlayFactory implements ResourceBasedOverride { continue; } - SystemShortcut shortcut = menuOption.getShortcut(activity, taskContainer); - if (shortcut == null) { + List menuShortcuts = menuOption.getShortcuts(activity, taskContainer); + if (menuShortcuts == null) { continue; } - - if (menuOption == TaskShortcutFactory.SPLIT_SCREEN && - FeatureFlags.ENABLE_SPLIT_SELECT.get()) { - addSplitOptions(shortcuts, activity, taskView, deviceProfile); - } else { - shortcuts.add(shortcut); - } + shortcuts.addAll(menuShortcuts); } RecentsOrientedState orientedState = taskView.getRecentsView().getPagedViewOrientedState(); boolean canLauncherRotate = orientedState.isRecentsActivityRotationAllowed(); @@ -94,61 +82,24 @@ public class TaskOverlayFactory implements ResourceBasedOverride { // Add overview actions to the menu when in in-place rotate landscape mode. if (!canLauncherRotate && isInLandscape) { // Add screenshot action to task menu. - SystemShortcut screenshotShortcut = TaskShortcutFactory.SCREENSHOT - .getShortcut(activity, taskContainer); - if (screenshotShortcut != null) { - shortcuts.add(screenshotShortcut); + List screenshotShortcuts = TaskShortcutFactory.SCREENSHOT + .getShortcuts(activity, taskContainer); + if (screenshotShortcuts != null) { + shortcuts.addAll(screenshotShortcuts); } // Add modal action only if display orientation is the same as the device orientation. if (orientedState.getDisplayRotation() == ROTATION_0) { - SystemShortcut modalShortcut = TaskShortcutFactory.MODAL - .getShortcut(activity, taskContainer); - if (modalShortcut != null) { - shortcuts.add(modalShortcut); + List modalShortcuts = TaskShortcutFactory.MODAL + .getShortcuts(activity, taskContainer); + if (modalShortcuts != null) { + shortcuts.addAll(modalShortcuts); } } } return shortcuts; } - - /** - * Does NOT add split options in the following scenarios: - * * The taskView to add split options is already showing split screen tasks - * * There aren't at least 2 tasks in overview to show split options for - * * Device is in "Lock task mode" - * * The taskView to show split options for is the focused task AND we haven't started - * scrolling in overview (if we haven't scrolled, there's a split overview action button so - * we don't need this menu option) - */ - private static void addSplitOptions(List outShortcuts, - BaseDraggingActivity activity, TaskView taskView, DeviceProfile deviceProfile) { - RecentsView recentsView = taskView.getRecentsView(); - PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler(); - int[] taskViewTaskIds = taskView.getTaskIds(); - boolean taskViewHasMultipleTasks = taskViewTaskIds[0] != -1 && - taskViewTaskIds[1] != -1; - boolean notEnoughTasksToSplit = recentsView.getTaskViewCount() < 2; - boolean isFocusedTask = deviceProfile.isTablet && taskView.isFocusedTask(); - boolean isTaskInExpectedScrollPosition = - recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView)); - ActivityManager activityManager = - (ActivityManager) taskView.getContext().getSystemService(Context.ACTIVITY_SERVICE); - boolean isLockTaskMode = activityManager.isInLockTaskMode(); - - if (taskViewHasMultipleTasks || notEnoughTasksToSplit || isLockTaskMode || - (isFocusedTask && isTaskInExpectedScrollPosition)) { - return; - } - - List positions = - orientationHandler.getSplitPositionOptions(deviceProfile); - for (SplitPositionOption option : positions) { - outShortcuts.add(new SplitSelectSystemShortcut(activity, taskView, option)); - } - } - public TaskOverlay createOverlay(TaskThumbnailView thumbnailView) { return new TaskOverlay(thumbnailView); } @@ -170,7 +121,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { /** Note that these will be shown in order from top to bottom, if available for the task. */ private static final TaskShortcutFactory[] MENU_OPTIONS = new TaskShortcutFactory[]{ TaskShortcutFactory.APP_INFO, - TaskShortcutFactory.SPLIT_SCREEN, + TaskShortcutFactory.SPLIT_SELECT, TaskShortcutFactory.PIN, TaskShortcutFactory.INSTALL, TaskShortcutFactory.FREE_FORM, diff --git a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java index e807e26b08..825cf2ca8f 100644 --- a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java +++ b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java @@ -16,14 +16,13 @@ package com.android.quickstep; -import static android.view.Display.DEFAULT_DISPLAY; - import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SELECTIONS; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_FREE_FORM_TAP; -import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_SPLIT_SCREEN_TAP; import android.app.Activity; +import android.app.ActivityManager; import android.app.ActivityOptions; +import android.content.Context; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Rect; @@ -32,6 +31,8 @@ import android.os.Looper; import android.view.View; import android.window.SplashScreen; +import androidx.annotation.Nullable; + import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; @@ -39,6 +40,7 @@ import com.android.launcher3.logging.StatsLogManager.LauncherEvent; import com.android.launcher3.model.WellbeingModel; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.popup.SystemShortcut.AppInfo; +import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.util.InstantAppResolver; import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption; import com.android.quickstep.views.RecentsView; @@ -55,13 +57,18 @@ import com.android.systemui.shared.system.WindowManagerWrapper; import java.util.Collections; import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; /** * Represents a system shortcut that can be shown for a recent task. */ public interface TaskShortcutFactory { - SystemShortcut getShortcut(BaseDraggingActivity activity, - TaskIdAttributeContainer taskContainer); + @Nullable + default List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + return null; + } default boolean showForSplitscreen() { return false; @@ -69,7 +76,7 @@ public interface TaskShortcutFactory { TaskShortcutFactory APP_INFO = new TaskShortcutFactory() { @Override - public SystemShortcut getShortcut(BaseDraggingActivity activity, + public List getShortcuts(BaseDraggingActivity activity, TaskIdAttributeContainer taskContainer) { TaskView taskView = taskContainer.getTaskView(); AppInfo.SplitAccessibilityInfo accessibilityInfo = @@ -77,7 +84,8 @@ public interface TaskShortcutFactory { TaskUtils.getTitle(taskView.getContext(), taskContainer.getTask()), taskContainer.getA11yNodeId() ); - return new AppInfo(activity, taskContainer.getItemInfo(), taskView, accessibilityInfo); + return Collections.singletonList(new AppInfo(activity, taskContainer.getItemInfo(), + taskView, accessibilityInfo)); } @Override @@ -103,7 +111,7 @@ public interface TaskShortcutFactory { protected abstract boolean onActivityStarted(BaseDraggingActivity activity); @Override - public SystemShortcut getShortcut(BaseDraggingActivity activity, + public List getShortcuts(BaseDraggingActivity activity, TaskIdAttributeContainer taskContainer) { final Task task = taskContainer.getTask(); if (!task.isDockable) { @@ -112,8 +120,8 @@ public interface TaskShortcutFactory { if (!isAvailable(activity, task.key.displayId)) { return null; } - return new MultiWindowSystemShortcut(mIconRes, mTextRes, activity, taskContainer, this, - mLauncherEvent); + return Collections.singletonList(new MultiWindowSystemShortcut(mIconRes, + mTextRes, activity, taskContainer, this, mLauncherEvent)); } } @@ -242,34 +250,44 @@ public interface TaskShortcutFactory { } } - /** @Deprecated */ - TaskShortcutFactory SPLIT_SCREEN = new MultiWindowFactory(R.drawable.ic_split_screen, - R.string.recent_task_option_split_screen, LAUNCHER_SYSTEM_SHORTCUT_SPLIT_SCREEN_TAP) { - + /** + * Does NOT add split options in the following scenarios: + * * The taskView to add split options is already showing split screen tasks + * * There aren't at least 2 tasks in overview to show split options for + * * Device is in "Lock task mode" + * * The taskView to show split options for is the focused task AND we haven't started + * scrolling in overview (if we haven't scrolled, there's a split overview action button so + * we don't need this menu option) + */ + TaskShortcutFactory SPLIT_SELECT = new TaskShortcutFactory() { @Override - protected boolean isAvailable(BaseDraggingActivity activity, int displayId) { - // Don't show menu-item if already in multi-window and the task is from - // the secondary display. - // TODO(b/118266305): Temporarily disable splitscreen for secondary display while new - // implementation is enabled - return !activity.getDeviceProfile().isMultiWindowMode - && (displayId == -1 || displayId == DEFAULT_DISPLAY); - } + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + DeviceProfile deviceProfile = activity.getDeviceProfile(); + TaskView taskView = taskContainer.getTaskView(); + RecentsView recentsView = taskView.getRecentsView(); + PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler(); + int[] taskViewTaskIds = taskView.getTaskIds(); + boolean taskViewHasMultipleTasks = taskViewTaskIds[0] != -1 && + taskViewTaskIds[1] != -1; + boolean notEnoughTasksToSplit = recentsView.getTaskViewCount() < 2; + boolean isFocusedTask = deviceProfile.isTablet && taskView.isFocusedTask(); + boolean isTaskInExpectedScrollPosition = + recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView)); + ActivityManager activityManager = (ActivityManager) taskView.getContext() + .getSystemService(Context.ACTIVITY_SERVICE); + boolean isLockTaskMode = activityManager.isInLockTaskMode(); - @Override - protected ActivityOptions makeLaunchOptions(Activity activity) { - final int navBarPosition = WindowManagerWrapper.getInstance().getNavBarPosition( - activity.getDisplayId()); - if (navBarPosition == WindowManagerWrapper.NAV_BAR_POS_INVALID) { + if (taskViewHasMultipleTasks || notEnoughTasksToSplit || isLockTaskMode || + (isFocusedTask && isTaskInExpectedScrollPosition)) { return null; } - boolean dockTopOrLeft = navBarPosition != WindowManagerWrapper.NAV_BAR_POS_LEFT; - return ActivityOptionsCompat.makeSplitScreenOptions(dockTopOrLeft); - } - @Override - protected boolean onActivityStarted(BaseDraggingActivity activity) { - return true; + return orientationHandler.getSplitPositionOptions(deviceProfile) + .stream() + .map((Function) option -> + new SplitSelectSystemShortcut(activity, taskView, option)) + .collect(Collectors.toList()); } }; @@ -297,18 +315,22 @@ public interface TaskShortcutFactory { } }; - TaskShortcutFactory PIN = (activity, taskContainer) -> { - if (!SystemUiProxy.INSTANCE.get(activity).isActive()) { - return null; + TaskShortcutFactory PIN = new TaskShortcutFactory() { + @Override + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + if (!SystemUiProxy.INSTANCE.get(activity).isActive()) { + return null; + } + if (!ActivityManagerWrapper.getInstance().isScreenPinningEnabled()) { + return null; + } + if (ActivityManagerWrapper.getInstance().isLockToAppActive()) { + // We shouldn't be able to pin while an app is locked. + return null; + } + return Collections.singletonList(new PinSystemShortcut(activity, taskContainer)); } - if (!ActivityManagerWrapper.getInstance().isScreenPinningEnabled()) { - return null; - } - if (ActivityManagerWrapper.getInstance().isLockToAppActive()) { - // We shouldn't be able to pin while an app is locked. - return null; - } - return new PinSystemShortcut(activity, taskContainer); }; class PinSystemShortcut extends SystemShortcut { @@ -335,26 +357,49 @@ public interface TaskShortcutFactory { } } - TaskShortcutFactory INSTALL = (activity, taskContainer) -> - InstantAppResolver.newInstance(activity).isInstantApp(activity, - taskContainer.getTask().getTopComponent().getPackageName()) - ? new SystemShortcut.Install(activity, taskContainer.getItemInfo(), - taskContainer.getTaskView()) : null; - - TaskShortcutFactory WELLBEING = (activity, taskContainer) -> - WellbeingModel.SHORTCUT_FACTORY.getShortcut(activity, taskContainer.getItemInfo(), - taskContainer.getTaskView()); - - TaskShortcutFactory SCREENSHOT = (activity, taskContainer) -> - taskContainer.getThumbnailView().getTaskOverlay() - .getScreenshotShortcut(activity, taskContainer.getItemInfo(), - taskContainer.getTaskView()); - - TaskShortcutFactory MODAL = (activity, taskContainer) -> { - if (ENABLE_OVERVIEW_SELECTIONS.get()) { - return taskContainer.getThumbnailView().getTaskOverlay().getModalStateSystemShortcut( - taskContainer.getItemInfo(), taskContainer.getTaskView()); + TaskShortcutFactory INSTALL = new TaskShortcutFactory() { + @Override + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + return InstantAppResolver.newInstance(activity).isInstantApp(activity, + taskContainer.getTask().getTopComponent().getPackageName()) ? + Collections.singletonList(new SystemShortcut.Install(activity, + taskContainer.getItemInfo(), taskContainer.getTaskView())) : + null; + } + }; + + TaskShortcutFactory WELLBEING = new TaskShortcutFactory() { + @Override + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + return Collections.singletonList( + WellbeingModel.SHORTCUT_FACTORY.getShortcut(activity, + taskContainer.getItemInfo(), taskContainer.getTaskView())); + } + }; + + TaskShortcutFactory SCREENSHOT = new TaskShortcutFactory() { + @Override + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + return Collections.singletonList( + taskContainer.getThumbnailView().getTaskOverlay() + .getScreenshotShortcut(activity, taskContainer.getItemInfo(), + taskContainer.getTaskView())); + } + }; + + TaskShortcutFactory MODAL = new TaskShortcutFactory() { + @Override + public List getShortcuts(BaseDraggingActivity activity, + TaskIdAttributeContainer taskContainer) { + if (ENABLE_OVERVIEW_SELECTIONS.get()) { + return Collections.singletonList(taskContainer.getThumbnailView().getTaskOverlay() + .getModalStateSystemShortcut( + taskContainer.getItemInfo(), taskContainer.getTaskView())); + } + return null; } - return null; }; } diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 364bd59b34..0a46121f4e 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4542,12 +4542,6 @@ public abstract class RecentsView close(true)); - TaskOverlayFactory.getEnabledShortcuts(mTaskView, mActivity.getDeviceProfile(), - taskContainer) + TaskOverlayFactory.getEnabledShortcuts(mTaskView, taskContainer) .forEach(this::addMenuOption); } diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt b/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt index 06a579300a..b586ac37b0 100644 --- a/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt +++ b/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt @@ -164,7 +164,7 @@ class TaskMenuViewWithArrow : ArrowPopup { private fun addMenuOptions() { // Add the options TaskOverlayFactory - .getEnabledShortcuts(taskView, mActivityContext.deviceProfile, taskContainer) + .getEnabledShortcuts(taskView, taskContainer) .forEach { this.addMenuOption(it) } // Add the spaces between items diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index f0ca46a472..065e9a6597 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -19,7 +19,6 @@ package com.android.quickstep.views; import static android.view.Display.DEFAULT_DISPLAY; import static android.widget.Toast.LENGTH_SHORT; -import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU; import static com.android.launcher3.Utilities.comp; import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor; import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL; @@ -67,7 +66,6 @@ import androidx.annotation.IntDef; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; @@ -726,10 +724,6 @@ public class TaskView extends FrameLayout implements Reusable { return; } - // Reset the minimized state since we force-toggled the minimized state when entering - // overview, but never actually finished the recents animation - SystemUiProxy.INSTANCE.get(getContext()).setSplitScreenMinimized(false); - mIsClickableAsLiveTile = false; RemoteAnimationTargets targets; if (remoteTargetHandles.length == 1) { @@ -1343,7 +1337,7 @@ public class TaskView extends FrameLayout implements Reusable { continue; } for (SystemShortcut s : TaskOverlayFactory.getEnabledShortcuts(this, - mActivity.getDeviceProfile(), taskContainer)) { + taskContainer)) { info.addAction(s.createAccessibilityAction(context)); } } @@ -1381,7 +1375,7 @@ public class TaskView extends FrameLayout implements Reusable { continue; } for (SystemShortcut s : TaskOverlayFactory.getEnabledShortcuts(this, - mActivity.getDeviceProfile(), taskContainer)) { + taskContainer)) { if (s.hasHandlerForAction(action)) { s.onClick(this); return true; diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index 9775b878cc..3060527edc 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -209,9 +209,6 @@ public final class FeatureFlags { "ENABLE_SCRIM_FOR_APP_LAUNCH", false, "Enables scrim during app launch animation."); - public static final BooleanFlag ENABLE_SPLIT_SELECT = getDebugFlag( - "ENABLE_SPLIT_SELECT", true, "Uses new split screen selection overview UI"); - public static final BooleanFlag ENABLE_ENFORCED_ROUNDED_CORNERS = new DeviceFlag( "ENABLE_ENFORCED_ROUNDED_CORNERS", true, "Enforce rounded corners on all App Widgets");