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

Commit 6836e6d0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Pre-emptively take a snapshot when finishing an activity before...

Merge "Pre-emptively take a snapshot when finishing an activity before changing visibility" into qt-r1-dev
parents a51df29c 6dad90e5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -164,6 +164,8 @@ import com.android.server.am.AppTimeTracker;
import com.android.server.am.EventLogTags;
import com.android.server.am.PendingIntentRecord;

import com.google.android.collect.Sets;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
@@ -4024,6 +4026,14 @@ class ActivityStack extends ConfigurationContainer {
                }
                getDisplay().mDisplayContent.prepareAppTransition(transit, false);

                // When finishing the activity pre-emptively take the snapshot before the app window
                // is marked as hidden and any configuration changes take place
                if (mWindowManager.mTaskSnapshotController != null) {
                    final ArraySet<Task> tasks = Sets.newArraySet(task.mTask);
                    mWindowManager.mTaskSnapshotController.snapshotTasks(tasks);
                    mWindowManager.mTaskSnapshotController.addSkipClosingAppSnapshotTasks(tasks);
                }

                // Tell window manager to prepare for this one to be removed.
                r.setVisibility(false);