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

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

Merge "Use a system property to call different bugreport types."

parents 53d530b8 1a83dede
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -180,7 +180,7 @@ public class BugreportProgressService extends Service {
    /** System property (and value) used to stop dumpstate. */
    /** System property (and value) used to stop dumpstate. */
    // TODO: should call ActiveManager API instead
    // TODO: should call ActiveManager API instead
    private static final String CTL_STOP = "ctl.stop";
    private static final String CTL_STOP = "ctl.stop";
    private static final String BUGREPORT_SERVICE = "bugreportplus";
    private static final String BUGREPORT_SERVICE = "bugreport";


    /**
    /**
     * Directory on Shell's data storage where screenshots will be stored.
     * Directory on Shell's data storage where screenshots will be stored.
+12 −10
Original line number Original line Diff line number Diff line
@@ -12056,27 +12056,29 @@ public final class ActivityManagerService extends ActivityManagerNative
    }
    }
    public void requestBugReport(int bugreportType) {
    public void requestBugReport(int bugreportType) {
        String service = null;
        String extraOptions = null;
        switch (bugreportType) {
        switch (bugreportType) {
            case ActivityManager.BUGREPORT_OPTION_FULL:
            case ActivityManager.BUGREPORT_OPTION_FULL:
                service = "bugreport";
                // Default options.
                break;
                break;
            case ActivityManager.BUGREPORT_OPTION_INTERACTIVE:
            case ActivityManager.BUGREPORT_OPTION_INTERACTIVE:
                service = "bugreportplus";
                extraOptions = "bugreportplus";
                break;
                break;
            case ActivityManager.BUGREPORT_OPTION_REMOTE:
            case ActivityManager.BUGREPORT_OPTION_REMOTE:
                service = "bugreportremote";
                extraOptions = "bugreportremote";
                break;
                break;
            case ActivityManager.BUGREPORT_OPTION_WEAR:
            case ActivityManager.BUGREPORT_OPTION_WEAR:
                service = "bugreportwear";
                extraOptions = "bugreportwear";
                break;
                break;
        }
            default:
        if (service == null) {
                throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
                throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
                        + bugreportType);
                        + bugreportType);
        }
        }
        enforceCallingPermission(android.Manifest.permission.DUMP, "requestBugReport");
        enforceCallingPermission(android.Manifest.permission.DUMP, "requestBugReport");
        SystemProperties.set("ctl.start", service);
        if (extraOptions != null) {
            SystemProperties.set("dumpstate.options", extraOptions);
        }
        SystemProperties.set("ctl.start", "bugreport");
    }
    }
    public static long getInputDispatchingTimeoutLocked(ActivityRecord r) {
    public static long getInputDispatchingTimeoutLocked(ActivityRecord r) {