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

Commit 131d9180 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Documented how to use system service dumper."

parents c9215118 cb2a4767
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import android.util.IndentingPrintWriter;

/**
 * Interface used to dump {@link SystemServer} state that is not associated with any service.
 *
 * <p>See {@link SystemServer.SystemServerDumper} for usage example.
 */
public interface Dumpable {

+15 −0
Original line number Diff line number Diff line
@@ -645,6 +645,21 @@ public final class SystemServer implements Dumpable {
        TimeUtils.formatDuration(mRuntimeStartElapsedTime, pw); pw.println();
    }

    /**
     * Service used to dump {@link SystemServer} state that is not associated with any service.
     *
     * <p>To dump all services:
     *
     * <pre><code>adb shell dumpsys system_server_dumper</code></pre>
     *
     * <p>To get a list of all services:
     *
     * <pre><code>adb shell dumpsys system_server_dumper --list</code></pre>
     *
     * <p>To dump a specific service (use {@code --list} above to get service names):
     *
     * <pre><code>adb shell dumpsys system_server_dumper --name NAME</code></pre>
     */
    private final class SystemServerDumper extends Binder {

        @GuardedBy("mDumpables")