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

Commit 5a69742d authored by Winson Chung's avatar Winson Chung
Browse files

Update launcher call to fetch recent tasks

- Always just fetch the tasks that will end up in recents

Bug: 152133859
Test: Manual, swipe up with pip/assistant and verify nothing
      changed
Change-Id: I41719e111cba85da7e93f65681b7b50b4c5c4a46
(cherry picked from commit 8e714d42)
parent 641fa065
Loading
Loading
Loading
Loading
+5 −13
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
        GestureState gestureState = new GestureState(mOverviewComponentObserver,
                ActiveGestureLog.INSTANCE.generateAndSetLogId());
        gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.0",
                () -> mAM.getRunningTask(0)));
                () -> mAM.getRunningTask(true /* filterOnlyVisibleRecents */)));
        return gestureState;
    }

@@ -596,18 +596,10 @@ public class TouchInteractionService extends Service implements PluginListener<O
            return createDeviceLockedInputConsumer(gestureState);
        }

        boolean forceOverviewInputConsumer = false;
        if (AssistantUtilities.isExcludedAssistant(gestureState.getRunningTask())) {
            // In the case where we are in the excluded assistant state, ignore it and treat the
            // running activity as the task behind the assistant
            gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.assistant",
                    () -> mAM.getRunningTask(ACTIVITY_TYPE_ASSISTANT /* ignoreActivityType */)));
        RunningTaskInfo runningTask = gestureState.getRunningTask();
        ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent();
            ComponentName runningComponent =
                    gestureState.getRunningTask().baseIntent.getComponent();
            forceOverviewInputConsumer =
                    runningComponent != null && runningComponent.equals(homeComponent);
        }
        boolean forceOverviewInputConsumer = runningTask != null
                && runningTask.baseIntent.getComponent().equals(homeComponent);

        if (previousGestureState.getFinishingRecentsAnimationTaskId() > 0) {
            // If the finish animation was interrupted, then continue using the other activity input