summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-09-24 07:07:21 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-09-24 07:07:21 +0000
commita55b3929db4ab7b7b6ce64f5c1acce04b254643e (patch)
tree697ad85e269484b761e98fc41d92228d53be046b
parentba3b990205c39ad403325970e30f6dea0f3cf668 (diff)
parent16207e333e8164cf4ae4e5ad1d38fa8c13b4cdf2 (diff)
Merge "Remove enum logic from callers of requestbugreport()"
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java6
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerShellCommand.java13
-rw-r--r--services/core/java/com/android/server/policy/LegacyGlobalActions.java6
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java3
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java3
5 files changed, 15 insertions, 16 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index c9c6a0c6868b..8eeb6293ee6d 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -665,8 +665,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
// Take an "interactive" bugreport.
MetricsLogger.action(mContext,
MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_INTERACTIVE);
- ActivityManager.getService().requestBugReport(
- ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
+ ActivityManager.getService().requestInteractiveBugReport();
} catch (RemoteException e) {
}
}
@@ -683,8 +682,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
try {
// Take a "full" bugreport.
MetricsLogger.action(mContext, MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_FULL);
- ActivityManager.getService().requestBugReport(
- ActivityManager.BUGREPORT_OPTION_FULL);
+ ActivityManager.getService().requestFullBugReport();
} catch (RemoteException e) {
}
return false;
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index d46c62662faf..058afd3b4d68 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -1016,18 +1016,23 @@ final class ActivityManagerShellCommand extends ShellCommand {
int runBugReport(PrintWriter pw) throws RemoteException {
String opt;
- int bugreportType = ActivityManager.BUGREPORT_OPTION_FULL;
+ boolean fullBugreport = true;
while ((opt=getNextOption()) != null) {
if (opt.equals("--progress")) {
- bugreportType = ActivityManager.BUGREPORT_OPTION_INTERACTIVE;
+ fullBugreport = false;
+ mInterface.requestInteractiveBugReport();
} else if (opt.equals("--telephony")) {
- bugreportType = ActivityManager.BUGREPORT_OPTION_TELEPHONY;
+ fullBugreport = false;
+ // no title and description specified
+ mInterface.requestTelephonyBugReport("" /* no title */, "" /* no descriptions */);
} else {
getErrPrintWriter().println("Error: Unknown option: " + opt);
return -1;
}
}
- mInterface.requestBugReport(bugreportType);
+ if (fullBugreport) {
+ mInterface.requestFullBugReport();
+ }
pw.println("Your lovely bug report is being created; please be patient.");
return 0;
}
diff --git a/services/core/java/com/android/server/policy/LegacyGlobalActions.java b/services/core/java/com/android/server/policy/LegacyGlobalActions.java
index 9cb2441d5662..bbee393bb98d 100644
--- a/services/core/java/com/android/server/policy/LegacyGlobalActions.java
+++ b/services/core/java/com/android/server/policy/LegacyGlobalActions.java
@@ -370,8 +370,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn
// Take an "interactive" bugreport.
MetricsLogger.action(mContext,
MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_INTERACTIVE);
- ActivityManager.getService().requestBugReport(
- ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
+ ActivityManager.getService().requestInteractiveBugReport();
} catch (RemoteException e) {
}
}
@@ -388,8 +387,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn
try {
// Take a "full" bugreport.
MetricsLogger.action(mContext, MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_FULL);
- ActivityManager.getService().requestBugReport(
- ActivityManager.BUGREPORT_OPTION_FULL);
+ ActivityManager.getService().requestFullBugReport();
} catch (RemoteException e) {
}
return false;
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 11c6ec95602f..88b17936d93d 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -3122,8 +3122,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|| Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) == 1) {
try {
- ActivityManager.getService()
- .requestBugReport(ActivityManager.BUGREPORT_OPTION_FULL);
+ ActivityManager.getService().requestFullBugReport();
} catch (RemoteException e) {
Slog.e(TAG, "Error taking bugreport", e);
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 704c80870fe5..555968a31ca8 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -7389,8 +7389,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
final long callingIdentity = mInjector.binderClearCallingIdentity();
try {
- mInjector.getIActivityManager().requestBugReport(
- ActivityManager.BUGREPORT_OPTION_REMOTE);
+ mInjector.getIActivityManager().requestRemoteBugReport();
mRemoteBugreportServiceIsActive.set(true);
mRemoteBugreportSharingAccepted.set(false);