Loading libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java +2 −2 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, */ public void onLocationChanged() { getBoundsOnScreen(mTmpRect); mTaskViewTaskController.onLocationChanged(mTmpRect); mTaskViewTaskController.setWindowBounds(mTmpRect); } /** Loading @@ -198,7 +198,7 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, public void surfaceChanged(@androidx.annotation.NonNull SurfaceHolder holder, int format, int width, int height) { getBoundsOnScreen(mTmpRect); mTaskViewTaskController.surfaceChanged(mTmpRect); mTaskViewTaskController.setWindowBounds(mTmpRect); } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/TaskViewTaskController.java +13 −24 Original line number Diff line number Diff line Loading @@ -182,26 +182,6 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { options.setRemoveWithTaskOrganizer(true); } /** * Call when view position or size has changed. Do not call when animating. */ public void onLocationChanged(Rect newBounds) { if (mTaskToken == null) { return; } // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; WindowContainerTransaction wct = new WindowContainerTransaction(); updateWindowBounds(wct); mSyncQueue.queue(wct); } private void updateWindowBounds(WindowContainerTransaction wct) { wct.setBounds(mTaskToken, mTaskViewBase.getCurrentBoundsOnScreen()); } /** * Release this container if it is initialized. */ Loading Loading @@ -394,15 +374,24 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { } /** * Should be called when the client surface is changed. * Sets the window bounds to {@code boundsOnScreen}. * Call when view position or size has changed. Can also be called before the animation when * the final bounds are known. * Do not call during the animation. * * @param boundsOnScreen the on screen bounds of the surface view. */ public void surfaceChanged(Rect boundsOnScreen) { public void setWindowBounds(Rect boundsOnScreen) { if (mTaskToken == null) { return; } onLocationChanged(boundsOnScreen); // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mTaskToken, boundsOnScreen); mSyncQueue.queue(wct); } /** Should be called when the client surface is destroyed. */ Loading Loading @@ -493,7 +482,7 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { .setPosition(mTaskLeash, 0, 0) .apply(); updateWindowBounds(wct); wct.setBounds(mTaskToken, mTaskViewBase.getCurrentBoundsOnScreen()); } else { // The surface has already been destroyed before the task has appeared, // so go ahead and hide the task entirely Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java +2 −2 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, */ public void onLocationChanged() { getBoundsOnScreen(mTmpRect); mTaskViewTaskController.onLocationChanged(mTmpRect); mTaskViewTaskController.setWindowBounds(mTmpRect); } /** Loading @@ -198,7 +198,7 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback, public void surfaceChanged(@androidx.annotation.NonNull SurfaceHolder holder, int format, int width, int height) { getBoundsOnScreen(mTmpRect); mTaskViewTaskController.surfaceChanged(mTmpRect); mTaskViewTaskController.setWindowBounds(mTmpRect); } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/TaskViewTaskController.java +13 −24 Original line number Diff line number Diff line Loading @@ -182,26 +182,6 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { options.setRemoveWithTaskOrganizer(true); } /** * Call when view position or size has changed. Do not call when animating. */ public void onLocationChanged(Rect newBounds) { if (mTaskToken == null) { return; } // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; WindowContainerTransaction wct = new WindowContainerTransaction(); updateWindowBounds(wct); mSyncQueue.queue(wct); } private void updateWindowBounds(WindowContainerTransaction wct) { wct.setBounds(mTaskToken, mTaskViewBase.getCurrentBoundsOnScreen()); } /** * Release this container if it is initialized. */ Loading Loading @@ -394,15 +374,24 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { } /** * Should be called when the client surface is changed. * Sets the window bounds to {@code boundsOnScreen}. * Call when view position or size has changed. Can also be called before the animation when * the final bounds are known. * Do not call during the animation. * * @param boundsOnScreen the on screen bounds of the surface view. */ public void surfaceChanged(Rect boundsOnScreen) { public void setWindowBounds(Rect boundsOnScreen) { if (mTaskToken == null) { return; } onLocationChanged(boundsOnScreen); // Sync Transactions can't operate simultaneously with shell transition collection. // The transition animation (upon showing) will sync the location itself. if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return; WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mTaskToken, boundsOnScreen); mSyncQueue.queue(wct); } /** Should be called when the client surface is destroyed. */ Loading Loading @@ -493,7 +482,7 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { .setPosition(mTaskLeash, 0, 0) .apply(); updateWindowBounds(wct); wct.setBounds(mTaskToken, mTaskViewBase.getCurrentBoundsOnScreen()); } else { // The surface has already been destroyed before the task has appeared, // so go ahead and hide the task entirely Loading