Merge changes from topic "presubmit-am-9ba2a394f5ad4d338eadbfa2cb56aee6-sc-dev-sc-v2-dev-sc-v2-dev" into sc-v2-dev-plus-aosp
* changes:
[automerge] Consider the recents component activities/windows when dumping visible 2p: 43301fec55
Consider the recents component activities/windows when dumping visible
This commit is contained in:
@@ -3624,11 +3624,17 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
final RecentTasks recentTasks = mWindowManager.mAtmService.getRecentTasks();
|
||||||
|
final int recentsComponentUid = recentTasks != null
|
||||||
|
? recentTasks.getRecentsComponentUid()
|
||||||
|
: -1;
|
||||||
final ArrayList<ActivityRecord> activities = new ArrayList<>();
|
final ArrayList<ActivityRecord> activities = new ArrayList<>();
|
||||||
forAllRootTasks(rootTask -> {
|
forAllLeafTasks(task -> {
|
||||||
if (!dumpVisibleRootTasksOnly || rootTask.shouldBeVisible(null)) {
|
final boolean isRecents = (task.effectiveUid == recentsComponentUid);
|
||||||
activities.addAll(rootTask.getDumpActivitiesLocked(name));
|
if (!dumpVisibleRootTasksOnly || task.shouldBeVisible(null) || isRecents) {
|
||||||
|
activities.addAll(task.getDumpActivitiesLocked(name));
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
return activities;
|
return activities;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -513,9 +513,14 @@ public class WindowManagerShellCommand extends ShellCommand {
|
|||||||
try (ZipOutputStream out = new ZipOutputStream(getRawOutputStream())) {
|
try (ZipOutputStream out = new ZipOutputStream(getRawOutputStream())) {
|
||||||
ArrayList<Pair<String, ByteTransferPipe>> requestList = new ArrayList<>();
|
ArrayList<Pair<String, ByteTransferPipe>> requestList = new ArrayList<>();
|
||||||
synchronized (mInternal.mGlobalLock) {
|
synchronized (mInternal.mGlobalLock) {
|
||||||
|
final RecentTasks recentTasks = mInternal.mAtmService.getRecentTasks();
|
||||||
|
final int recentsComponentUid = recentTasks != null
|
||||||
|
? recentTasks.getRecentsComponentUid()
|
||||||
|
: -1;
|
||||||
// Request dump from all windows parallelly before writing to disk.
|
// Request dump from all windows parallelly before writing to disk.
|
||||||
mInternal.mRoot.forAllWindows(w -> {
|
mInternal.mRoot.forAllWindows(w -> {
|
||||||
if (w.isVisible()) {
|
final boolean isRecents = (w.mSession.mUid == recentsComponentUid);
|
||||||
|
if (w.isVisible() || isRecents) {
|
||||||
ByteTransferPipe pipe = null;
|
ByteTransferPipe pipe = null;
|
||||||
try {
|
try {
|
||||||
pipe = new ByteTransferPipe();
|
pipe = new ByteTransferPipe();
|
||||||
|
|||||||
Reference in New Issue
Block a user