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

Commit b8009579 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Change onTaskInfoChanged to only use display id from task info." into tm-qpr-dev

parents bcc89a04 a5274666
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -129,11 +129,11 @@ public class FreeformTaskListener implements ShellTaskOrganizer.TaskListener,
    @Override
    public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
        final State state = mTasks.get(taskInfo.taskId);
        state.mTaskInfo = taskInfo;

        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Freeform Task Info Changed: #%d",
                taskInfo.taskId);
        mWindowDecorationViewModel.onTaskInfoChanged(state.mTaskInfo);

        mWindowDecorationViewModel.onTaskInfoChanged(taskInfo);
        state.mTaskInfo = taskInfo;
        if (DesktopModeStatus.isAnyEnabled()) {
            mDesktopModeTaskRepository.ifPresent(repository -> {
                if (taskInfo.isVisible) {
+3 −2
Original line number Diff line number Diff line
@@ -123,10 +123,11 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener {
    public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
        final State state = mTasks.get(taskInfo.taskId);
        final Point oldPositionInParent = state.mTaskInfo.positionInParent;
        state.mTaskInfo = taskInfo;

        if (mWindowDecorViewModelOptional.isPresent()) {
            mWindowDecorViewModelOptional.get().onTaskInfoChanged(state.mTaskInfo);
            mWindowDecorViewModelOptional.get().onTaskInfoChanged(taskInfo);
        }
        state.mTaskInfo = taskInfo;
        if (Transitions.ENABLE_SHELL_TRANSITIONS) return;
        updateRecentsForVisibleFullscreenTask(taskInfo);

+3 −4
Original line number Diff line number Diff line
@@ -153,12 +153,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
    @Override
    public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
        final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(taskInfo.taskId);

        if (decoration == null) return;
        final RunningTaskInfo oldTaskInfo = decoration.mTaskInfo;

        int oldDisplayId = decoration.mDisplay.getDisplayId();
        if (taskInfo.displayId != oldDisplayId) {
            removeTaskFromEventReceiver(oldDisplayId);
        if (taskInfo.displayId != oldTaskInfo.displayId) {
            removeTaskFromEventReceiver(oldTaskInfo.displayId);
            incrementEventReceiverTasks(taskInfo.displayId);
        }