From 5ee83f3b5e26c32254fb02866c320ce54b41c474 Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Mon, 6 Jun 2022 12:58:45 +0800 Subject: [PATCH] Show split option without consider the "Lock task mode" wm-core supports split-screen and lock-task mode work together now. This CL enables the split-option to allow users to enjoy the split-screen experience. Bug: 199342537 Test: Options show up as expected Change-Id: I38f58dec2985eaaabdbed1fdeeeece2d6e59945f --- .../src/com/android/quickstep/TaskShortcutFactory.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java index 825cf2ca8f..6e3f8d9aeb 100644 --- a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java +++ b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java @@ -20,9 +20,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SELECTIO import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_FREE_FORM_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; @@ -254,7 +252,6 @@ public interface TaskShortcutFactory { * 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) @@ -274,12 +271,9 @@ public interface TaskShortcutFactory { 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)) { + if (taskViewHasMultipleTasks || notEnoughTasksToSplit + || (isFocusedTask && isTaskInExpectedScrollPosition)) { return null; }