Loading services/core/java/com/android/server/wm/ActivitySnapshotController.java +6 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord * Prepare to handle on transition start. Clear all temporary fields. */ void preTransitionStart() { if (shouldDisableSnapshots()) { return; } resetTmpFields(); } Loading Loading @@ -283,6 +286,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord * Called when the visibility of an app changes outside the regular app transition flow. */ void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) { if (shouldDisableSnapshots()) { return; } if (!visible) { resetTmpFields(); addBelowTopActivityIfExist(appWindowToken.getTask(), mPendingRemoveActivity, Loading services/core/java/com/android/server/wm/SnapshotController.java +5 −1 Original line number Diff line number Diff line Loading @@ -213,8 +213,12 @@ class SnapshotController { void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) { if (!visible && hasTransitionStateConsumer(TASK_CLOSE)) { final Task task = appWindowToken.getTask(); if (task == null || task.isVisibleRequested()) { return; } // close task transition addTransitionRecord(TASK_CLOSE, false /*open*/, appWindowToken.getTask()); addTransitionRecord(TASK_CLOSE, false /*open*/, task); mActivitySnapshotController.preTransitionStart(); notifyTransition(TASK_CLOSE); mActivitySnapshotController.postTransitionStart(); Loading services/core/java/com/android/server/wm/Transition.java +7 −1 Original line number Diff line number Diff line Loading @@ -1227,7 +1227,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // transferred. If transition is transient, IME won't be moved during the transition and // the tasks are still live, so we take the snapshot at the end of the transition instead. if (mTransientLaunches == null) { mController.mSnapshotController.onTransitionReady(mType, mParticipants); for (int i = mParticipants.size() - 1; i >= 0; --i) { final ActivityRecord ar = mParticipants.valueAt(i).asActivityRecord(); if (ar == null || ar.getTask() == null || ar.getTask().isVisibleRequested()) continue; mController.mSnapshotController.mTaskSnapshotController.recordSnapshot( ar.getTask(), false /* allowSnapshotHome */); } } // This is non-null only if display has changes. It handles the visible windows that don't Loading Loading
services/core/java/com/android/server/wm/ActivitySnapshotController.java +6 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord * Prepare to handle on transition start. Clear all temporary fields. */ void preTransitionStart() { if (shouldDisableSnapshots()) { return; } resetTmpFields(); } Loading Loading @@ -283,6 +286,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord * Called when the visibility of an app changes outside the regular app transition flow. */ void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) { if (shouldDisableSnapshots()) { return; } if (!visible) { resetTmpFields(); addBelowTopActivityIfExist(appWindowToken.getTask(), mPendingRemoveActivity, Loading
services/core/java/com/android/server/wm/SnapshotController.java +5 −1 Original line number Diff line number Diff line Loading @@ -213,8 +213,12 @@ class SnapshotController { void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) { if (!visible && hasTransitionStateConsumer(TASK_CLOSE)) { final Task task = appWindowToken.getTask(); if (task == null || task.isVisibleRequested()) { return; } // close task transition addTransitionRecord(TASK_CLOSE, false /*open*/, appWindowToken.getTask()); addTransitionRecord(TASK_CLOSE, false /*open*/, task); mActivitySnapshotController.preTransitionStart(); notifyTransition(TASK_CLOSE); mActivitySnapshotController.postTransitionStart(); Loading
services/core/java/com/android/server/wm/Transition.java +7 −1 Original line number Diff line number Diff line Loading @@ -1227,7 +1227,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { // transferred. If transition is transient, IME won't be moved during the transition and // the tasks are still live, so we take the snapshot at the end of the transition instead. if (mTransientLaunches == null) { mController.mSnapshotController.onTransitionReady(mType, mParticipants); for (int i = mParticipants.size() - 1; i >= 0; --i) { final ActivityRecord ar = mParticipants.valueAt(i).asActivityRecord(); if (ar == null || ar.getTask() == null || ar.getTask().isVisibleRequested()) continue; mController.mSnapshotController.mTaskSnapshotController.recordSnapshot( ar.getTask(), false /* allowSnapshotHome */); } } // This is non-null only if display has changes. It handles the visible windows that don't Loading