Loading libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/LegacySplitScreenTaskListener.java +15 −3 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { private final SyncTransactionQueue mSyncQueue; private final SparseArray<SurfaceControl> mLeashByTaskId = new SparseArray<>(); // TODO(shell-transitions): Remove when switched to shell-transitions. private final SparseArray<Point> mPositionByTaskId = new SparseArray<>(); RunningTaskInfo mPrimary; RunningTaskInfo mSecondary; SurfaceControl mPrimarySurface; Loading Loading @@ -167,6 +170,7 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { @Override public void onTaskVanished(RunningTaskInfo taskInfo) { synchronized (this) { mPositionByTaskId.remove(taskInfo.taskId); if (taskInfo.hasParentTask()) { mLeashByTaskId.remove(taskInfo.taskId); return; Loading Loading @@ -200,16 +204,24 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { } synchronized (this) { if (taskInfo.hasParentTask()) { handleChildTaskChanged(taskInfo); // changed messages are noisy since it reports on every ensureVisibility. This // conflicts with legacy app-transitions which "swaps" the position to a // leash. For now, only update when position actually changes to avoid // poorly-timed duplicate calls. if (taskInfo.positionInParent.equals(mPositionByTaskId.get(taskInfo.taskId))) { return; } handleChildTaskChanged(taskInfo); } else { handleTaskInfoChanged(taskInfo); } mPositionByTaskId.put(taskInfo.taskId, new Point(taskInfo.positionInParent)); } } private void handleChildTaskAppeared(RunningTaskInfo taskInfo, SurfaceControl leash) { mLeashByTaskId.put(taskInfo.taskId, leash); mPositionByTaskId.put(taskInfo.taskId, new Point(taskInfo.positionInParent)); if (Transitions.ENABLE_SHELL_TRANSITIONS) return; updateChildTaskSurface(taskInfo, leash, true /* firstAppeared */); } Loading services/core/java/com/android/server/wm/Task.java +0 −1 Original line number Diff line number Diff line Loading @@ -3626,7 +3626,6 @@ class Task extends WindowContainer<WindowContainer> { @Override void resetSurfacePositionForAnimationLeash(SurfaceControl.Transaction t) { if (isOrganized()) return; super.resetSurfacePositionForAnimationLeash(t); } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/legacysplitscreen/LegacySplitScreenTaskListener.java +15 −3 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { private final SyncTransactionQueue mSyncQueue; private final SparseArray<SurfaceControl> mLeashByTaskId = new SparseArray<>(); // TODO(shell-transitions): Remove when switched to shell-transitions. private final SparseArray<Point> mPositionByTaskId = new SparseArray<>(); RunningTaskInfo mPrimary; RunningTaskInfo mSecondary; SurfaceControl mPrimarySurface; Loading Loading @@ -167,6 +170,7 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { @Override public void onTaskVanished(RunningTaskInfo taskInfo) { synchronized (this) { mPositionByTaskId.remove(taskInfo.taskId); if (taskInfo.hasParentTask()) { mLeashByTaskId.remove(taskInfo.taskId); return; Loading Loading @@ -200,16 +204,24 @@ class LegacySplitScreenTaskListener implements ShellTaskOrganizer.TaskListener { } synchronized (this) { if (taskInfo.hasParentTask()) { handleChildTaskChanged(taskInfo); // changed messages are noisy since it reports on every ensureVisibility. This // conflicts with legacy app-transitions which "swaps" the position to a // leash. For now, only update when position actually changes to avoid // poorly-timed duplicate calls. if (taskInfo.positionInParent.equals(mPositionByTaskId.get(taskInfo.taskId))) { return; } handleChildTaskChanged(taskInfo); } else { handleTaskInfoChanged(taskInfo); } mPositionByTaskId.put(taskInfo.taskId, new Point(taskInfo.positionInParent)); } } private void handleChildTaskAppeared(RunningTaskInfo taskInfo, SurfaceControl leash) { mLeashByTaskId.put(taskInfo.taskId, leash); mPositionByTaskId.put(taskInfo.taskId, new Point(taskInfo.positionInParent)); if (Transitions.ENABLE_SHELL_TRANSITIONS) return; updateChildTaskSurface(taskInfo, leash, true /* firstAppeared */); } Loading
services/core/java/com/android/server/wm/Task.java +0 −1 Original line number Diff line number Diff line Loading @@ -3626,7 +3626,6 @@ class Task extends WindowContainer<WindowContainer> { @Override void resetSurfacePositionForAnimationLeash(SurfaceControl.Transaction t) { if (isOrganized()) return; super.resetSurfacePositionForAnimationLeash(t); } Loading