Record some logcat output with crashes, ANRs, etc..
Shelling out to logcat from the system server makes me queasy,
so this is turned off by default -- it must be enabled individually
for each error type (system_app_anr, etc) via a secure settings
value (which I plan to poke into from gservices for internal use).
Even when enabled, it happens in a side thread, unless the system
server is about to die anyway (system server restart).
Change-Id: Id6d88bcd78d3625f0364a5fe9c771046601a5a14
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 873e1a6f..503d8b8d 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2900,6 +2900,15 @@
*/
public static final String DROPBOX_TAG_PREFIX =
"dropbox:";
+ /**
+ * Lines of logcat to include with system crash/ANR/etc. reports,
+ * as a prefix of the dropbox tag of the report type.
+ * For example, "logcat_for_system_server_anr" controls the lines
+ * of logcat captured with system server ANR reports. 0 to disable.
+ * @hide
+ */
+ public static final String ERROR_LOGCAT_PREFIX =
+ "logcat_for_";
/**