Loading packages/Shell/src/com/android/shell/BugreportProgressService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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. Loading services/core/java/com/android/server/am/ActivityManagerService.java +12 −10 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading Loading
packages/Shell/src/com/android/shell/BugreportProgressService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -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. Loading
services/core/java/com/android/server/am/ActivityManagerService.java +12 −10 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading