Loading libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java +14 −5 Original line number Diff line number Diff line Loading @@ -143,20 +143,29 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener { @Override public void attachChildSurfaceToTask(int taskId, SurfaceControl.Builder b) { b.setParent(findTaskSurface(taskId)); final SurfaceControl taskSurface = findTaskSurface(taskId); if (taskSurface != null) { b.setParent(taskSurface); } } @Override public void reparentChildSurfaceToTask(int taskId, SurfaceControl sc, SurfaceControl.Transaction t) { t.reparent(sc, findTaskSurface(taskId)); final SurfaceControl taskSurface = findTaskSurface(taskId); if (taskSurface != null) { t.reparent(sc, taskSurface); } } private SurfaceControl findTaskSurface(int taskId) { if (!mTasks.contains(taskId)) { throw new IllegalArgumentException("There is no surface for taskId=" + taskId); final State state = mTasks.get(taskId); if (state != null) { return state.mLeash; } return mTasks.get(taskId).mLeash; ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Surface not found: #%d", taskId); return null; } @Override Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java +14 −5 Original line number Diff line number Diff line Loading @@ -143,20 +143,29 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener { @Override public void attachChildSurfaceToTask(int taskId, SurfaceControl.Builder b) { b.setParent(findTaskSurface(taskId)); final SurfaceControl taskSurface = findTaskSurface(taskId); if (taskSurface != null) { b.setParent(taskSurface); } } @Override public void reparentChildSurfaceToTask(int taskId, SurfaceControl sc, SurfaceControl.Transaction t) { t.reparent(sc, findTaskSurface(taskId)); final SurfaceControl taskSurface = findTaskSurface(taskId); if (taskSurface != null) { t.reparent(sc, taskSurface); } } private SurfaceControl findTaskSurface(int taskId) { if (!mTasks.contains(taskId)) { throw new IllegalArgumentException("There is no surface for taskId=" + taskId); final State state = mTasks.get(taskId); if (state != null) { return state.mLeash; } return mTasks.get(taskId).mLeash; ProtoLog.w(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Surface not found: #%d", taskId); return null; } @Override Loading