Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd7181ad authored by Winson Chung's avatar Winson Chung
Browse files

Refine check for transient transition

- An activity launch can happen mid-transient transition which can
  involve the transiently-hiding tasks (ie. quickswitch between
  split pairs will replace the previously paired tasks) in a new
  transition.  Since the intermediate transition itself is not
  transiently launching anything, it will still attempt to snapshot
  those hiding tasks, but if they are already a part of the
  transient transition, then their snapshots may be controled by the
  transition player (ie. Launcher), and we should not attempt to
  snapshot the tasks in a state which may have already changed.

  ie.
    Pair of task A | B in split (30/70 split ratio)
    Start transient transition T1 with A, B to back, and Home to front
    Start new split pair C | D in split (50/50 split ratio) replacing A | B
        - This resizes the split roots as a part of creating
          the new split, resulting in snapshots of A | B in
  	  50/50 instead of the original 30/70 size

    As long as Launcher requests a snapshot of A | B before finishing
    the recents transition, we will skip taking a snapshot on ready
    and also at the end of the transition (where it checks the last
    snapshot timestamp relative to transition start)

Bug: 425846640
Flag: EXEMPT bugfix
Test: atest WmTests:TransitionTests

Change-Id: Ibf5557ccfa391e60aed746989563ef93910b9e52
parent 288bf55e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -119,7 +119,11 @@ class SnapshotController {
            if (info.mWindowingMode == WINDOWING_MODE_PINNED) continue;
            if (info.mContainer.isActivityTypeHome()) continue;
            final Task task = info.mContainer.asTask();
            if (task != null && !task.mCreatedByOrganizer && !task.isVisibleRequested()) {
            // Note that if this task is being transiently hidden, the snapshot will be captured at
            // the end of the transient transition (see Transition#finishTransition()), because IME
            // won't move be moved during the transition and the tasks are still live.
            if (task != null && !task.mCreatedByOrganizer && !task.isVisibleRequested()
                    && !task.mTransitionController.isTransientHide(task)) {
                mTaskSnapshotController.recordSnapshot(task, info);
            }
            // Won't need to capture activity snapshot in close transition.
+1 −4
Original line number Diff line number Diff line
@@ -2120,10 +2120,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {

        // Take snapshots for closing tasks/activities before the animation finished but after
        // dispatching onTransitionReady, so IME (if there is) can be captured together and the
        // time spent on snapshot won't delay the start of animation. Note that if this transition
        // is transient (mTransientLaunches != null), the snapshot will be captured at the end of
        // the transition, because IME won't move be moved during the transition and the tasks are
        // still live.
        // time spent on snapshot won't delay the start of animation.
        if (mTransientLaunches == null) {
            mController.mSnapshotController.onTransactionReady(mType, mTargets);
        }