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

Commit c88368c2 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Added BUGREPORT_OPTION_TELEPHONY.

am: a561b1f9

Change-Id: I063a0d6c4c66035082789d4361b649439da00bf9
parents ad9ff9c5 a561b1f9
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -145,7 +145,7 @@ public class Am extends BaseCommand {
                "       am clear-debug-app\n" +
                "       am clear-debug-app\n" +
                "       am set-watch-heap <PROCESS> <MEM-LIMIT>\n" +
                "       am set-watch-heap <PROCESS> <MEM-LIMIT>\n" +
                "       am clear-watch-heap\n" +
                "       am clear-watch-heap\n" +
                "       am bug-report [--progress]\n" +
                "       am bug-report [--progress | --telephony]\n" +
                "       am monitor [--gdb <port>]\n" +
                "       am monitor [--gdb <port>]\n" +
                "       am hang [--allow-restart]\n" +
                "       am hang [--allow-restart]\n" +
                "       am restart\n" +
                "       am restart\n" +
@@ -271,6 +271,7 @@ public class Am extends BaseCommand {
                "am bug-report: request bug report generation; will launch a notification\n" +
                "am bug-report: request bug report generation; will launch a notification\n" +
                "    when done to select where it should be delivered. Options are: \n" +
                "    when done to select where it should be delivered. Options are: \n" +
                "   --progress: will launch a notification right away to show its progress.\n" +
                "   --progress: will launch a notification right away to show its progress.\n" +
                "   --telephony: will dump only telephony sections.\n" +
                "\n" +
                "\n" +
                "am monitor: start monitoring for crashes or ANRs.\n" +
                "am monitor: start monitoring for crashes or ANRs.\n" +
                "    --gdb: start gdbserv on the given port at crash/ANR\n" +
                "    --gdb: start gdbserv on the given port at crash/ANR\n" +
@@ -1144,6 +1145,8 @@ public class Am extends BaseCommand {
        while ((opt=nextOption()) != null) {
        while ((opt=nextOption()) != null) {
            if (opt.equals("--progress")) {
            if (opt.equals("--progress")) {
                bugreportType = ActivityManager.BUGREPORT_OPTION_INTERACTIVE;
                bugreportType = ActivityManager.BUGREPORT_OPTION_INTERACTIVE;
            } else if (opt.equals("--telephony")) {
                bugreportType = ActivityManager.BUGREPORT_OPTION_TELEPHONY;
            } else {
            } else {
                System.err.println("Error: Unknown option: " + opt);
                System.err.println("Error: Unknown option: " + opt);
                return;
                return;
+9 −1
Original line number Original line Diff line number Diff line
@@ -126,7 +126,8 @@ public class ActivityManager {
            BUGREPORT_OPTION_FULL,
            BUGREPORT_OPTION_FULL,
            BUGREPORT_OPTION_INTERACTIVE,
            BUGREPORT_OPTION_INTERACTIVE,
            BUGREPORT_OPTION_REMOTE,
            BUGREPORT_OPTION_REMOTE,
            BUGREPORT_OPTION_WEAR
            BUGREPORT_OPTION_WEAR,
            BUGREPORT_OPTION_TELEPHONY
    })
    })
    public @interface BugreportMode {}
    public @interface BugreportMode {}
    /**
    /**
@@ -153,6 +154,13 @@ public class ActivityManager {
     */
     */
    public static final int BUGREPORT_OPTION_WEAR = 3;
    public static final int BUGREPORT_OPTION_WEAR = 3;


    /**
     * Takes a lightweight version of bugreport that only includes a few, urgent sections
     * used to report telephony bugs.
     * @hide
     */
    public static final int BUGREPORT_OPTION_TELEPHONY = 4;

    /**
    /**
     * <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
     * <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
     * <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
     * <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
+3 −0
Original line number Original line Diff line number Diff line
@@ -12202,6 +12202,9 @@ public final class ActivityManagerService extends ActivityManagerNative
            case ActivityManager.BUGREPORT_OPTION_WEAR:
            case ActivityManager.BUGREPORT_OPTION_WEAR:
                service = "bugreportwear";
                service = "bugreportwear";
                break;
                break;
            case ActivityManager.BUGREPORT_OPTION_TELEPHONY:
                service = "bugreportelefony";
                break;
        }
        }
        if (service == null) {
        if (service == null) {
            throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
            throw new IllegalArgumentException("Provided bugreport type is not correct, value: "