summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/IActivityManager.aidl14
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java54
2 files changed, 57 insertions, 11 deletions
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 48ca71690a1b..356e0da37cae 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -350,11 +350,13 @@ interface IActivityManager {
// Request a heap dump for the system server.
void requestSystemServerHeapDump();
- // Deprecated - This method is only used by a few internal components and it will soon be
- // replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ // Deprecated - This method is only used by a few internal components and it will soon start
+ // using bug report API (which will be restricted to a few, pre-defined apps).
// No new code should be calling it.
@UnsupportedAppUsage
void requestBugReport(int bugreportType);
+ void requestBugReportWithDescription(in @nullable String shareTitle,
+ in @nullable String shareDescription, int bugreportType);
/**
* Takes a telephony bug report and notifies the user with the title and description
@@ -369,7 +371,7 @@ interface IActivityManager {
void requestTelephonyBugReport(in String shareTitle, in String shareDescription);
/**
- * Deprecated - This method is only used by Wifi, and it will soon be replaced by a proper
+ * Deprecated - This method is only used by Wifi, and it will soon start using
* bug report API.
*
* Takes a minimal bugreport of Wifi-related state.
@@ -381,6 +383,12 @@ interface IActivityManager {
* parameters cannot be encoding to an UTF-8 charset.
*/
void requestWifiBugReport(in String shareTitle, in String shareDescription);
+ void requestInteractiveBugReportWithDescription(in String shareTitle,
+ in String shareDescription);
+
+ void requestInteractiveBugReport();
+ void requestFullBugReport();
+ void requestRemoteBugReport();
@UnsupportedAppUsage
Intent getIntentForIntentSender(in IIntentSender sender);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 3dc33f844092..088d19d5b5aa 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -8203,10 +8203,12 @@ public class ActivityManagerService extends IActivityManager.Stub
}
/**
- * @deprecated This method is only used by a few internal components and it will soon be
- * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * @deprecated This method is only used by a few internal components and it will soon start
+ * using bug report API (which will be restricted to a few, pre-defined apps).
* No new code should be calling it.
*/
+ // TODO(b/137825297): Remove deprecated annotation and rephrase comments for all
+ // requestBugreport functions below.
@Deprecated
@Override
public void requestBugReport(int bugreportType) {
@@ -8214,11 +8216,12 @@ public class ActivityManagerService extends IActivityManager.Stub
}
/**
- * @deprecated This method is only used by a few internal components and it will soon be
- * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * @deprecated This method is only used by a few internal components and it will soon start
+ * using bug report API (which will be restricted to a few, pre-defined apps).
* No new code should be calling it.
*/
@Deprecated
+ @Override
public void requestBugReportWithDescription(@Nullable String shareTitle,
@Nullable String shareDescription, int bugreportType) {
String type = null;
@@ -8299,8 +8302,8 @@ public class ActivityManagerService extends IActivityManager.Stub
}
/**
- * @deprecated This method is only used by a few internal components and it will soon be
- * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * @deprecated This method is only used by a few internal components and it will soon start
+ * using bug report API (which will be restricted to a few, pre-defined apps).
* No new code should be calling it.
*/
@Deprecated
@@ -8311,8 +8314,8 @@ public class ActivityManagerService extends IActivityManager.Stub
}
/**
- * @deprecated This method is only used by a few internal components and it will soon be
- * replaced by a proper bug report API (which will be restricted to a few, pre-defined apps).
+ * @deprecated This method is only used by a few internal components and it will soon start
+ * using bug report API (which will be restricted to a few, pre-defined apps).
* No new code should be calling it.
*/
@Deprecated
@@ -8322,6 +8325,41 @@ public class ActivityManagerService extends IActivityManager.Stub
ActivityManager.BUGREPORT_OPTION_WIFI);
}
+ /**
+ * Takes an interactive bugreport with a progress notification
+ */
+ @Override
+ public void requestInteractiveBugReport() {
+ requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
+ }
+
+ /**
+ * Takes an interactive bugreport with a progress notification. Also, shows the given title and
+ * description on the final share notification
+ */
+ @Override
+ public void requestInteractiveBugReportWithDescription(String shareTitle,
+ String shareDescription) {
+ requestBugReportWithDescription(shareTitle, shareDescription,
+ ActivityManager.BUGREPORT_OPTION_INTERACTIVE);
+ }
+
+ /**
+ * Takes a bugreport with minimal user interference
+ */
+ @Override
+ public void requestFullBugReport() {
+ requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_FULL);
+ }
+
+ /**
+ * Takes a bugreport remotely
+ */
+ @Override
+ public void requestRemoteBugReport() {
+ requestBugReportWithDescription(null, null, ActivityManager.BUGREPORT_OPTION_REMOTE);
+ }
+
public void registerProcessObserver(IProcessObserver observer) {
enforceCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER,
"registerProcessObserver()");