Loading services/core/java/com/android/server/wm/Transition.java +9 −3 Original line number Diff line number Diff line Loading @@ -813,7 +813,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } boolean hasParticipatedDisplay = false; boolean reportTaskStackChanged = false; boolean hasVisibleTransientLaunch = false; // Commit all going-invisible containers for (int i = 0; i < mParticipants.size(); ++i) { final WindowContainer<?> participant = mParticipants.valueAt(i); Loading Loading @@ -856,7 +856,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { && ar.isVisible()) { // Transient launch was committed, so report enteringAnimation ar.mEnteringAnimation = true; reportTaskStackChanged = true; hasVisibleTransientLaunch = true; // Since transient launches don't automatically take focus, make sure we // synchronize focus since we committed to the launch. Loading Loading @@ -900,8 +900,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } } if (reportTaskStackChanged) { if (hasVisibleTransientLaunch) { // Notify the change about the transient-below task that becomes invisible. mController.mAtm.getTaskChangeNotificationController().notifyTaskStackChanged(); // Prevent spurious background app switches. mController.mAtm.stopAppSwitches(); // The end of transient launch may not reorder task, so make sure to compute the latest // task rank according to the current visibility. mController.mAtm.mRootWindowContainer.rankTaskLayers(); } // dispatch legacy callback in a different loop. This is because multiple legacy handlers Loading services/core/java/com/android/server/wm/WindowProcessController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1826,6 +1826,9 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio pw.print("F|"); } } if ((stateFlags & ACTIVITY_STATE_FLAG_HAS_ACTIVITY_IN_VISIBLE_TASK) != 0) { pw.print("VT|"); } final int taskLayer = stateFlags & ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER; if (taskLayer != ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER) { pw.print("taskLayer=" + taskLayer); Loading services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +3 −0 Original line number Diff line number Diff line Loading @@ -1376,6 +1376,9 @@ public class TransitionTests extends WindowTestsBase { enteringAnimReports.clear(); closeTransition.finishTransition(); assertEquals(ActivityTaskManagerService.APP_SWITCH_DISALLOW, mAtm.getBalAppSwitchesState()); assertFalse(activity1.app.hasActivityInVisibleTask()); verify(snapshotController, times(1)).recordSnapshot(eq(task1), eq(false)); assertTrue(enteringAnimReports.contains(activity2)); } Loading Loading
services/core/java/com/android/server/wm/Transition.java +9 −3 Original line number Diff line number Diff line Loading @@ -813,7 +813,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } boolean hasParticipatedDisplay = false; boolean reportTaskStackChanged = false; boolean hasVisibleTransientLaunch = false; // Commit all going-invisible containers for (int i = 0; i < mParticipants.size(); ++i) { final WindowContainer<?> participant = mParticipants.valueAt(i); Loading Loading @@ -856,7 +856,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { && ar.isVisible()) { // Transient launch was committed, so report enteringAnimation ar.mEnteringAnimation = true; reportTaskStackChanged = true; hasVisibleTransientLaunch = true; // Since transient launches don't automatically take focus, make sure we // synchronize focus since we committed to the launch. Loading Loading @@ -900,8 +900,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } } if (reportTaskStackChanged) { if (hasVisibleTransientLaunch) { // Notify the change about the transient-below task that becomes invisible. mController.mAtm.getTaskChangeNotificationController().notifyTaskStackChanged(); // Prevent spurious background app switches. mController.mAtm.stopAppSwitches(); // The end of transient launch may not reorder task, so make sure to compute the latest // task rank according to the current visibility. mController.mAtm.mRootWindowContainer.rankTaskLayers(); } // dispatch legacy callback in a different loop. This is because multiple legacy handlers Loading
services/core/java/com/android/server/wm/WindowProcessController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1826,6 +1826,9 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio pw.print("F|"); } } if ((stateFlags & ACTIVITY_STATE_FLAG_HAS_ACTIVITY_IN_VISIBLE_TASK) != 0) { pw.print("VT|"); } final int taskLayer = stateFlags & ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER; if (taskLayer != ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER) { pw.print("taskLayer=" + taskLayer); Loading
services/tests/wmtests/src/com/android/server/wm/TransitionTests.java +3 −0 Original line number Diff line number Diff line Loading @@ -1376,6 +1376,9 @@ public class TransitionTests extends WindowTestsBase { enteringAnimReports.clear(); closeTransition.finishTransition(); assertEquals(ActivityTaskManagerService.APP_SWITCH_DISALLOW, mAtm.getBalAppSwitchesState()); assertFalse(activity1.app.hasActivityInVisibleTask()); verify(snapshotController, times(1)).recordSnapshot(eq(task1), eq(false)); assertTrue(enteringAnimReports.contains(activity2)); } Loading