Loading services/core/java/com/android/server/wm/RootWindowContainer.java +9 −3 Original line number Diff line number Diff line Loading @@ -3624,11 +3624,17 @@ class RootWindowContainer extends WindowContainer<DisplayContent> return new ArrayList<>(); } } else { final RecentTasks recentTasks = mWindowManager.mAtmService.getRecentTasks(); final int recentsComponentUid = recentTasks != null ? recentTasks.getRecentsComponentUid() : -1; final ArrayList<ActivityRecord> activities = new ArrayList<>(); forAllRootTasks(rootTask -> { if (!dumpVisibleRootTasksOnly || rootTask.shouldBeVisible(null)) { activities.addAll(rootTask.getDumpActivitiesLocked(name)); forAllLeafTasks(task -> { final boolean isRecents = (task.effectiveUid == recentsComponentUid); if (!dumpVisibleRootTasksOnly || task.shouldBeVisible(null) || isRecents) { activities.addAll(task.getDumpActivitiesLocked(name)); } return false; }); return activities; } Loading services/core/java/com/android/server/wm/WindowManagerShellCommand.java +6 −1 Original line number Diff line number Diff line Loading @@ -513,9 +513,14 @@ public class WindowManagerShellCommand extends ShellCommand { try (ZipOutputStream out = new ZipOutputStream(getRawOutputStream())) { ArrayList<Pair<String, ByteTransferPipe>> requestList = new ArrayList<>(); 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. mInternal.mRoot.forAllWindows(w -> { if (w.isVisible()) { final boolean isRecents = (w.mSession.mUid == recentsComponentUid); if (w.isVisible() || isRecents) { ByteTransferPipe pipe = null; try { pipe = new ByteTransferPipe(); Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +9 −3 Original line number Diff line number Diff line Loading @@ -3624,11 +3624,17 @@ class RootWindowContainer extends WindowContainer<DisplayContent> return new ArrayList<>(); } } else { final RecentTasks recentTasks = mWindowManager.mAtmService.getRecentTasks(); final int recentsComponentUid = recentTasks != null ? recentTasks.getRecentsComponentUid() : -1; final ArrayList<ActivityRecord> activities = new ArrayList<>(); forAllRootTasks(rootTask -> { if (!dumpVisibleRootTasksOnly || rootTask.shouldBeVisible(null)) { activities.addAll(rootTask.getDumpActivitiesLocked(name)); forAllLeafTasks(task -> { final boolean isRecents = (task.effectiveUid == recentsComponentUid); if (!dumpVisibleRootTasksOnly || task.shouldBeVisible(null) || isRecents) { activities.addAll(task.getDumpActivitiesLocked(name)); } return false; }); return activities; } Loading
services/core/java/com/android/server/wm/WindowManagerShellCommand.java +6 −1 Original line number Diff line number Diff line Loading @@ -513,9 +513,14 @@ public class WindowManagerShellCommand extends ShellCommand { try (ZipOutputStream out = new ZipOutputStream(getRawOutputStream())) { ArrayList<Pair<String, ByteTransferPipe>> requestList = new ArrayList<>(); 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. mInternal.mRoot.forAllWindows(w -> { if (w.isVisible()) { final boolean isRecents = (w.mSession.mUid == recentsComponentUid); if (w.isVisible() || isRecents) { ByteTransferPipe pipe = null; try { pipe = new ByteTransferPipe(); Loading