Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +7 −5 Original line number Diff line number Diff line Loading @@ -4381,7 +4381,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { */ protected boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name, String[] args, int opti, boolean dumpAll, boolean dumpVisibleRootTasksOnly, boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId) { boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId, long timeout) { ArrayList<ActivityRecord> activities; synchronized (mGlobalLock) { Loading Loading @@ -4426,7 +4427,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } } dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll); dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll, timeout); } if (!printedAnything) { // Typically happpens when no task matches displayIdFilter Loading @@ -4440,7 +4441,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { * there is a thread associated with the activity. */ private void dumpActivity(String prefix, FileDescriptor fd, PrintWriter pw, ActivityRecord r, String[] args, boolean dumpAll) { ActivityRecord r, String[] args, boolean dumpAll, long timeout) { String innerPrefix = prefix + " "; IApplicationThread appThread = null; synchronized (mGlobalLock) { Loading Loading @@ -4471,7 +4472,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { pw.flush(); try (TransferPipe tp = new TransferPipe()) { appThread.dumpActivity(tp.getWriteFd(), r.token, innerPrefix, args); tp.go(fd); tp.go(fd, timeout); } catch (IOException e) { pw.println(innerPrefix + "Failure while dumping the activity: " + e); } catch (RemoteException e) { Loading Loading @@ -6970,7 +6971,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId) { return ActivityTaskManagerService.this.dumpActivity(fd, pw, name, args, opti, dumpAll, dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, displayIdFilter, userId); dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, displayIdFilter, userId, /* timeout= */ 5000); } @Override Loading services/core/java/com/android/server/wm/WindowManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,21 @@ public class WindowManagerService extends IWindowManager.Stub doDump(fd, pw, new String[] {"-a"}, asProto); } @Override public void dumpHigh(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) { if (asProto) { return; } mAtmService.dumpActivity(fd, pw, /* name= */ "all", /* args= */ new String[]{}, /* opti= */ 0, /* dumpAll= */ true, /* dumpVisibleRootTasksOnly= */ true, /* dumpFocusedRootTaskOnly= */ false, INVALID_DISPLAY, UserHandle.USER_ALL, /* timeout= */ 1000 ); } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) { doDump(fd, pw, args, asProto); Loading services/java/com/android/server/SystemServer.java +2 −1 Original line number Diff line number Diff line Loading @@ -1618,7 +1618,8 @@ public final class SystemServer implements Dumpable { wm = WindowManagerService.main(context, inputManager, !mFirstBoot, new PhoneWindowManager(), mActivityManagerService.mActivityTaskManager); ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PROTO); DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_HIGH | DUMP_FLAG_PROTO); ServiceManager.addService(Context.INPUT_SERVICE, inputManager, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); t.traceEnd(); Loading Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +7 −5 Original line number Diff line number Diff line Loading @@ -4381,7 +4381,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { */ protected boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name, String[] args, int opti, boolean dumpAll, boolean dumpVisibleRootTasksOnly, boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId) { boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId, long timeout) { ArrayList<ActivityRecord> activities; synchronized (mGlobalLock) { Loading Loading @@ -4426,7 +4427,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } } dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll); dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll, timeout); } if (!printedAnything) { // Typically happpens when no task matches displayIdFilter Loading @@ -4440,7 +4441,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { * there is a thread associated with the activity. */ private void dumpActivity(String prefix, FileDescriptor fd, PrintWriter pw, ActivityRecord r, String[] args, boolean dumpAll) { ActivityRecord r, String[] args, boolean dumpAll, long timeout) { String innerPrefix = prefix + " "; IApplicationThread appThread = null; synchronized (mGlobalLock) { Loading Loading @@ -4471,7 +4472,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { pw.flush(); try (TransferPipe tp = new TransferPipe()) { appThread.dumpActivity(tp.getWriteFd(), r.token, innerPrefix, args); tp.go(fd); tp.go(fd, timeout); } catch (IOException e) { pw.println(innerPrefix + "Failure while dumping the activity: " + e); } catch (RemoteException e) { Loading Loading @@ -6970,7 +6971,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId) { return ActivityTaskManagerService.this.dumpActivity(fd, pw, name, args, opti, dumpAll, dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, displayIdFilter, userId); dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, displayIdFilter, userId, /* timeout= */ 5000); } @Override Loading
services/core/java/com/android/server/wm/WindowManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,21 @@ public class WindowManagerService extends IWindowManager.Stub doDump(fd, pw, new String[] {"-a"}, asProto); } @Override public void dumpHigh(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) { if (asProto) { return; } mAtmService.dumpActivity(fd, pw, /* name= */ "all", /* args= */ new String[]{}, /* opti= */ 0, /* dumpAll= */ true, /* dumpVisibleRootTasksOnly= */ true, /* dumpFocusedRootTaskOnly= */ false, INVALID_DISPLAY, UserHandle.USER_ALL, /* timeout= */ 1000 ); } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args, boolean asProto) { doDump(fd, pw, args, asProto); Loading
services/java/com/android/server/SystemServer.java +2 −1 Original line number Diff line number Diff line Loading @@ -1618,7 +1618,8 @@ public final class SystemServer implements Dumpable { wm = WindowManagerService.main(context, inputManager, !mFirstBoot, new PhoneWindowManager(), mActivityManagerService.mActivityTaskManager); ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PROTO); DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_HIGH | DUMP_FLAG_PROTO); ServiceManager.addService(Context.INPUT_SERVICE, inputManager, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); t.traceEnd(); Loading