Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 877da039 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8055317 from d8737882 to sc-v2-release

Change-Id: If54d814c19fc8628f858a01a10e73ac5926ae4e5
parents 80e445d5 d8737882
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ 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;
@@ -54,6 +55,7 @@ import com.android.quickstep.views.TaskView;
import com.android.quickstep.views.TaskView.TaskIdAttributeContainer;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;

import java.util.ArrayList;
import java.util.List;
@@ -115,8 +117,9 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
     * 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 so
     *   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<SystemShortcut> outShortcuts,
@@ -130,7 +133,11 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
        boolean isFocusedTask = deviceProfile.overviewShowAsGrid && taskView.isFocusedTask();
        boolean isTaskInExpectedScrollPosition =
                recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView));
        if (taskViewHasMultipleTasks || notEnoughTasksToSplit ||
        ActivityManager activityManager =
                (ActivityManager) taskView.getContext().getSystemService(Context.ACTIVITY_SERVICE);
        boolean isLockTaskMode = activityManager.isInLockTaskMode();

        if (taskViewHasMultipleTasks || notEnoughTasksToSplit || isLockTaskMode ||
                (isFocusedTask && isTaskInExpectedScrollPosition)) {
            return;
        }
+3 −1
Original line number Diff line number Diff line
@@ -470,7 +470,9 @@ public class TaskView extends FrameLayout implements Reusable {
        stubInfo.user = componentKey.user;
        stubInfo.intent = new Intent().setComponent(componentKey.componentName);
        stubInfo.title = task.title;
        if (getRecentsView() != null) {
            stubInfo.screenId = getRecentsView().indexOfChild(this);
        }
        return stubInfo;
    }