Loading services/core/java/com/android/server/am/ActivityManagerService.java +31 −25 Original line number Diff line number Diff line Loading @@ -17823,11 +17823,13 @@ public final class ActivityManagerService extends ActivityManagerNative final long origId = Binder.clearCallingIdentity(); final ActivityStack stack = mStackSupervisor.getStack(fromStackId); if (stack != null) { mWindowManager.deferSurfaceLayout(); try { if (fromStackId == DOCKED_STACK_ID) { // We are moving all tasks from the docked stack to the fullscreen stack, which // is dismissing the docked stack, so resize all other stacks to fullscreen here // already so we don't end up with resize trashing. // We are moving all tasks from the docked stack to the fullscreen stack, // which is dismissing the docked stack, so resize all other stacks to // fullscreen here already so we don't end up with resize trashing. for (int i = FIRST_STATIC_STACK_ID; i <= LAST_STATIC_STACK_ID; i++) { if (StackId.isResizeableByDockedStack(i)) { ActivityStack otherStack = mStackSupervisor.getStack(i); Loading @@ -17844,7 +17846,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (onTop) { for (int i = 0; i < size; i++) { mStackSupervisor.moveTaskToStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, ON_TOP, !FORCE_FOCUS, FULLSCREEN_WORKSPACE_STACK_ID, onTop, !FORCE_FOCUS, "moveTasksToFullscreenStack", ANIMATE); } } else { Loading @@ -17853,6 +17855,10 @@ public final class ActivityManagerService extends ActivityManagerNative FULLSCREEN_WORKSPACE_STACK_ID, 0); } } } finally { mWindowManager.continueSurfaceLayout(); } } Binder.restoreCallingIdentity(origId); } services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −0 Original line number Diff line number Diff line Loading @@ -2362,6 +2362,8 @@ public final class ActivityStackSupervisor implements DisplayListener { stack.positionTask(task, position); // The task might have already been running and its visibility needs to be synchronized with // the visibility of the stack / windows. stack.ensureActivityConfigurationLocked(task.topRunningActivityLocked(), 0, !PRESERVE_WINDOWS); stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); resumeFocusedStackTopActivityLocked(); } Loading services/core/java/com/android/server/wm/AppWindowAnimator.java +7 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,13 @@ public class AppWindowAnimator { } else { mClearProlongedAnimation = true; } // Since we are finally starting our animation, we don't need the logic anymore to prevent // the app from showing again if we just moved between stacks. See // {@link WindowState#notifyMovedInStack}. for (int i = mAppToken.allAppWindows.size() - 1; i >= 0; i--) { mAppToken.allAppWindows.get(i).resetJustMovedInStack(); } } public void setDummyAnimation() { Loading services/core/java/com/android/server/wm/Task.java +19 −3 Original line number Diff line number Diff line Loading @@ -247,7 +247,15 @@ class Task implements DimLayer.DimLayerUser { mStack.removeTask(this); } stack.positionTask(this, position, showForAllUsers()); setBounds(bounds, config); resizeLocked(bounds, config, false /* force */); for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) { final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows; for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { final WindowState win = windows.get(winNdx); win.notifyMovedInStack(); } } } boolean removeAppToken(AppWindowToken wtoken) { Loading @@ -272,7 +280,7 @@ class Task implements DimLayer.DimLayerUser { } /** Set the task bounds. Passing in null sets the bounds to fullscreen. */ int setBounds(Rect bounds, Configuration config) { private int setBounds(Rect bounds, Configuration config) { if (config == null) { config = Configuration.EMPTY; } Loading Loading @@ -598,13 +606,21 @@ class Task implements DimLayer.DimLayerUser { void resizeWindows() { final ArrayList<WindowState> resizingWindows = mService.mResizingWindows; for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) { final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows; final AppWindowToken atoken = mAppTokens.get(activityNdx); // Some windows won't go through the resizing process, if they don't have a surface, so // destroy all saved surfaces here. atoken.destroySavedSurfaces(); final ArrayList<WindowState> windows = atoken.allAppWindows; for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { final WindowState win = windows.get(winNdx); if (win.mHasSurface && !resizingWindows.contains(win)) { if (DEBUG_RESIZE) Slog.d(TAG, "resizeWindows: Resizing " + win); resizingWindows.add(win); } if (win.isGoneForLayoutLw()) { win.mResizedWhileGone = true; } } } } Loading services/core/java/com/android/server/wm/WindowManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -2760,6 +2760,9 @@ public class WindowManagerService extends IWindowManager.Stub winAnimator.mReportSurfaceResized = false; result |= WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED; } if (!win.isGoneForLayoutLw()) { win.mResizedWhileGone = false; } outFrame.set(win.mCompatFrame); outOverscanInsets.set(win.mOverscanInsets); outContentInsets.set(win.mContentInsets); Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +31 −25 Original line number Diff line number Diff line Loading @@ -17823,11 +17823,13 @@ public final class ActivityManagerService extends ActivityManagerNative final long origId = Binder.clearCallingIdentity(); final ActivityStack stack = mStackSupervisor.getStack(fromStackId); if (stack != null) { mWindowManager.deferSurfaceLayout(); try { if (fromStackId == DOCKED_STACK_ID) { // We are moving all tasks from the docked stack to the fullscreen stack, which // is dismissing the docked stack, so resize all other stacks to fullscreen here // already so we don't end up with resize trashing. // We are moving all tasks from the docked stack to the fullscreen stack, // which is dismissing the docked stack, so resize all other stacks to // fullscreen here already so we don't end up with resize trashing. for (int i = FIRST_STATIC_STACK_ID; i <= LAST_STATIC_STACK_ID; i++) { if (StackId.isResizeableByDockedStack(i)) { ActivityStack otherStack = mStackSupervisor.getStack(i); Loading @@ -17844,7 +17846,7 @@ public final class ActivityManagerService extends ActivityManagerNative if (onTop) { for (int i = 0; i < size; i++) { mStackSupervisor.moveTaskToStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID, ON_TOP, !FORCE_FOCUS, FULLSCREEN_WORKSPACE_STACK_ID, onTop, !FORCE_FOCUS, "moveTasksToFullscreenStack", ANIMATE); } } else { Loading @@ -17853,6 +17855,10 @@ public final class ActivityManagerService extends ActivityManagerNative FULLSCREEN_WORKSPACE_STACK_ID, 0); } } } finally { mWindowManager.continueSurfaceLayout(); } } Binder.restoreCallingIdentity(origId); }
services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −0 Original line number Diff line number Diff line Loading @@ -2362,6 +2362,8 @@ public final class ActivityStackSupervisor implements DisplayListener { stack.positionTask(task, position); // The task might have already been running and its visibility needs to be synchronized with // the visibility of the stack / windows. stack.ensureActivityConfigurationLocked(task.topRunningActivityLocked(), 0, !PRESERVE_WINDOWS); stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); resumeFocusedStackTopActivityLocked(); } Loading
services/core/java/com/android/server/wm/AppWindowAnimator.java +7 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,13 @@ public class AppWindowAnimator { } else { mClearProlongedAnimation = true; } // Since we are finally starting our animation, we don't need the logic anymore to prevent // the app from showing again if we just moved between stacks. See // {@link WindowState#notifyMovedInStack}. for (int i = mAppToken.allAppWindows.size() - 1; i >= 0; i--) { mAppToken.allAppWindows.get(i).resetJustMovedInStack(); } } public void setDummyAnimation() { Loading
services/core/java/com/android/server/wm/Task.java +19 −3 Original line number Diff line number Diff line Loading @@ -247,7 +247,15 @@ class Task implements DimLayer.DimLayerUser { mStack.removeTask(this); } stack.positionTask(this, position, showForAllUsers()); setBounds(bounds, config); resizeLocked(bounds, config, false /* force */); for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) { final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows; for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { final WindowState win = windows.get(winNdx); win.notifyMovedInStack(); } } } boolean removeAppToken(AppWindowToken wtoken) { Loading @@ -272,7 +280,7 @@ class Task implements DimLayer.DimLayerUser { } /** Set the task bounds. Passing in null sets the bounds to fullscreen. */ int setBounds(Rect bounds, Configuration config) { private int setBounds(Rect bounds, Configuration config) { if (config == null) { config = Configuration.EMPTY; } Loading Loading @@ -598,13 +606,21 @@ class Task implements DimLayer.DimLayerUser { void resizeWindows() { final ArrayList<WindowState> resizingWindows = mService.mResizingWindows; for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) { final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows; final AppWindowToken atoken = mAppTokens.get(activityNdx); // Some windows won't go through the resizing process, if they don't have a surface, so // destroy all saved surfaces here. atoken.destroySavedSurfaces(); final ArrayList<WindowState> windows = atoken.allAppWindows; for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) { final WindowState win = windows.get(winNdx); if (win.mHasSurface && !resizingWindows.contains(win)) { if (DEBUG_RESIZE) Slog.d(TAG, "resizeWindows: Resizing " + win); resizingWindows.add(win); } if (win.isGoneForLayoutLw()) { win.mResizedWhileGone = true; } } } } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -2760,6 +2760,9 @@ public class WindowManagerService extends IWindowManager.Stub winAnimator.mReportSurfaceResized = false; result |= WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED; } if (!win.isGoneForLayoutLw()) { win.mResizedWhileGone = false; } outFrame.set(win.mCompatFrame); outOverscanInsets.set(win.mOverscanInsets); outContentInsets.set(win.mContentInsets); Loading