Loading services/core/java/com/android/server/wm/DisplayRotation.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -549,7 +549,7 @@ public class DisplayRotation { // Go through all tasks and collect them before the rotation // Go through all tasks and collect them before the rotation // TODO(shell-transitions): move collect() to onConfigurationChange once wallpaper // TODO(shell-transitions): move collect() to onConfigurationChange once wallpaper // handling is synchronized. // handling is synchronized. mDisplayContent.mTransitionController.collectForDisplayChange(mDisplayContent, mDisplayContent.mTransitionController.collectForDisplayAreaChange(mDisplayContent, null /* use collecting transition */); null /* use collecting transition */); } } mService.mAtmService.deferWindowLayout(); mService.mAtmService.deferWindowLayout(); Loading services/core/java/com/android/server/wm/PhysicalDisplaySwitchTransitionLauncher.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class PhysicalDisplaySwitchTransitionLauncher { if (t != null) { if (t != null) { mDisplayContent.mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY); mDisplayContent.mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY); mTransitionController.collectForDisplayChange(mDisplayContent, t); mTransitionController.collectForDisplayAreaChange(mDisplayContent, t); mTransition = t; mTransition = t; } } } } Loading services/core/java/com/android/server/wm/TransitionController.java +11 −8 Original line number Original line Diff line number Diff line Loading @@ -460,24 +460,27 @@ class TransitionController { * Collects the window containers which need to be synced with the changing display (e.g. * Collects the window containers which need to be synced with the changing display (e.g. * rotating) to the given transition or the current collecting transition. * rotating) to the given transition or the current collecting transition. */ */ void collectForDisplayChange(@NonNull DisplayContent dc, @Nullable Transition incoming) { void collectForDisplayAreaChange(@NonNull DisplayArea<?> wc, @Nullable Transition incoming) { if (incoming == null) incoming = mCollectingTransition; if (incoming == null) incoming = mCollectingTransition; if (incoming == null) return; if (incoming == null) return; final Transition transition = incoming; final Transition transition = incoming; // Collect all visible tasks. // Collect all visible tasks. dc.forAllLeafTasks(task -> { wc.forAllLeafTasks(task -> { if (task.isVisible()) { if (task.isVisible()) { transition.collect(task); transition.collect(task); } } }, true /* traverseTopToBottom */); }, true /* traverseTopToBottom */); // Collect all visible non-app windows which need to be drawn before the animation starts. // Collect all visible non-app windows which need to be drawn before the animation starts. dc.forAllWindows(w -> { final DisplayContent dc = wc.asDisplayContent(); if (dc != null) { wc.forAllWindows(w -> { if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken) if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken) && dc.shouldSyncRotationChange(w)) { && dc.shouldSyncRotationChange(w)) { transition.collect(w.mToken); transition.collect(w.mToken); } } }, true /* traverseTopToBottom */); }, true /* traverseTopToBottom */); } } } /** @see Transition#mStatusBarTransitionDelay */ /** @see Transition#mStatusBarTransitionDelay */ void setStatusBarTransitionDelay(long delay) { void setStatusBarTransitionDelay(long delay) { Loading services/core/java/com/android/server/wm/WindowOrganizerController.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -397,7 +397,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub // Go through all tasks and collect them before the rotation // Go through all tasks and collect them before the rotation // TODO(shell-transitions): move collect() to onConfigurationChange once // TODO(shell-transitions): move collect() to onConfigurationChange once // wallpaper handling is synchronized. // wallpaper handling is synchronized. dc.mTransitionController.collectForDisplayChange(dc, transition); dc.mTransitionController.collectForDisplayAreaChange(dc, transition); dc.sendNewConfiguration(); dc.sendNewConfiguration(); effects |= TRANSACT_EFFECTS_LIFECYCLE; effects |= TRANSACT_EFFECTS_LIFECYCLE; } } Loading @@ -421,6 +421,15 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub addToSyncSet(syncId, wc); addToSyncSet(syncId, wc); } } if (transition != null) transition.collect(wc); if (transition != null) transition.collect(wc); final DisplayArea da = wc.asDisplayArea(); // Only check DisplayArea here as a similar thing is done for DisplayContent above. if (da != null && wc.asDisplayContent() == null && entry.getValue().getWindowingMode() != da.getWindowingMode()) { // Go through all tasks and collect them before changing the windowing mode of a // display-level container. // TODO(shell-transitions): handle this more elegantly. da.mTransitionController.collectForDisplayAreaChange(da, transition); } if ((entry.getValue().getChangeMask() if ((entry.getValue().getChangeMask() & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { Loading Loading
services/core/java/com/android/server/wm/DisplayRotation.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -549,7 +549,7 @@ public class DisplayRotation { // Go through all tasks and collect them before the rotation // Go through all tasks and collect them before the rotation // TODO(shell-transitions): move collect() to onConfigurationChange once wallpaper // TODO(shell-transitions): move collect() to onConfigurationChange once wallpaper // handling is synchronized. // handling is synchronized. mDisplayContent.mTransitionController.collectForDisplayChange(mDisplayContent, mDisplayContent.mTransitionController.collectForDisplayAreaChange(mDisplayContent, null /* use collecting transition */); null /* use collecting transition */); } } mService.mAtmService.deferWindowLayout(); mService.mAtmService.deferWindowLayout(); Loading
services/core/java/com/android/server/wm/PhysicalDisplaySwitchTransitionLauncher.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class PhysicalDisplaySwitchTransitionLauncher { if (t != null) { if (t != null) { mDisplayContent.mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY); mDisplayContent.mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY); mTransitionController.collectForDisplayChange(mDisplayContent, t); mTransitionController.collectForDisplayAreaChange(mDisplayContent, t); mTransition = t; mTransition = t; } } } } Loading
services/core/java/com/android/server/wm/TransitionController.java +11 −8 Original line number Original line Diff line number Diff line Loading @@ -460,24 +460,27 @@ class TransitionController { * Collects the window containers which need to be synced with the changing display (e.g. * Collects the window containers which need to be synced with the changing display (e.g. * rotating) to the given transition or the current collecting transition. * rotating) to the given transition or the current collecting transition. */ */ void collectForDisplayChange(@NonNull DisplayContent dc, @Nullable Transition incoming) { void collectForDisplayAreaChange(@NonNull DisplayArea<?> wc, @Nullable Transition incoming) { if (incoming == null) incoming = mCollectingTransition; if (incoming == null) incoming = mCollectingTransition; if (incoming == null) return; if (incoming == null) return; final Transition transition = incoming; final Transition transition = incoming; // Collect all visible tasks. // Collect all visible tasks. dc.forAllLeafTasks(task -> { wc.forAllLeafTasks(task -> { if (task.isVisible()) { if (task.isVisible()) { transition.collect(task); transition.collect(task); } } }, true /* traverseTopToBottom */); }, true /* traverseTopToBottom */); // Collect all visible non-app windows which need to be drawn before the animation starts. // Collect all visible non-app windows which need to be drawn before the animation starts. dc.forAllWindows(w -> { final DisplayContent dc = wc.asDisplayContent(); if (dc != null) { wc.forAllWindows(w -> { if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken) if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken) && dc.shouldSyncRotationChange(w)) { && dc.shouldSyncRotationChange(w)) { transition.collect(w.mToken); transition.collect(w.mToken); } } }, true /* traverseTopToBottom */); }, true /* traverseTopToBottom */); } } } /** @see Transition#mStatusBarTransitionDelay */ /** @see Transition#mStatusBarTransitionDelay */ void setStatusBarTransitionDelay(long delay) { void setStatusBarTransitionDelay(long delay) { Loading
services/core/java/com/android/server/wm/WindowOrganizerController.java +10 −1 Original line number Original line Diff line number Diff line Loading @@ -397,7 +397,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub // Go through all tasks and collect them before the rotation // Go through all tasks and collect them before the rotation // TODO(shell-transitions): move collect() to onConfigurationChange once // TODO(shell-transitions): move collect() to onConfigurationChange once // wallpaper handling is synchronized. // wallpaper handling is synchronized. dc.mTransitionController.collectForDisplayChange(dc, transition); dc.mTransitionController.collectForDisplayAreaChange(dc, transition); dc.sendNewConfiguration(); dc.sendNewConfiguration(); effects |= TRANSACT_EFFECTS_LIFECYCLE; effects |= TRANSACT_EFFECTS_LIFECYCLE; } } Loading @@ -421,6 +421,15 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub addToSyncSet(syncId, wc); addToSyncSet(syncId, wc); } } if (transition != null) transition.collect(wc); if (transition != null) transition.collect(wc); final DisplayArea da = wc.asDisplayArea(); // Only check DisplayArea here as a similar thing is done for DisplayContent above. if (da != null && wc.asDisplayContent() == null && entry.getValue().getWindowingMode() != da.getWindowingMode()) { // Go through all tasks and collect them before changing the windowing mode of a // display-level container. // TODO(shell-transitions): handle this more elegantly. da.mTransitionController.collectForDisplayAreaChange(da, transition); } if ((entry.getValue().getChangeMask() if ((entry.getValue().getChangeMask() & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { Loading