Merge "Pre-emptively take a snapshot when finishing an activity before changing visibility" into qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6836e6d02e
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user