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

Commit 1144ba93 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Allow to use snapshot starting window when launch translucent activity." into main

parents 0ec6392b 57f0c3e5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2524,8 +2524,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // trampoline that will be always created and finished immediately. Then give a chance to
        // see if the snapshot is usable for the current running activity so the transition will
        // look smoother, instead of showing a splash screen on the second launch.
        if (!newTask && taskSwitch && processRunning && !activityCreated && task.intent != null
                && mActivityComponent.equals(task.intent.getComponent())) {
        if (!newTask && taskSwitch && !activityCreated && task.intent != null
                // Another case where snapshot is allowed to be used is if this activity has not yet
                // been created && is translucent or floating.
                // The component isn't necessary to be matched in this case.
                && (!mOccludesParent || mActivityComponent.equals(task.intent.getComponent()))) {
            final ActivityRecord topAttached = task.getActivity(ActivityRecord::attachedToProcess);
            if (topAttached != null) {
                if (topAttached.isSnapshotCompatible(snapshot)