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

Commit d14721cd authored by Matt Sziklay's avatar Matt Sziklay Committed by Automerger Merge Worker
Browse files

Merge "Change onTaskInfoChanged to only use display id from task info." into...

Merge "Change onTaskInfoChanged to only use display id from task info." into tm-qpr-dev am: b8009579 am: 6f6aad0d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20872542



Change-Id: Iafce78e36e34800cc790a7b330e5cadb5fb2fe78
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 356079b8 6f6aad0d
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);
        }