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

Commit 4cb4ed0d authored by Felipe Leme's avatar Felipe Leme
Browse files

Removed --verbose from `dumpsys activity`.

This option was added to provide extra but redundant information
in the ACTIVITY lines of dumpsys activity (it was redundant because
the information was also shown on the activity's TASK).

This CL removes that option and always display the info, as the
overhead is minimum and by doing so in a separate CL, it will be
easier to revert this behavior if neededed.

Test: adb shell dumpsys activity top| grep ACTIVITY | grep displayId || echo 'DOH'
Bug: 143499144

Change-Id: I58a58c5c2e751712595ff982b144697ca292767e
parent e020de1a
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -9878,7 +9878,6 @@ public class ActivityManagerService extends IActivityManager.Stub
        boolean dumpNormalPriority = false;
        boolean dumpVisibleStacksOnly = false;
        boolean dumpFocusedStackOnly = false;
        boolean dumpVerbose = false;
        int dumpDisplayId = INVALID_DISPLAY;
        String dumpPackage = null;
        int dumpUserId = UserHandle.USER_ALL;
@@ -9937,8 +9936,6 @@ public class ActivityManagerService extends IActivityManager.Stub
                    return;
                }
                dumpClient = true;
            } else if ("--verbose".equals(opt)) {
                dumpVerbose = true;
            } else if ("-h".equals(opt)) {
                ActivityManagerShellCommand.dumpHelp(pw, true);
                return;
@@ -10225,8 +10222,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            } else {
                // Dumping a single activity?
                if (!mAtmInternal.dumpActivity(fd, pw, cmd, args, opti, dumpAll,
                        dumpVisibleStacksOnly, dumpFocusedStackOnly, dumpVerbose, dumpDisplayId,
                        dumpUserId)) {
                        dumpVisibleStacksOnly, dumpFocusedStackOnly, dumpDisplayId, dumpUserId)) {
                    ActivityManagerShellCommand shell = new ActivityManagerShellCommand(this, true);
                    int res = shell.exec(this, null, fd, null, args, null,
                            new ResultReceiver(null));
+0 −1
Original line number Diff line number Diff line
@@ -3947,7 +3947,6 @@ final class ActivityManagerShellCommand extends ShellCommand {
            pw.println("  --checkin: output checkin format, resetting data.");
            pw.println("  --C: output checkin format, not resetting data.");
            pw.println("  --proto: output dump in protocol buffer format.");
            pw.println("  --verbose: dumps extra information.");
            pw.printf("  %s: dump just the DUMPABLE-related state of an activity. Use the %s "
                    + "option to list the supported DUMPABLEs\n", Activity.DUMP_ARG_DUMP_DUMPABLE,
                    Activity.DUMP_ARG_LIST_DUMPABLES);
+1 −2
Original line number Diff line number Diff line
@@ -490,8 +490,7 @@ public abstract class ActivityTaskManagerInternal {
    /** Dump the current activities state. */
    public abstract boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name,
            String[] args, int opti, boolean dumpAll, boolean dumpVisibleRootTasksOnly,
            boolean dumpFocusedRootTaskOnly, boolean dumpVerbose, int displayIdFilter,
            @UserIdInt int userId);
            boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId);

    /** Dump the current state for inclusion in oom dump. */
    public abstract void dumpForOom(PrintWriter pw);
+10 −16
Original line number Diff line number Diff line
@@ -4214,8 +4214,7 @@ 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, boolean dumpVerbose, int displayIdFilter,
            @UserIdInt int userId) {
            boolean dumpFocusedRootTaskOnly, int displayIdFilter, @UserIdInt int userId) {
        ArrayList<ActivityRecord> activities;

        synchronized (mGlobalLock) {
@@ -4260,7 +4259,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    }
                }
            }
            dumpActivity("  ", fd, pw, activities.get(i), newArgs, dumpAll, dumpVerbose);
            dumpActivity("  ", fd, pw, activities.get(i), newArgs, dumpAll);
        }
        if (!printedAnything) {
            // Typically happpens when no task matches displayIdFilter
@@ -4274,7 +4273,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, boolean dumpVerbose) {
            ActivityRecord r, String[] args, boolean dumpAll) {
        String innerPrefix = prefix + "  ";
        IApplicationThread appThread = null;
        synchronized (mGlobalLock) {
@@ -4290,15 +4289,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            } else {
                pw.print("(not running)");
            }
            if (dumpVerbose) {
            pw.print(" userId=");
            pw.print(r.mUserId);
            pw.print(" uid=");
            pw.print(r.getUid());
            printDisplayInfoAndNewLine(pw, r);
            } else {
                pw.println();
            }
            if (dumpAll) {
                r.dump(pw, innerPrefix, /* dumpAll= */ true);
            }
@@ -6627,11 +6622,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        @Override
        public boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name,
                String[] args, int opti, boolean dumpAll, boolean dumpVisibleRootTasksOnly,
                boolean dumpFocusedRootTaskOnly, boolean dumpVerbose, int displayIdFilter,
                boolean dumpFocusedRootTaskOnly, int displayIdFilter,
                @UserIdInt int userId) {
            return ActivityTaskManagerService.this.dumpActivity(fd, pw, name, args, opti, dumpAll,
                    dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, dumpVerbose, displayIdFilter,
                    userId);
                    dumpVisibleRootTasksOnly, dumpFocusedRootTaskOnly, displayIdFilter, userId);
        }

        @Override