OSDN Git Service

Added BUGREPORT_OPTION_TELEPHONY.
authorFelipe Leme <felipeal@google.com>
Thu, 5 Jan 2017 22:57:12 +0000 (14:57 -0800)
committerFelipe Leme <felipeal@google.com>
Wed, 11 Jan 2017 17:10:57 +0000 (09:10 -0800)
This option takes a lightweight version of bugreport that only includes a few,
urgent sections used to report telephony bugs.

BUG: 32589463
BUG: 26849505
Test: manual
Change-Id: I6f90c02779a1e8aead690428626e3b9f06aa04df

core/java/android/app/ActivityManager.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityManagerShellCommand.java

index cd50c4d..6ee0210 100644 (file)
@@ -162,7 +162,8 @@ public class ActivityManager {
             BUGREPORT_OPTION_FULL,
             BUGREPORT_OPTION_INTERACTIVE,
             BUGREPORT_OPTION_REMOTE,
-            BUGREPORT_OPTION_WEAR
+            BUGREPORT_OPTION_WEAR,
+            BUGREPORT_OPTION_TELEPHONY
     })
     public @interface BugreportMode {}
     /**
@@ -190,6 +191,13 @@ public class ActivityManager {
     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
      * <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
      * uninstalled in lieu of the declaring one.  The package named here must be
index 49c4995..026c77a 100644 (file)
@@ -12091,6 +12091,9 @@ public class ActivityManagerService extends IActivityManager.Stub
             case ActivityManager.BUGREPORT_OPTION_WEAR:
                 extraOptions = "bugreportwear";
                 break;
+            case ActivityManager.BUGREPORT_OPTION_TELEPHONY:
+                extraOptions = "bugreporttelephony";
+                break;
             default:
                 throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
                         + bugreportType);
index 0d13ac6..29a4781 100644 (file)
@@ -818,6 +818,8 @@ final class ActivityManagerShellCommand extends ShellCommand {
         while ((opt=getNextOption()) != null) {
             if (opt.equals("--progress")) {
                 bugreportType = ActivityManager.BUGREPORT_OPTION_INTERACTIVE;
+            } else if (opt.equals("--telephony")) {
+                bugreportType = ActivityManager.BUGREPORT_OPTION_TELEPHONY;
             } else {
                 getErrPrintWriter().println("Error: Unknown option: " + opt);
                 return -1;
@@ -2453,10 +2455,11 @@ final class ActivityManagerShellCommand extends ShellCommand {
             pw.println("      above <HEAP-LIMIT> then a heap dump is collected for the user to report.");
             pw.println("  clear-watch-heap");
             pw.println("      Clear the previously set-watch-heap.");
-            pw.println("  bug-report [--progress]");
+            pw.println("  bug-report [--progress | --telephony]");
             pw.println("      Request bug report generation; will launch a notification");
             pw.println("        when done to select where it should be delivered. Options are:");
             pw.println("     --progress: will launch a notification right away to show its progress.");
+            pw.println("     --telephony: will dump only telephony sections.");
             pw.println("  force-stop [--user <USER_ID> | all | current] <PACKAGE>");
             pw.println("      Completely stop the given application package.");
             pw.println("  kill [--user <USER_ID> | all | current] <PACKAGE>");