Loading services/core/java/com/android/server/wm/BackNavigationController.java +6 −0 Original line number Diff line number Diff line Loading @@ -1527,6 +1527,12 @@ class BackNavigationController { setLaunchBehind(visibleOpenActivities[i]); } } // Force update mLastSurfaceShowing for opening activity and its task. if (mWindowManagerService.mRoot.mTransitionController.isShellTransitionsEnabled()) { for (int i = visibleOpenActivities.length - 1; i >= 0; --i) { WindowContainer.enforceSurfaceVisible(visibleOpenActivities[i]); } } } @Nullable Runnable build() { Loading services/core/java/com/android/server/wm/TransitionController.java +2 −23 Original line number Diff line number Diff line Loading @@ -994,39 +994,18 @@ class TransitionController { Slog.e(TAG, "Set visible without transition " + wc + " playing=" + isPlaying + " caller=" + caller); if (!isPlaying) { enforceSurfaceVisible(wc); WindowContainer.enforceSurfaceVisible(wc); return; } // Update surface visibility after the playing transitions are finished, so the last // visibility won't be replaced by the finish transaction of transition. mStateValidators.add(() -> { if (wc.isVisibleRequested()) { enforceSurfaceVisible(wc); WindowContainer.enforceSurfaceVisible(wc); } }); } private void enforceSurfaceVisible(WindowContainer<?> wc) { if (wc.mSurfaceControl == null) return; wc.getSyncTransaction().show(wc.mSurfaceControl); final ActivityRecord ar = wc.asActivityRecord(); if (ar != null) { ar.mLastSurfaceShowing = true; } // Force showing the parents because they may be hidden by previous transition. for (WindowContainer<?> p = wc.getParent(); p != null && p != wc.mDisplayContent; p = p.getParent()) { if (p.mSurfaceControl != null) { p.getSyncTransaction().show(p.mSurfaceControl); final Task task = p.asTask(); if (task != null) { task.mLastSurfaceShowing = true; } } } wc.scheduleAnimation(); } /** * Called when the transition has a complete set of participants for its operation. In other * words, it is when the transition is "ready" but is still waiting for participants to draw. Loading services/core/java/com/android/server/wm/WindowContainer.java +23 −0 Original line number Diff line number Diff line Loading @@ -3625,6 +3625,29 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return mSurfaceControl.getHeight(); } static void enforceSurfaceVisible(@NonNull WindowContainer<?> wc) { if (wc.mSurfaceControl == null) { return; } wc.getSyncTransaction().show(wc.mSurfaceControl); final ActivityRecord ar = wc.asActivityRecord(); if (ar != null) { ar.mLastSurfaceShowing = true; } // Force showing the parents because they may be hidden by previous transition. for (WindowContainer<?> p = wc.getParent(); p != null && p != wc.mDisplayContent; p = p.getParent()) { if (p.mSurfaceControl != null) { p.getSyncTransaction().show(p.mSurfaceControl); final Task task = p.asTask(); if (task != null) { task.mLastSurfaceShowing = true; } } } wc.scheduleAnimation(); } @CallSuper void dump(PrintWriter pw, String prefix, boolean dumpAll) { if (mSurfaceAnimator.isAnimating()) { Loading Loading
services/core/java/com/android/server/wm/BackNavigationController.java +6 −0 Original line number Diff line number Diff line Loading @@ -1527,6 +1527,12 @@ class BackNavigationController { setLaunchBehind(visibleOpenActivities[i]); } } // Force update mLastSurfaceShowing for opening activity and its task. if (mWindowManagerService.mRoot.mTransitionController.isShellTransitionsEnabled()) { for (int i = visibleOpenActivities.length - 1; i >= 0; --i) { WindowContainer.enforceSurfaceVisible(visibleOpenActivities[i]); } } } @Nullable Runnable build() { Loading
services/core/java/com/android/server/wm/TransitionController.java +2 −23 Original line number Diff line number Diff line Loading @@ -994,39 +994,18 @@ class TransitionController { Slog.e(TAG, "Set visible without transition " + wc + " playing=" + isPlaying + " caller=" + caller); if (!isPlaying) { enforceSurfaceVisible(wc); WindowContainer.enforceSurfaceVisible(wc); return; } // Update surface visibility after the playing transitions are finished, so the last // visibility won't be replaced by the finish transaction of transition. mStateValidators.add(() -> { if (wc.isVisibleRequested()) { enforceSurfaceVisible(wc); WindowContainer.enforceSurfaceVisible(wc); } }); } private void enforceSurfaceVisible(WindowContainer<?> wc) { if (wc.mSurfaceControl == null) return; wc.getSyncTransaction().show(wc.mSurfaceControl); final ActivityRecord ar = wc.asActivityRecord(); if (ar != null) { ar.mLastSurfaceShowing = true; } // Force showing the parents because they may be hidden by previous transition. for (WindowContainer<?> p = wc.getParent(); p != null && p != wc.mDisplayContent; p = p.getParent()) { if (p.mSurfaceControl != null) { p.getSyncTransaction().show(p.mSurfaceControl); final Task task = p.asTask(); if (task != null) { task.mLastSurfaceShowing = true; } } } wc.scheduleAnimation(); } /** * Called when the transition has a complete set of participants for its operation. In other * words, it is when the transition is "ready" but is still waiting for participants to draw. Loading
services/core/java/com/android/server/wm/WindowContainer.java +23 −0 Original line number Diff line number Diff line Loading @@ -3625,6 +3625,29 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return mSurfaceControl.getHeight(); } static void enforceSurfaceVisible(@NonNull WindowContainer<?> wc) { if (wc.mSurfaceControl == null) { return; } wc.getSyncTransaction().show(wc.mSurfaceControl); final ActivityRecord ar = wc.asActivityRecord(); if (ar != null) { ar.mLastSurfaceShowing = true; } // Force showing the parents because they may be hidden by previous transition. for (WindowContainer<?> p = wc.getParent(); p != null && p != wc.mDisplayContent; p = p.getParent()) { if (p.mSurfaceControl != null) { p.getSyncTransaction().show(p.mSurfaceControl); final Task task = p.asTask(); if (task != null) { task.mLastSurfaceShowing = true; } } } wc.scheduleAnimation(); } @CallSuper void dump(PrintWriter pw, String prefix, boolean dumpAll) { if (mSurfaceAnimator.isAnimating()) { Loading