Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +7 −22 Original line number Diff line number Diff line Loading @@ -2295,17 +2295,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mResizingTasksDuringAnimation.clear(); } private class MoveTaskToFullscreenArgs { public int fromStackId; public boolean onTop; }; // Used only to closure over the arguments to moveTasksToFullscreenStack without // allocation private MoveTaskToFullscreenArgs mMoveToFullscreenArgs = new MoveTaskToFullscreenArgs(); private void moveTasksToFullscreenStackInnerLocked() { int fromStackId = mMoveToFullscreenArgs.fromStackId; boolean onTop = mMoveToFullscreenArgs.onTop; private void moveTasksToFullscreenStackInSurfaceTransaction(int fromStackId, boolean onTop) { final ActivityStack stack = getStack(fromStackId); if (stack == null) { Loading Loading @@ -2379,10 +2370,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } void moveTasksToFullscreenStackLocked(int fromStackId, boolean onTop) { mMoveToFullscreenArgs.fromStackId = fromStackId; mMoveToFullscreenArgs.onTop = onTop; mWindowManager.inSurfaceTransaction(this::moveTasksToFullscreenStackInnerLocked); mWindowManager.inSurfaceTransaction( () -> moveTasksToFullscreenStackInSurfaceTransaction(fromStackId, onTop)); } void resizeDockedStackLocked(Rect dockedBounds, Rect tempDockedTaskBounds, Loading Loading @@ -2498,11 +2487,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } // Used only to closure over the argument to removeStack without allocation. private int mRemoveStackStackId; void removeStackInnerLocked() { int stackId = mRemoveStackStackId; void removeStackInSurfaceTransaction(int stackId) { final ActivityStack stack = getStack(stackId); if (stack == null) { return; Loading Loading @@ -2546,8 +2531,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D * instead moved back onto the fullscreen stack. */ void removeStackLocked(int stackId) { mRemoveStackStackId = stackId; mWindowManager.inSurfaceTransaction(this::removeStackInnerLocked); mWindowManager.inSurfaceTransaction( () -> removeStackInSurfaceTransaction(stackId)); } /** Loading services/core/java/com/android/server/wm/AppWindowToken.java +4 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mEnteringAnimation = true; mService.mActivityManagerAppTransitionNotifier.onAppTransitionFinishedLocked(token); } // If we are hidden but there is no delay needed we immediately // apply the Surface transaction so that the ActivityManager // can have some guarantee on the Surface state // following setting the visibility. if (hidden && !delayed) { SurfaceControl.openTransaction(); for (int i = mChildren.size() - 1; i >= 0; i--) { Loading services/core/java/com/android/server/wm/WindowManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -7317,7 +7317,6 @@ public class WindowManagerService extends IWindowManager.Stub * WARNING: This method contains locks known to the State of California * to cause Deadlocks and other conditions. * * * Begins a surface transaction with which the AM can batch operations. * All Surface updates performed by the WindowManager following this * will not appear on screen until after the call to Loading @@ -7330,7 +7329,6 @@ public class WindowManagerService extends IWindowManager.Stub * from the new parent are inherited, otherwise it could be revealed * mistakenly. * * * TODO(b/36393204): We can investigate totally replacing #deferSurfaceLayout * with something like this but it seems that some existing cases of * deferSurfaceLayout may be a little too broad, in particular the total Loading Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +7 −22 Original line number Diff line number Diff line Loading @@ -2295,17 +2295,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mResizingTasksDuringAnimation.clear(); } private class MoveTaskToFullscreenArgs { public int fromStackId; public boolean onTop; }; // Used only to closure over the arguments to moveTasksToFullscreenStack without // allocation private MoveTaskToFullscreenArgs mMoveToFullscreenArgs = new MoveTaskToFullscreenArgs(); private void moveTasksToFullscreenStackInnerLocked() { int fromStackId = mMoveToFullscreenArgs.fromStackId; boolean onTop = mMoveToFullscreenArgs.onTop; private void moveTasksToFullscreenStackInSurfaceTransaction(int fromStackId, boolean onTop) { final ActivityStack stack = getStack(fromStackId); if (stack == null) { Loading Loading @@ -2379,10 +2370,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } void moveTasksToFullscreenStackLocked(int fromStackId, boolean onTop) { mMoveToFullscreenArgs.fromStackId = fromStackId; mMoveToFullscreenArgs.onTop = onTop; mWindowManager.inSurfaceTransaction(this::moveTasksToFullscreenStackInnerLocked); mWindowManager.inSurfaceTransaction( () -> moveTasksToFullscreenStackInSurfaceTransaction(fromStackId, onTop)); } void resizeDockedStackLocked(Rect dockedBounds, Rect tempDockedTaskBounds, Loading Loading @@ -2498,11 +2487,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D } // Used only to closure over the argument to removeStack without allocation. private int mRemoveStackStackId; void removeStackInnerLocked() { int stackId = mRemoveStackStackId; void removeStackInSurfaceTransaction(int stackId) { final ActivityStack stack = getStack(stackId); if (stack == null) { return; Loading Loading @@ -2546,8 +2531,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D * instead moved back onto the fullscreen stack. */ void removeStackLocked(int stackId) { mRemoveStackStackId = stackId; mWindowManager.inSurfaceTransaction(this::removeStackInnerLocked); mWindowManager.inSurfaceTransaction( () -> removeStackInSurfaceTransaction(stackId)); } /** Loading
services/core/java/com/android/server/wm/AppWindowToken.java +4 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree mEnteringAnimation = true; mService.mActivityManagerAppTransitionNotifier.onAppTransitionFinishedLocked(token); } // If we are hidden but there is no delay needed we immediately // apply the Surface transaction so that the ActivityManager // can have some guarantee on the Surface state // following setting the visibility. if (hidden && !delayed) { SurfaceControl.openTransaction(); for (int i = mChildren.size() - 1; i >= 0; i--) { Loading
services/core/java/com/android/server/wm/WindowManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -7317,7 +7317,6 @@ public class WindowManagerService extends IWindowManager.Stub * WARNING: This method contains locks known to the State of California * to cause Deadlocks and other conditions. * * * Begins a surface transaction with which the AM can batch operations. * All Surface updates performed by the WindowManager following this * will not appear on screen until after the call to Loading @@ -7330,7 +7329,6 @@ public class WindowManagerService extends IWindowManager.Stub * from the new parent are inherited, otherwise it could be revealed * mistakenly. * * * TODO(b/36393204): We can investigate totally replacing #deferSurfaceLayout * with something like this but it seems that some existing cases of * deferSurfaceLayout may be a little too broad, in particular the total Loading