Loading services/core/java/com/android/server/wm/Task.java +9 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import static android.provider.Settings.Secure.USER_SETUP_COMPLETE; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.INVALID_DISPLAY; import static android.view.SurfaceControl.METADATA_TASK_ID; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_FLAG_APP_CRASHED; Loading Loading @@ -1670,6 +1671,14 @@ class Task extends WindowContainer<WindowContainer> { return isUidPresent; } ActivityRecord topActivityContainsStartingWindow() { if (getParent() == null) { return null; } return getActivity((r) -> r.getWindow(window -> window.getBaseType() == TYPE_APPLICATION_STARTING) != null); } ActivityRecord topActivityWithStartingWindow() { if (getParent() == null) { return null; Loading services/core/java/com/android/server/wm/TaskOrganizerController.java +2 −6 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.os.Binder; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.SurfaceControl; Loading Loading @@ -76,9 +75,6 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub { private static final int REPORT_CONFIGS = CONTROLLABLE_CONFIGS; private static final int REPORT_WINDOW_CONFIGS = CONTROLLABLE_WINDOW_CONFIGS; private static final boolean DEBUG_ENABLE_REVEAL_ANIMATION = SystemProperties.getBoolean("persist.debug.enable_reveal_animation", false); // The set of modes that are currently supports // TODO: Remove once the task organizer can support all modes @VisibleForTesting Loading Loading @@ -187,8 +183,8 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub { SurfaceControl windowAnimationLeash = null; Rect mainFrame = null; final boolean playShiftUpAnimation = !task.inMultiWindowMode(); if (prepareAnimation && playShiftUpAnimation && DEBUG_ENABLE_REVEAL_ANIMATION) { final ActivityRecord topActivity = task.topActivityWithStartingWindow(); if (prepareAnimation && playShiftUpAnimation) { final ActivityRecord topActivity = task.topActivityContainsStartingWindow(); if (topActivity != null) { final WindowState mainWindow = topActivity.findMainWindow(false/* includeStartingApp */); Loading services/core/java/com/android/server/wm/WindowState.java +7 −7 Original line number Diff line number Diff line Loading @@ -2412,14 +2412,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } if (startingWindow && StartingSurfaceController.DEBUG_ENABLE_SHELL_DRAWER) { // cancel the remove starting window animation on shell // Cancel the remove starting window animation on shell. The main window might changed // during animating, checking for all windows would be safer. if (mActivityRecord != null) { final WindowState mainWindow = mActivityRecord.findMainWindow(false/* includeStartingApp */); if (mainWindow != null && mainWindow.isSelfAnimating(0 /* flags */, ANIMATION_TYPE_STARTING_REVEAL)) { mainWindow.cancelAnimation(); mActivityRecord.forAllWindows(w -> { if (w.isSelfAnimating(0, ANIMATION_TYPE_STARTING_REVEAL)) { w.cancelAnimation(); } }, true); } } Loading Loading
services/core/java/com/android/server/wm/Task.java +9 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import static android.provider.Settings.Secure.USER_SETUP_COMPLETE; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.INVALID_DISPLAY; import static android.view.SurfaceControl.METADATA_TASK_ID; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_FLAG_APP_CRASHED; Loading Loading @@ -1670,6 +1671,14 @@ class Task extends WindowContainer<WindowContainer> { return isUidPresent; } ActivityRecord topActivityContainsStartingWindow() { if (getParent() == null) { return null; } return getActivity((r) -> r.getWindow(window -> window.getBaseType() == TYPE_APPLICATION_STARTING) != null); } ActivityRecord topActivityWithStartingWindow() { if (getParent() == null) { return null; Loading
services/core/java/com/android/server/wm/TaskOrganizerController.java +2 −6 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.os.Binder; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.SurfaceControl; Loading Loading @@ -76,9 +75,6 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub { private static final int REPORT_CONFIGS = CONTROLLABLE_CONFIGS; private static final int REPORT_WINDOW_CONFIGS = CONTROLLABLE_WINDOW_CONFIGS; private static final boolean DEBUG_ENABLE_REVEAL_ANIMATION = SystemProperties.getBoolean("persist.debug.enable_reveal_animation", false); // The set of modes that are currently supports // TODO: Remove once the task organizer can support all modes @VisibleForTesting Loading Loading @@ -187,8 +183,8 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub { SurfaceControl windowAnimationLeash = null; Rect mainFrame = null; final boolean playShiftUpAnimation = !task.inMultiWindowMode(); if (prepareAnimation && playShiftUpAnimation && DEBUG_ENABLE_REVEAL_ANIMATION) { final ActivityRecord topActivity = task.topActivityWithStartingWindow(); if (prepareAnimation && playShiftUpAnimation) { final ActivityRecord topActivity = task.topActivityContainsStartingWindow(); if (topActivity != null) { final WindowState mainWindow = topActivity.findMainWindow(false/* includeStartingApp */); Loading
services/core/java/com/android/server/wm/WindowState.java +7 −7 Original line number Diff line number Diff line Loading @@ -2412,14 +2412,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } if (startingWindow && StartingSurfaceController.DEBUG_ENABLE_SHELL_DRAWER) { // cancel the remove starting window animation on shell // Cancel the remove starting window animation on shell. The main window might changed // during animating, checking for all windows would be safer. if (mActivityRecord != null) { final WindowState mainWindow = mActivityRecord.findMainWindow(false/* includeStartingApp */); if (mainWindow != null && mainWindow.isSelfAnimating(0 /* flags */, ANIMATION_TYPE_STARTING_REVEAL)) { mainWindow.cancelAnimation(); mActivityRecord.forAllWindows(w -> { if (w.isSelfAnimating(0, ANIMATION_TYPE_STARTING_REVEAL)) { w.cancelAnimation(); } }, true); } } Loading